From: Takafumi Arakaki <aka.tkf@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Escape slashes in ARCHIVE_OLPATH
Date: Mon, 5 Nov 2012 14:13:52 +0100 [thread overview]
Message-ID: <CAPM+gBQ_xo-rtGNjjybjj_4ZWC5DkYnrqnhqqpx7o8yg2Lng4g@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
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.
Takafumi
[-- Attachment #2: archive_olpath.patch --]
[-- Type: application/octet-stream, Size: 701 bytes --]
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index d41a1d3..774443f 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -219,7 +219,12 @@ this heading."
(file (abbreviate-file-name
(or (buffer-file-name (buffer-base-buffer))
(error "No file associated to buffer"))))
- (olpath (mapconcat 'identity (org-get-outline-path) "/"))
+ (olpath (mapconcat
+ (lambda (s)
+ (setq s (replace-regexp-in-string "\\\\" "\\\\\\\\" s))
+ (setq s (replace-regexp-in-string "/" "\\\\/" s))
+ s)
+ (org-get-outline-path) "/"))
(time (format-time-string
(substring (cdr org-time-stamp-formats) 1 -1)
(current-time)))
next reply other threads:[~2012-11-05 13:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-05 13:13 Takafumi Arakaki [this message]
2012-11-09 8:57 ` [PATCH] Escape slashes in ARCHIVE_OLPATH Nicolas Goaziou
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPM+gBQ_xo-rtGNjjybjj_4ZWC5DkYnrqnhqqpx7o8yg2Lng4g@mail.gmail.com \
--to=aka.tkf@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.