From ee9c339c834f5dfdb7ed60c83313e527e60c9809 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Thu, 31 Oct 2019 17:39:49 +0100 Subject: [PATCH] cleanup --- .gitignore | 5 +++++ bba.org | 45 ++++++++++++++++++++++++++++++++++++-- custom.el | 8 ++++--- elpa/helm-gtags-readme.txt | 22 ------------------- 4 files changed, 53 insertions(+), 27 deletions(-) delete mode 100644 elpa/helm-gtags-readme.txt diff --git a/.gitignore b/.gitignore index b4212a93..2512b90b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,8 @@ archive-contents /tldr /recentf /ido.last +apples-tmp-dir +/games +/network-security.data +/transient +/type-break diff --git a/bba.org b/bba.org index 0301aac3..3e7fdb13 100644 --- a/bba.org +++ b/bba.org @@ -219,6 +219,42 @@ What about =gd= to call the Diff command? (defalias 'gds 'magit-diff-staged) #+END_SRC +A little bit of code from https://github.com/bodil/emacs.d/blob/master/bodil/bodil-eshell.el + +#+BEGIN_SRC elisp + (require 'f) + + ;; Prompt with a bit of help from http://www.emacswiki.org/emacs/EshellPrompt + (defmacro with-face (str &rest properties) + `(propertize ,str 'face (list ,@properties))) + + (setq hostname (replace-regexp-in-string "\\(^[[:space:]\n]*\\|[[:space:]\n]*$\\)" "" (with-output-to-string (call-process "hostname" nil standard-output)))) + + (defun eshell/abbr-pwd () + (let ((home (getenv "HOME")) + (path (eshell/pwd))) + (cond + ((string-equal home path) "~") + ((f-ancestor-of? home path) (concat "~/" (f-relative path home))) + (path)))) + + (defun eshell/my-prompt () + (let ((header-bg "#161616")) + (concat + (with-face user-login-name :foreground "#d75faf") + (with-face (concat "@" hostname) :foreground "#8700af") + " " + (with-face (eshell/abbr-pwd) :foreground "#008700") + (if (= (user-uid) 0) + (with-face "#" :foreground "red") + (with-face "$" :foreground "#2345ba")) + " "))) + + (setq eshell-prompt-function 'eshell/my-prompt) + (setq eshell-highlight-prompt nil) + (setq eshell-prompt-regexp "^[^#$\n]+[#$] ") +#+END_SRC + * define emacs shutdown function I like to commit my notes in my org and workorg folders after a days work. @@ -1228,6 +1264,7 @@ Your notes are more useful if you can easily search them! (perl . t) (sql . t) (tmux . sh) + (R . t) )) ;;(setq org-html-preamble nil @@ -2278,7 +2315,7 @@ Use our default socket files #+BEGIN_SRC emacs-lisp :tangle yes (if (file-accessible-directory-p "~/.ssh/sockets") - (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto -o ControlPath=~/.ssh/sockets/ssh.%%C -o ControlPersist=600")) + (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto -o ControlPath='~/.ssh/sockets/ssh.%%C' -o ControlPersist=600")) #+END_SRC * [[http://www.twmode.sourceforge.net/][twitter]] @@ -3951,6 +3988,11 @@ Specify printing format (setq ps-paper-type 'a4) #+END_SRC +#+BEGIN_SRC emacs-lisp :tangle yes + (setq ps-landscape-mode t) + (setq ps-number-of-columns 2) +#+END_SRC + compilation output #+BEGIN_SRC emacs-lisp :tangle yes @@ -4108,7 +4150,6 @@ update copyrights (if (bound-and-true-p bba-copyright-update) (copyright-update)))) #+END_SRC -#+END_SRC * other stuff diff --git a/custom.el b/custom.el index 1684c444..b13c6a40 100644 --- a/custom.el +++ b/custom.el @@ -4,15 +4,17 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(blink-cursor-mode t) - '(custom-safe-themes (quote ("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" default))) + '(custom-safe-themes + (quote + ("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" default))) '(gnuserv-program (concat exec-directory "/gnuserv")) '(history-length 1000) '(magit-commit-signoff t) + '(magit-git-global-arguments (quote ("--no-pager"))) '(magit-repo-dirs (quote ("~/git"))) - '(package-archives (quote (("gnu" . "http://elpa.gnu.org/packages/") ("marmalade" . "http://marmalade-repo.org/packages/") ("melpa" . "http://melpa.milkbox.net/packages/")))) '(package-user-dir "~/.emacs.d/elpa") '(paradox-github-token t) - '(recentf-max-saved-items 42) + '(safe-local-variable-values (quote ((bba-keep-whitespaces . 1)))) '(template-default-directories (quote ("~/.emacs.d/templates/"))) '(toolbar-visible-p nil) '(vc-handled-backends (quote (RCS CVS SVN SCCS Bzr Hg Mtn Arch)))) diff --git a/elpa/helm-gtags-readme.txt b/elpa/helm-gtags-readme.txt deleted file mode 100644 index 26aa68eb..00000000 --- a/elpa/helm-gtags-readme.txt +++ /dev/null @@ -1,22 +0,0 @@ -`helm-gtags.el' is a `helm' interface of GNU Global. -`helm-gtags.el' is not compatible `anything-gtags.el', but `helm-gtags.el' -is designed for fast search. - - -To use this package, add these lines to your init.el or .emacs file: - - ;; Enable helm-gtags-mode - (add-hook 'c-mode-hook 'helm-gtags-mode) - (add-hook 'c++-mode-hook 'helm-gtags-mode) - (add-hook 'asm-mode-hook 'helm-gtags-mode) - - ;; Set key bindings - (eval-after-load "helm-gtags" - '(progn - (define-key helm-gtags-mode-map (kbd "M-t") 'helm-gtags-find-tag) - (define-key helm-gtags-mode-map (kbd "M-r") 'helm-gtags-find-rtag) - (define-key helm-gtags-mode-map (kbd "M-s") 'helm-gtags-find-symbol) - (define-key helm-gtags-mode-map (kbd "M-g M-p") 'helm-gtags-parse-file) - (define-key helm-gtags-mode-map (kbd "C-c <") 'helm-gtags-previous-history) - (define-key helm-gtags-mode-map (kbd "C-c >") 'helm-gtags-next-history) - (define-key helm-gtags-mode-map (kbd "M-,") 'helm-gtags-pop-stack))) -- 2.47.3