From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takafumi Arakaki Subject: Re: [PATCH] Escape slashes in ARCHIVE_OLPATH Date: Fri, 9 Nov 2012 14:26:17 +0100 Message-ID: References: <87ip9fjgrj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWobX-0006OZ-1r for emacs-orgmode@gnu.org; Fri, 09 Nov 2012 08:26:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TWobW-0002Yn-2i for emacs-orgmode@gnu.org; Fri, 09 Nov 2012 08:26:39 -0500 Received: from mail-qc0-f169.google.com ([209.85.216.169]:40363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWobV-0002Yj-Uu for emacs-orgmode@gnu.org; Fri, 09 Nov 2012 08:26:38 -0500 Received: by mail-qc0-f169.google.com with SMTP id t2so3051983qcq.0 for ; Fri, 09 Nov 2012 05:26:37 -0800 (PST) In-Reply-To: <87ip9fjgrj.fsf@gmail.com> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org I am not familiar with org-mode test suite but I can try. Could you tell me where I can find similar test cases which creates archive entries? --- Takafumi On Fri, Nov 9, 2012 at 9:57 AM, Nicolas Goaziou wrote: > 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