From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacob Gerlach Subject: Re: [PATCH] Internal Links with Spaces Date: Wed, 11 Mar 2015 09:58:19 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVh9U-0005Uk-6n for emacs-orgmode@gnu.org; Wed, 11 Mar 2015 09:58:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVh9Q-0003G5-34 for emacs-orgmode@gnu.org; Wed, 11 Mar 2015 09:58:24 -0400 Received: from mail-qc0-x231.google.com ([2607:f8b0:400d:c01::231]:37345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVh9P-0003G0-VE for emacs-orgmode@gnu.org; Wed, 11 Mar 2015 09:58:20 -0400 Received: by qcxr5 with SMTP id r5so10317333qcx.4 for ; Wed, 11 Mar 2015 06:58:19 -0700 (PDT) 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: Org-mode Hi, On Wed, Mar 11, 2015 at 9:41 AM, Nicolas Goaziou wrote: > I'm not sure to understand the problem you're trying to solve. Would you > mind giving a simple example and motivation? (Did I break the thread by adding "[PATCH]" to the subject? Apologies if so, original thread was [1]) The motivation is to allow generating standard "see section \ref{some-label}" references using org-store/insert-link. In more detail (repeating/summarizing the prior messages on original thread): Internal Links stored with org-store-link and inserted with org-insert-link fail on export for headlines with spaces because of % encoding the spaces. (This is orthogonal to the patch, just the original motivation that led to it). One solution is to use org-id. I also came up with a hack to unhex the link after it is inserted. In either case, the links inserted have descriptions. Links with descriptions always export as hyperref's using the headline text (instead of regular \ref's using the label). There is no (?) way to force links with descriptions to export using regular latex \ref{}'s. John Kitchin offered two workarounds (using a custom id for every headline or manually \label'ing the headlines and \ref'ing them instead of using org links). Regards, Jake [1] https://lists.gnu.org/archive/html/emacs-orgmode/2015-03/msg00348.html