From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Escape slashes in ARCHIVE_OLPATH Date: Fri, 09 Nov 2012 09:57:04 +0100 Message-ID: <87ip9fjgrj.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWkSo-0003pd-Md for emacs-orgmode@gnu.org; Fri, 09 Nov 2012 04:01:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TWkSn-00080A-LO for emacs-orgmode@gnu.org; Fri, 09 Nov 2012 04:01:22 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:64686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWkSn-0007zw-1r for emacs-orgmode@gnu.org; Fri, 09 Nov 2012 04:01:21 -0500 Received: by mail-we0-f169.google.com with SMTP id u3so1973679wey.0 for ; Fri, 09 Nov 2012 01:01:20 -0800 (PST) In-Reply-To: (Takafumi Arakaki's message of "Mon, 5 Nov 2012 14:13:52 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Takafumi Arakaki Cc: emacs-orgmode@gnu.org Hello, Takafumi Arakaki 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 "/" "\\\\/" (replace-regexp-in-string "\\\\" "\\\\\\\\" s)) Regards, -- Nicolas Goaziou