emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jacob Gerlach <jacobgerlach@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: Leo Ufimtsev <lufimtse@redhat.com>, Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Internal Links with Spaces
Date: Tue, 10 Mar 2015 10:39:54 -0400	[thread overview]
Message-ID: <CAA6UvuE2dKhVkh10Dqf+wYKdUh6jA6a01jXz1rdr-tHmWmeqAQ@mail.gmail.com> (raw)
In-Reply-To: <m2wq2p92dy.fsf@andrew.cmu.edu>

On Mon, Mar 9, 2015 at 7:28 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> I think you need to set
>
> (setq org-id-link-to-org-use-id 'create-if-interactive)

Indeed, this is a variation of what Leo suggested and customizing
org-id-link-to-org-use-id is almost working for me...

Unfortunately, I want the links to export to latex using latex
\ref{}'s and section labels. A link stored with a custom id has to
have a description to have a reasonably readable org buffer, but links
with descriptions are exported using the headline text instead of the
section number. Is there a workaround for this?

On Mon, Mar 9, 2015 at 4:50 PM, Jacob Gerlach <jacobgerlach@gmail.com> wrote:
> When exploring this, I found the function org-id-store-link. This
> seemed like what I wanted - it creates a custom ID if one doesn't
> exist, but it doesn't actually store a link (or at least, it wasn't
> available when I then ran org-insert-link). The docstring is pretty
> light, but it seems like this might be a bug. Is this the expected
> behavior?

After perusing the source code further, I think that my confusion
about org-id-store-link arose because this function isn't intended to
be called on it's own (it's called by org-store-link when appropriate
based on the value of org-id-link-to-org-use-id).

I've seen a double hyphen in function names to sometimes indicate
internal functions. Would this function be more appropriately named
org-id--store-link or am I misunderstanding the convention?



Regards,
Jake

  parent reply	other threads:[~2015-03-10 14:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 13:05 Internal Links with Spaces Jacob Gerlach
2015-03-09 14:38 ` Leo Ufimtsev
2015-03-09 20:50   ` Jacob Gerlach
2015-03-09 23:28     ` John Kitchin
     [not found]       ` <CAA6UvuEG_9b0+b=boXMSsi+8yZWZORBkMAfgKj+9rhPpuevsgQ@mail.gmail.com>
2015-03-10 14:30         ` John Kitchin
2015-03-10 14:39       ` Jacob Gerlach [this message]
     [not found]         ` <m2egowj0h7.fsf@andrew.cmu.edu>
2015-03-10 19:47           ` Jacob Gerlach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA6UvuE2dKhVkh10Dqf+wYKdUh6jA6a01jXz1rdr-tHmWmeqAQ@mail.gmail.com \
    --to=jacobgerlach@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=lufimtse@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).