From: Bastien <bzg@gnu.org>
To: nicholas.dokos@hp.com
Cc: G <gsqual@googlemail.com>, emacs-orgmode@gnu.org
Subject: Re: my capture template generates a literal "%?"
Date: Fri, 10 Aug 2012 11:49:34 +0200 [thread overview]
Message-ID: <87pq6zkrf5.fsf@gnu.org> (raw)
In-Reply-To: <19288.1344526546@alphaville> (Nick Dokos's message of "Thu, 09 Aug 2012 11:35:46 -0400")
Hi,
Nick Dokos <nicholas.dokos@hp.com> writes:
> D'oh^2: everything else is interpreted, so why not %? ?
>
> The problem seems to be in org-capture-place-plain-text: the insertion
> of the text happens like this
>
> ,----
> | ...
> | (setq beg (point))
> | (insert txt)
> | (org-capture-empty-lines-after 1)
> | (org-capture-position-for-last-stored beg)
> | (setq end (point))
> | (org-capture-mark-kill-region beg (1- end))
> | (org-capture-narrow beg (1- end))
> | (if (re-search-forward "%\\?" end t) (replace-match ""))))
> `----
>
> but it seesm that just before the re-search-forward, point is at
> end, not at beg, so the search is fruitless. We could search backwards
> to beg instead (but what is the semantics of multiple %? markers in the
> template?), or we could just (goto-char beg) before the search.
There was indeed a problem here, I just fixed it.
Thanks for the directions,
--
Bastien
prev parent reply other threads:[~2012-08-10 9:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 7:20 my capture template generates a literal "%?" G
2012-08-09 14:37 ` Nick Dokos
2012-08-09 14:48 ` Nick Dokos
2012-08-09 15:35 ` Nick Dokos
2012-08-10 9:49 ` Bastien [this message]
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=87pq6zkrf5.fsf@gnu.org \
--to=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=gsqual@googlemail.com \
--cc=nicholas.dokos@hp.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).