emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org unique id behavior changed?
@ 2017-02-02 16:27 John Hendy
  2017-02-03 22:23 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: John Hendy @ 2017-02-02 16:27 UTC (permalink / raw)
  To: emacs-orgmode

I just tried to recreate a unique id link from the mailing list and
was surprised to find that =C-c l= did not create a unique id
automatically.

From the manual:[1]

C-c l     (org-store-link)
...
If the headline has a CUSTOM_ID property, a link to this custom ID
will be stored. In addition or alternatively (depending on the value
of org-id-link-to-org-use-id), a globally unique ID property will be
created and/or used to construct a link (jwh adding: if org-id is
loaded).



Here's my min config:

#+begin_example

(add-to-list 'load-path "~/.elisp/org/lisp/")
(add-to-list 'load-path "~/.elisp/org/contrib/lisp")

(require 'org-id)
(global-set-key "\C-cl" 'org-store-link)
(setq org-link-to-org-use-id 'create-if-interactive)

#+end_example


Starting emacs with =emacs -Q= and then =M-x load-file ~/path/to/min-config=


File:

#+begin_example

* Alcohol^

Something

\newpage

* Another heading

Blah blah blah, see

#+end_example



With cursor at ^, I do =C-c l= and get this in the mini-buffer:
=Stored: Alcohol=

When trying to insert with =C-c C-l= I get this auto-completion suggestion:

Alcohol                                      <file:~/Desktop/test.org::*Alcohol>

Normally that would have a unique-id, not file path/headline.

Org mode version 9.0.2 (release_9.0.2-140-g1c8908 @
/home/jwhendy/.elisp/org/lisp/)

Is this on my end (settings) or did something change? Doing this
definitely used to generate a unique id property drawer under the
linked headline and suggest it when going to insert the link
elsewhere.


Thanks,
John

[1] http://orgmode.org/manual/Handling-links.html#Handling-links

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org unique id behavior changed?
  2017-02-02 16:27 Org unique id behavior changed? John Hendy
@ 2017-02-03 22:23 ` Nicolas Goaziou
  2017-02-03 22:52   ` John Hendy
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2017-02-03 22:23 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

Hello,

John Hendy <jw.hendy@gmail.com> writes:

> I just tried to recreate a unique id link from the mailing list and
> was surprised to find that =C-c l= did not create a unique id
> automatically.
>
> From the manual:[1]
>
> C-c l     (org-store-link)
> ...
> If the headline has a CUSTOM_ID property, a link to this custom ID
> will be stored. In addition or alternatively (depending on the value
> of org-id-link-to-org-use-id), a globally unique ID property will be
> created and/or used to construct a link (jwh adding: if org-id is
> loaded).
>
>
>
> Here's my min config:
>
> #+begin_example
>
> (add-to-list 'load-path "~/.elisp/org/lisp/")
> (add-to-list 'load-path "~/.elisp/org/contrib/lisp")
>
> (require 'org-id)
> (global-set-key "\C-cl" 'org-store-link)
> (setq org-link-to-org-use-id 'create-if-interactive)
>
> #+end_example
>
>
>
> Starting emacs with =emacs -Q= and then =M-x load-file ~/path/to/min-config=
>
>
> File:
>
> #+begin_example
>
> * Alcohol^
>
> Something
>
> \newpage
>
> * Another heading
>
> Blah blah blah, see
>
> #+end_example
>
>
>
> With cursor at ^, I do =C-c l= and get this in the mini-buffer:
> =Stored: Alcohol=
>
> When trying to insert with =C-c C-l= I get this auto-completion suggestion:
>
> Alcohol                                      <file:~/Desktop/test.org::*Alcohol>
>
> Normally that would have a unique-id, not file path/headline.
>
> Org mode version 9.0.2 (release_9.0.2-140-g1c8908 @
> /home/jwhendy/.elisp/org/lisp/)
>
> Is this on my end (settings) or did something change? Doing this
> definitely used to generate a unique id property drawer under the
> linked headline and suggest it when going to insert the link
> elsewhere.

FWIW, I cannot reproduce this issue.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org unique id behavior changed?
  2017-02-03 22:23 ` Nicolas Goaziou
@ 2017-02-03 22:52   ` John Hendy
  0 siblings, 0 replies; 3+ messages in thread
From: John Hendy @ 2017-02-03 22:52 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On Fri, Feb 3, 2017 at 4:23 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
> John Hendy <jw.hendy@gmail.com> writes:
>
>> I just tried to recreate a unique id link from the mailing list and
>> was surprised to find that =C-c l= did not create a unique id
>> automatically.
>>
>> From the manual:[1]
>>
>> C-c l     (org-store-link)
>> ...
>> If the headline has a CUSTOM_ID property, a link to this custom ID
>> will be stored. In addition or alternatively (depending on the value
>> of org-id-link-to-org-use-id), a globally unique ID property will be
>> created and/or used to construct a link (jwh adding: if org-id is
>> loaded).
>>
>>
>>
>> Here's my min config:
>>
>> #+begin_example
>>
>> (add-to-list 'load-path "~/.elisp/org/lisp/")
>> (add-to-list 'load-path "~/.elisp/org/contrib/lisp")
>>
>> (require 'org-id)
>> (global-set-key "\C-cl" 'org-store-link)
>> (setq org-link-to-org-use-id 'create-if-interactive)
>>
>> #+end_example
>>
>>
>>
>> Starting emacs with =emacs -Q= and then =M-x load-file ~/path/to/min-config=
>>
>>
>> File:
>>
>> #+begin_example
>>
>> * Alcohol^
>>
>> Something
>>
>> \newpage
>>
>> * Another heading
>>
>> Blah blah blah, see
>>
>> #+end_example
>>
>>
>>
>> With cursor at ^, I do =C-c l= and get this in the mini-buffer:
>> =Stored: Alcohol=
>>
>> When trying to insert with =C-c C-l= I get this auto-completion suggestion:
>>
>> Alcohol                                      <file:~/Desktop/test.org::*Alcohol>
>>
>> Normally that would have a unique-id, not file path/headline.
>>
>> Org mode version 9.0.2 (release_9.0.2-140-g1c8908 @
>> /home/jwhendy/.elisp/org/lisp/)
>>
>> Is this on my end (settings) or did something change? Doing this
>> definitely used to generate a unique id property drawer under the
>> linked headline and suggest it when going to insert the link
>> elsewhere.
>
> FWIW, I cannot reproduce this issue.

Wow. I just wrote a response re-replicating my behavior and then went
to check the value of the variable to be sure!

org-id-link-to-org-use-id is a variable defined in ‘org-id.el’.
Its value is nil

That's interesting. So what did I set in my config??

(setq org-link-to-org-use-id 'create-if-interactive)

I changed to the correct variable name and all is well. Sorry for the
noise; it appears this is a super old variant of the variable based on
references I find on the web:
- http://git.net/ml/emacs-orgmode-gnu/2012-04/msg01203.html
- http://orgmode.org/w/?p=org-mode.git;a=commitdiff_plain;h=4b4328e29b2c286505c7f0be0e54a37a8d1fbc75

I must not have caught a change at some point but I *swear* it was
working within the last year.


John

>
> Regards,
>
> --
> Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-03 22:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 16:27 Org unique id behavior changed? John Hendy
2017-02-03 22:23 ` Nicolas Goaziou
2017-02-03 22:52   ` John Hendy

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).