emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode <emacs-orgmode@gnu.org>,
	Rainer M Krug <r.m.krug@gmail.com>
Subject: Re: BUG? - Capture escape %n not working
Date: Fri, 7 Jan 2011 15:29:11 +0100	[thread overview]
Message-ID: <3FAC4D78-B270-405A-98DB-8E7F8D03BA0B@gmail.com> (raw)
In-Reply-To: <12644.1294409728@gamaville.dokosmarshall.org>

Applied, thanks.

- Carsten

On Jan 7, 2011, at 3:15 PM, Nick Dokos wrote:

> Rainer M Krug <r.m.krug@gmail.com> 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
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

  reply	other threads:[~2011-01-07 14:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07  8:28 BUG? - Capture escape %n not working Rainer M Krug
2011-01-07 14:15 ` Nick Dokos
2011-01-07 14:29   ` Carsten Dominik [this message]
2011-01-07 14:29     ` Rainer M Krug

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FAC4D78-B270-405A-98DB-8E7F8D03BA0B@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    --cc=r.m.krug@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).