From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: HTML Export doesn't handle internal link with spaces [8.0.7 (8.0.7-6-g13cb28-elpa @ /home/jbalint/.emacs.d/elpa/org-20130812/)] Date: Fri, 20 Dec 2013 22:47:52 +0100 Message-ID: <87sitnjit3.fsf@gmail.com> References: <87zjo034l8.wl%jbalint@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu7v6-0008DX-V7 for emacs-orgmode@gnu.org; Fri, 20 Dec 2013 16:47:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vu7uv-00051v-Dw for emacs-orgmode@gnu.org; Fri, 20 Dec 2013 16:47:44 -0500 Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:46545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu7uv-00050u-6M for emacs-orgmode@gnu.org; Fri, 20 Dec 2013 16:47:33 -0500 Received: by mail-wg0-f49.google.com with SMTP id x12so2976435wgg.28 for ; Fri, 20 Dec 2013 13:47:31 -0800 (PST) In-Reply-To: <87zjo034l8.wl%jbalint@gmail.com> (Jess Balint's message of "Mon, 16 Dec 2013 14:48:03 -0600") 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: Jess Balint Cc: emacs-orgmode@gnu.org Hello, Jess Balint writes: > I've generated a link to a headline with `org-store-link' and > `org-insert-link'. It's rendered into the Org file like so: > > [[*Headline%20with%Spaces][Headline with Spaces]] > [...] > The problem is in `org-export-resolve-fuzzy-link' which get's the path > directly from the link: > > (let* ((raw-path (org-element-property :path link)) > > But at this point it has "%20" in it which causes a problem when > splitting it: > > ;; Split PATH at white spaces so matches are space > ;; insensitive. > (path (org-split-string > (if match-title-p (substring raw-path 1) raw-path))) > Thank you for the report. This bug exists because `org-insert-link' blindly url-hexifies links, but nothing will unhexify it before it reaches an export back-end. This is difficult to solve, because if you unhexify it, the very same bug will occur on the other side (i.e. links you paste without using `org-insert-link', which you don't want to unhexify). IMO, `org-insert-link' shouldn't hexify links in all situations (if at all). Anyway, I can't think of any satisfactory solution at the moment. Regards, -- Nicolas Goaziou