From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Re: CUSTOM_ID vs ID Date: Fri, 2 Aug 2019 09:53:31 -0500 Message-ID: References: <87k1c2mvfq.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000037fac9058f2386b7" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44232) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htYwE-0003b1-Id for emacs-orgmode@gnu.org; Fri, 02 Aug 2019 10:53:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htYwB-00074j-EV for emacs-orgmode@gnu.org; Fri, 02 Aug 2019 10:53:46 -0400 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]:36149) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htYwA-00074L-U9 for emacs-orgmode@gnu.org; Fri, 02 Aug 2019 10:53:43 -0400 Received: by mail-io1-xd32.google.com with SMTP id o9so49159602iom.3 for ; Fri, 02 Aug 2019 07:53:42 -0700 (PDT) In-Reply-To: <87k1c2mvfq.fsf@nicolasgoaziou.fr> 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" To: Nathan Neff , emacs-orgmode --00000000000037fac9058f2386b7 Content-Type: text/plain; charset="UTF-8" On Sun, Jul 28, 2019 at 3:10 AM Nicolas Goaziou wrote: > Hello, > > Nathan Neff writes: > > > I've often been confused why org-mode has both a CUSTOM_ID > > and a ID property. I mean, why not just use one or the other name? > > Custom ID are user-defined, and only meaningful in the scope of the > document. Also, they may appear as-is when exported, e.g., as an anchor > in HTML. > > ID are (or should be) generated by Org, and are valid across files, > which means they need to be absolutely unique. > > Org keeps track of ID if `org-id-track-globally' is non-nil (the > default). If this is nil, there is almost no difference between ID and > custom ID. > > > When would I ever have both an ID and a CUSTOM_ID property for > > a heading? > > You may want to refer to a heading from anywhere with id:... but need > a clean anchor in HTML export, for example. > > FWIW, I never use ID property. > Hi Nicolas, Ah yes, I remember when I was exporting to HTML and would have both properties. Thank you. Also, I think I will stick with ID purely because I want links which span multiple org mode files. I also plan to learn some more Emacs Lisp to make this link creation thing a bit easier. I know there's been efforts to get org to behave a lot like a Wiki (which I think it already does): https://orgmode.org/worg/org-blog-wiki.html I'd like to mess with Helm and get a custom helm source. org-insert-link can already use Helm, but it could be improved a bit. * Show the IDs (*and* headings :-) of recently created links (because you know, the IDs are hash codes (grumble grumble). Currently Helm just shows the IDs :-( * Show a second Helm list of headings (perhaps all headings in org-mode files) - If heading already has an ID, then simply use that ID. * Provide a context menu, where you can choose to create an ID - Provide a mini buffer to *specify* an ID (evil laugh). Default action will create an ID Thanks, --Nate > > Regards, > > -- > Nicolas Goaziou > --00000000000037fac9058f2386b7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Jul 28, 2019= at 3:10 AM Nicolas Goaziou <m= ail@nicolasgoaziou.fr> wrote:
Hello,

Nathan Neff <= nathan.neff@gmail.com> writes:

> I've often been confused why org-mode has both a CUSTOM_ID
> and a ID property.=C2=A0 I mean, why not just use one or the other nam= e?

Custom ID are user-defined, and only meaningful in the scope of the
document. Also, they may appear as-is when exported, e.g., as an anchor
in HTML.

ID are (or should be) generated by Org, and are valid across files,
which means they need to be absolutely unique.=C2=A0

Org keeps track of ID if `org-id-track-globally' is non-nil (the
default). If this is nil, there is almost no difference between ID and
custom ID.

> When would I ever have both an ID and a CUSTOM_ID property for
> a heading?

You may want to refer to a heading from anywhere with id:... but need
a clean anchor in HTML export, for example.

FWIW, I never use ID property.

Hi Nicol= as,

Ah yes, I remember when I was exporting to HTM= L and would have
both properties.=C2=A0 Thank you.

=
Also, I think I will stick with ID purely because I want links w= hich
span multiple org mode files.

I als= o plan to learn some more Emacs Lisp to make this link creation
t= hing a bit easier.=C2=A0 I know there's been efforts to get org to beha= ve a lot
like a Wiki (which I think it already does):
<= a href=3D"https://orgmode.org/worg/org-blog-wiki.html">https://orgmode.org/= worg/org-blog-wiki.html

I'd like to me= ss with Helm and get a custom helm source. =C2=A0org-insert-link
= can already use Helm, but it could be improved a bit.

<= div>* Show the IDs (*and* headings :-) of recently created links (because y= ou know,
the IDs are hash codes (grumble grumble).=C2=A0 Currentl= y Helm just shows the IDs :-(

* Show a second Helm= list of headings (perhaps all headings in org-mode files)
- If h= eading already has an ID, then simply use that ID.

* Provide a context menu, where you can choose to create an ID
-= Provide a mini buffer to *specify* an ID (evil laugh).=C2=A0 Default actio= n will
create an ID

Thanks,
--= Nate


=C2=A0

Regards,

--
Nicolas Goaziou
--00000000000037fac9058f2386b7--