Re: [O] [PATCH] Escape slashes in ARCHIVE_OLPATH
Hello, Takafumi Arakaki aka@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 / / (replace-regexp-in-string s)) Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Escape slashes in ARCHIVE_OLPATH
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 n.goaz...@gmail.com wrote: Hello, Takafumi Arakaki aka@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 / / (replace-regexp-in-string s)) Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Escape slashes in ARCHIVE_OLPATH
Takafumi Arakaki aka@gmail.com writes: 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? We use ERT. There is no test case related to archive entries yet. Though, if you write a recipe to reproduce a problem, I can make a test out of it. You can also try to implement the test directly. It should go to testing/lisp/test-org-archive.el (to be created). Your call. Regards,
Re: [O] [PATCH] Escape slashes in ARCHIVE_OLPATH
I thought it would be convenient if there was a macro or something to setup temporal main org file and temporal archive file. If there is nothing like that, then I will just create by my self or use unwind-protect or something directly. I remember there is a way to archive in the same file by specifying a root tree. This will make test easier, but I guess it is better to test with a plain configuration first. Takafumi On Fri, Nov 9, 2012 at 2:28 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Takafumi Arakaki aka@gmail.com writes: 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? We use ERT. There is no test case related to archive entries yet. Though, if you write a recipe to reproduce a problem, I can make a test out of it. You can also try to implement the test directly. It should go to testing/lisp/test-org-archive.el (to be created). Your call. Regards,
Re: [O] [PATCH] Escape slashes in ARCHIVE_OLPATH
Takafumi Arakaki aka@gmail.com writes: I thought it would be convenient if there was a macro or something to setup temporal main org file and temporal archive file. If there is nothing like that, then I will just create by my self or use unwind-protect or something directly. I remember there is a way to archive in the same file by specifying a root tree. This will make test easier, but I guess it is better to test with a plain configuration first. Use something like: (org-test-with-temp-text #+ARCHIVE: ::... ...) in order to archive in the same file. Regards,
[O] [PATCH] Escape slashes in ARCHIVE_OLPATH
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 archive_olpath.patch Description: Binary data