emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Add the capture feature "%(sexp)" to org-feed
Date: Sun, 12 Aug 2012 11:37:07 +0200	[thread overview]
Message-ID: <CALn3zojWXYvsO8jVUTOzPJ5LhqgjkGhY15q+Zgci3wELg9+6MQ@mail.gmail.com> (raw)
In-Reply-To: <87zk61t7iv.fsf@gnu.org>

Hi Bastien

On Sat, Aug 11, 2012 at 11:59 PM, Bastien <bzg@gnu.org> wrote:
> Unless I miss something obvious, the current version returns exactly
> the same thing than the one you propose -- can you double-check or let
> me know what is wrong with the current solution?

Your solution is wrong when there is a “%” not immediately followed by “(”:

On Sat, Aug 11, 2012 at 8:11 PM, Michael Brand
<michael.ch.brand@gmail.com> wrote:
> On Sat, Aug 11, 2012 at 6:55 PM, Bastien <bzg@gnu.org> wrote:
>> Michael Brand <michael.ch.brand@gmail.com> writes:
>>> [...]
>>> Also a small change against your latest patch to not stop at “%”
>>> without following “(” and possibly miss a “%(” before.

A realistic example, with point somewhere between “%” and the last “)”:
“- %(capitalize "5 % less (see item \"3)\" below)\n")\n”

This can happen with a feed template containing
"- %(capitalize \"%description\")\n"
and %description expanding to
“5 % less (see item "3)" below)\n”

All problems of the example are solved:
- escaping of the quotes that surround the “3)” in string
- seemingly unbalanced parenthesis in string coming from “3)”
- newline within %(...)
- “%” not immediately followed by “(”

Michael

  reply	other threads:[~2012-08-12  9:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-16 15:53 Add the capture feature "%(sexp)" to org-feed Michael Brand
2012-06-17  2:07 ` Nick Dokos
2012-06-24 17:51   ` Michael Brand
2012-08-07 23:05     ` Bastien
2012-08-09 14:07       ` Michael Brand
2012-08-09 14:53         ` Bastien
2012-08-09 18:00           ` Michael Brand
2012-08-10  8:53             ` Bastien
2012-08-11 15:31               ` Michael Brand
2012-08-11 16:55                 ` Bastien
2012-08-11 18:11                   ` Michael Brand
2012-08-11 21:59                     ` Bastien
2012-08-12  9:37                       ` Michael Brand [this message]
2012-08-12 10:12                         ` Bastien
2012-08-09 21:09           ` Ivan Andrus
2012-08-10  4:48             ` Michael Brand
2012-08-10  7:24               ` Bastien

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=CALn3zojWXYvsO8jVUTOzPJ5LhqgjkGhY15q+Zgci3wELg9+6MQ@mail.gmail.com \
    --to=michael.ch.brand@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /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).