Re: [O] intra links and worg
Hi Alan, Alan Schmitt alan.schm...@polytechnique.org writes: Ah, thanks, I see now. It does work indeed. I've now applied a slightly modified version of the patch I sent. Thanks, -- Bastien
Re: [O] intra links and worg
Bastien b...@gnu.org writes: Hi Alan, Alan Schmitt alan.schm...@polytechnique.org writes: I tried it and it does not change anything on worg. The purpose of the patch is so that C-c C-l on a headline will then insert a link without escaping whitespaces: * Headline with whitespaces [[*Headline with whitespaces][Headline with whitespaces]] Whereas now it does this: * Headline with whitespaces [[*Headline%20with%20whitespaces][Headline with whitespaces]] So if Worg pages contain escaped sequences, they will be exported with italics. Ah, thanks, I see now. It does work indeed. Alan
Re: [O] intra links and worg
Hi Alan, if you can, please test this quick patch. All tests pass fine but it's not the definitive patch as there are other issues in this areas we need to check first. But tests will help, as always. Thanks! diff --git a/lisp/org.el b/lisp/org.el index 27aeccb..50fa5ce 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9834,17 +9834,18 @@ If optional argument MERGE is set, merge TABLE into (setq table (cons defchr table org-link-escape-chars)) ((null table) (setq table org-link-escape-chars))) - (mapconcat - (lambda (char) - (if (or (member char table) - (and (or ( char 32) (= char ?\%) ( char 126)) - org-url-hexify-p)) - (mapconcat (lambda (sequence-element) - (format %%%.2X sequence-element)) - (or (encode-coding-char char 'utf-8) - (error Unable to percent escape character: %s - (char-to-string char))) ) - (char-to-string char))) text )) + (if (string-match ^\*[[:alnum:]]+ text) text +(mapconcat + (lambda (char) + (if (or (member char table) + (and (or ( char 32) (= char ?\%) ( char 126)) + org-url-hexify-p)) + (mapconcat (lambda (sequence-element) + (format %%%.2X sequence-element)) + (or (encode-coding-char char 'utf-8) + (error Unable to percent escape character: %s + (char-to-string char))) ) + (char-to-string char))) text ))) (defun org-link-escape-browser (text) (if (org-string-match-p -- Bastien
Re: [O] intra links and worg
Hi Bastien, Bastien b...@gnu.org writes: Hi Alan, if you can, please test this quick patch. All tests pass fine but it's not the definitive patch as there are other issues in this areas we need to check first. But tests will help, as always. I tried it and it does not change anything on worg. It works on a simple test file, but I'm wondering if some file specific options for worg may change this. Here is the header with which I'm trying this: --8---cut here---start-8--- #+OPTIONS:H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc todo:nil #+STARTUP:align fold nodlcheck hidestars oddeven lognotestate #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@) #+TAGS: Write(w) Update(u) Fix(f) Check(c) #+TITLE: Creating letters with KOMA-Script =scrlttr2= and Org-mode #+AUTHOR: Viktor Rosenfeld and Rasmus Pank Roulund #+EMAIL: v.rosenf...@gmx.de #+LANGUAGE: en #+PRIORITIES: A C B #+CATEGORY: worg --8---cut here---end---8--- Thanks, Alan
Re: [O] intra links and worg
Hi Alan, Alan Schmitt alan.schm...@polytechnique.org writes: I tried it and it does not change anything on worg. The purpose of the patch is so that C-c C-l on a headline will then insert a link without escaping whitespaces: * Headline with whitespaces [[*Headline with whitespaces][Headline with whitespaces]] Whereas now it does this: * Headline with whitespaces [[*Headline%20with%20whitespaces][Headline with whitespaces]] So if Worg pages contain escaped sequences, they will be exported with italics. -- Bastien