From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jorge P. de Morais Neto Subject: Re: CUSTOM_ID vs ID Date: Sat, 17 Aug 2019 21:53:01 -0300 Message-ID: <87h86f8fbm.fsf@disroot.org> References: <87k1c2mvfq.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:32850) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hz9Re-00055l-KV for emacs-orgmode@gnu.org; Sat, 17 Aug 2019 20:53:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hz9Rd-0006jS-5T for emacs-orgmode@gnu.org; Sat, 17 Aug 2019 20:53:18 -0400 Received: from knopi.disroot.org ([178.21.23.139]:50436) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hz9Rc-0006iU-KP for emacs-orgmode@gnu.org; Sat, 17 Aug 2019 20:53:17 -0400 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: Nicolas Goaziou , Nathan Neff Cc: emacs-orgmode Hello, Em 2019-07-28T10:10:01+0200, Nicolas Goaziou escreveu: > 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. > >> 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. Instead of CUSTOM_ID I prefer to use a dedicated target (between double angular brackets). This way the link target is conspicuous, which reduces the chance of me inadvertently removing or moving that heading and causing dead links. One disadvantage is that it generates ugly HTML anchors. But why does Org not use the dedicated target text as an anchor? Regards -- - I am Brazilian. I hope my English is correct and I welcome feedback - Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z - Free/libre software for Android: https://f-droid.org/ - [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]