emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Takafumi Arakaki <aka.tkf@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Escape slashes in ARCHIVE_OLPATH
Date: Fri, 09 Nov 2012 09:57:04 +0100	[thread overview]
Message-ID: <87ip9fjgrj.fsf@gmail.com> (raw)
In-Reply-To: <CAPM+gBQ_xo-rtGNjjybjj_4ZWC5DkYnrqnhqqpx7o8yg2Lng4g@mail.gmail.com> (Takafumi Arakaki's message of "Mon, 5 Nov 2012 14:13:52 +0100")


Takafumi Arakaki <aka.tkf@gmail.com> writes:

> Currently information about tree structure is lost if you have a slash
> in node headings.  This patch fixes the problem by escaping slashes in
> headings before concatenating them.

Thanks for your patch.

Would you mind providing a test-case to illustrate the problem? Also,
could you provide a change log entry for the patch (and use git
format-patch if possible)?

> +	    (olpath (mapconcat
> +		     (lambda (s)
> +		       (setq s (replace-regexp-in-string "\\\\" "\\\\\\\\" s))
> +		       (setq s (replace-regexp-in-string "/" "\\\\/" s))
> +		       s)

I'd rather nest the `replace-regexp-in-string' instead of setq'ing twice
in a row the same variable. I.e:

   "/" "\\\\/" (replace-regexp-in-string "\\\\" "\\\\\\\\" s))


Nicolas Goaziou

  reply	other threads:[~2012-11-09  9:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05 13:13 [PATCH] Escape slashes in ARCHIVE_OLPATH Takafumi Arakaki
2012-11-09  8:57 ` Nicolas Goaziou [this message]
2012-11-09 13:26   ` Takafumi Arakaki
2012-11-09 13:28     ` Nicolas Goaziou
2012-11-09 14:41       ` Takafumi Arakaki
2012-11-09 15:27         ` Nicolas Goaziou

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:

  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=87ip9fjgrj.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=aka.tkf@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).