From: Andreas Gerler Date: Wed, 26 Aug 2015 09:50:22 +0000 (+0200) Subject: bba-build-rpm and dired listing X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=30b991ffc8da422801c9b07652596f10446adb80;p=emacsconfig.git bba-build-rpm and dired listing - Added bba-build-rpm bound to C-c C-c if buffer is a spec file. - Make dired human readable. --- diff --git a/bba.org b/bba.org index dc97b38d..c5561ab0 100644 --- a/bba.org +++ b/bba.org @@ -1270,6 +1270,33 @@ like these: +#+END_SRC + + +* rpm spec buildrpm + [2015-07-23 Thu 13:22] + +Use C-c C-c to run rpmbuild if buffer is spec file. + +#+BEGIN_SRC emacs-lisp + (defun bba-build-rpm () + "Do rpmbuild -ba, with the current buffers filename." + (interactive) + (string-match "\\([^:]*\\)$" buffer-file-name) + (let* ((spec-file (match-string 1 buffer-file-name)) + ) + (compile (concat "rpmbuild -ba " spec-file)) + ;; (shell-command (concat "rpmbuild -ba " spec-file)) + ) + ) + + (add-hook 'sh-mode-hook + (lambda () + (progn + (if (string-match ".spec$" buffer-file-name) + (define-key sh-mode-map "\C-c\C-c" 'bba-build-rpm)) + ))) + #+END_SRC * mode-line menu-bar etc @@ -1777,7 +1804,7 @@ Highlight text between parens (setq show-paren-style 'expression) #+END_SRC -Use buffer nane as frame title +Use buffer name as frame title #+BEGIN_SRC emacs-lisp (setq frame-title-format "%b - emacs") @@ -1789,13 +1816,18 @@ Completion in mini-buffer (icomplete-mode t) #+END_SRC - Stack minibuffers #+BEGIN_SRC emacs-lisp (setq enable-recursive-minibuffers t) #+END_SRC +Make dired human readable + +#+BEGIN_SRC emacs-lisp + (setq dired-listing-switches "-alh") +#+END_SRC + #+BEGIN_SRC emacs-lisp (setq ediff-split-window-function 'split-window-horizontally) #+END_SRC