emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] BUG? - Capture escape %n not working


From: Nick Dokos
Subject: Re: [Orgmode] BUG? - Capture escape %n not working
Date: Fri, 07 Jan 2011 09:15:28 -0500

Rainer M Krug <address@hidden> wrote:

> Hi
> 
> I am not sure if it is a bug, or a configuration issue, but %n  (user
> name (taken from `user-full-name')) is not working - it is not expanded
> and displayed as %n
> 
> Emacs  : GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
>  of 2010-07-05 on ecolmod
> Package: Org-mode version 7.4 (release_7.4.100.gdf7d)
> 

It's a bug - there is an "n" missing from the regexp:

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 85747ee..2076f68 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1213,7 +1213,7 @@ The template may still contain \"%?\" for cursor 
positioning."
 
       ;; Simple %-escapes
       (goto-char (point-min))
-      (while (re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil t)
+      (while (re-search-forward "%\\([tTuUaiAcxkKIn]\\)" nil t)
        (unless (org-capture-escaped-%)
          (when (and initial (equal (match-string 0) "%i"))
            (save-match-data

Nick



reply via email to

[Prev in Thread] Current Thread [Next in Thread]