]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
bba-build-rpm and dired listing
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 26 Aug 2015 09:50:22 +0000 (11:50 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 26 Aug 2015 09:50:22 +0000 (11:50 +0200)
- Added bba-build-rpm bound to C-c C-c if buffer is a spec file.
- Make dired human readable.

bba.org

diff --git a/bba.org b/bba.org
index dc97b38dc7bf1a439467a956580fe8db23436b53..c5561ab03de7dd45d3540191f332b76908cbc05a 100644 (file)
--- 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