]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
* For annotated tags prepare message with commit messages since last tag.
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sun, 5 Apr 2015 22:39:02 +0000 (00:39 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sun, 5 Apr 2015 22:39:02 +0000 (00:39 +0200)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index 97e6e0e25ead21ab96c5719004e942d3a60ec87f..b3af494754c0004bbd72d45d2246fad4fc8acd9a 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -93,23 +93,37 @@ If you are in need enable debugging:
 *** [[http://www.emacswiki.org/emacs/ELPA][ELPA]]
 
 #+BEGIN_SRC emacs-lisp
-    (if (>= emacs-major-version 24)
-        (progn
-          (add-to-list 'load-path "~/.emacs.d/elpa")
-          (add-to-list 'load-path "~/.emacs.d/elpa/popup-20140207.1702")
-          (require 'package)
-          (package-initialize)
-          )
+  (if (>= emacs-major-version 24)
       (progn
-        (add-to-list 'load-path "~/.emacs.d/elpa/magit-1.2.0")
-        (require 'magit)
-        (add-to-list 'load-path "~/.emacs.d/elpa/yaml-mode-0.0.9")
-        (require 'yaml-mode)
+        (add-to-list 'load-path "~/.emacs.d/elpa")
+        (add-to-list 'load-path "~/.emacs.d/elpa/popup-20140207.1702")
+        (require 'package)
+        (package-initialize)
         )
-
+    (progn
+      (add-to-list 'load-path "~/.emacs.d/elpa/magit-1.2.0")
+      (add-to-list 'load-path "~/.emacs.d/elpa/yaml-mode-0.0.9")
+      (require 'yaml-mode)
       )
+
+    )
 #+END_SRC
 
+*** magit
+
+For annotated tags prepare message with commit messages since last tag.
+
+#+BEGIN_SRC emacs-lisp
+  (require 'magit)
+  (add-hook 'magit-log-edit-mode-hook
+            (lambda ()
+              (when (magit-log-edit-get-field 'tag-name)
+                (insert (shell-command-to-string "git log --pretty=format:\"* %s\" `git rev-list --tags --max-count=1`..HEAD" ))
+                )
+              )
+            )
+
+#+END_SRC
 *** fullframe
 open ibuffer and magit-status in fullframe mode.
 #+BEGIN_SRC emacs-lisp