emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug] Setting org-id-link-to-org-use-id to t creates IDs properties


From: Jonathan McHugh
Subject: Re: [bug] Setting org-id-link-to-org-use-id to t creates IDs properties when tangling
Date: Sat, 10 Jul 2021 18:39:17 +0000

Hi Rodrigo,

Regarding the problem of large content volumes and unique identifiers I thought 
Id CC Jean Marc Louis.

He has been building an Emacs approach to Hyperscope and has been considering 
this facet (and others). 
=> https://hyperscope.link/

Perhaps he may have some input?


Jonathan McHugh
====================
indieterminacy@libre.brussels

July 10, 2021 12:36 PM, "Rodrigo Morales" <rodrigo.morales@utec.edu.pe> wrote:

> * The issue
> 
> When setting org-id-link-to-org-use-id to t, an :ID: property is created
> for each headline that contain at least one code block that is
> tangled.
> 
> * Reproducing this issue
> 
> 1. Start emacs -Q
> 
> 2. Open a "*.org" file at a location where you have write permissions
> (this is because, apparently, tangling only works when the file is
> correctly saved so this way we get rid of this possible issue)
> 
> 3. Insert the following minimal working example into the buffer (you can
> find the Org Mode file attached to this mail)
> 
> #+BEGIN_SRC org
> ,* foo
> 
> ,#+HEADER: :tangle ~/Downloads/main.txt
> ,#+BEGIN_SRC text
> a
> ,#+END_SRC
> 
> ,* bar
> 
> ,#+HEADER: :tangle ~/Downloads/main.txt
> ,#+BEGIN_SRC text
> a
> ,#+END_SRC
> 
> ,* fizz
> 
> ,#+BEGIN_SRC text
> a
> ,#+END_SRC
> #+END_SRC
> 
> 4. Execute the following commands
> 
> #+BEGIN_SRC emacs-lisp
> (require 'org-id)
> (setq org-id-link-to-org-use-id t)
> #+END_SRC
> 
> 5. Now, execute org-babel-tangle (C-c C-v C-t).
> 
> At this point, a id property is created for the "foo" and "bar"
> headlines because those are the only headlines that contain a code
> block. This is what I got in emacs -Q
> 
> #+BEGIN_SRC org
> ,* foo
> :PROPERTIES:
> :ID: 358560b4-2426-4d42-a498-ae16195daf3a
> :END:
> 
> ,#+HEADER: :tangle ~/Downloads/main.txt
> ,#+BEGIN_SRC text
> a
> ,#+END_SRC
> 
> ,* bar
> :PROPERTIES:
> :ID: 02217461-a744-42b2-b582-1a836568d686
> :END:
> 
> ,#+HEADER: :tangle ~/Downloads/main.txt
> ,#+BEGIN_SRC text
> a
> ,#+END_SRC
> 
> ,* fizz
> 
> ,#+BEGIN_SRC text
> a
> ,#+END_SRC
> #+END_SRC
> 
> * Personal thoughts
> 
> In my opinion, this is undesired behavior because the goal of
> org-id-link-to-org-use-id isn't creating an ID property for each
> headline when performing tangling.
> 
> * Major undesired consequences
> 
> The following is an scenario in which this issue causes major undesired
> consequences: Consider the following scenario
> 
> + you have 1000 headlines in an Org Mode file
> 
> + all of those headlines don't have an ID property (because you are not
> interested in uniquely identifying all of those headlines through an ID)
> 
> + all of those headlines contain at least one code block that is tangled
> 
> Because of this issue, the following would be added for each headline
> 
> #+BEGIN_SRC org
> ,* my headline
> :PROPERTIES:
> :ID: <<an auto-generated id>>
> :END:
> #+END_SRC
> 
> and this have the following undesired consequences
> 
> + You would end up with 3000 lines in your Org Mode file because of the
> id properties even when you weren't interested in creating an ID for
> each of those headlines.
> 
> + You would have 1000 more entries in org-id-locations-file (again, even
> where you weren't interested in creating an ID for each of those
> headlines)
> 
> -- 
> La información contenida en este e-mail y sus anexos es confidencial, 
> privilegiada y está dirigida exclusivamente a su destinatario, en 
> consecuencia, solo puede ser utilizada por aquel. Si usted no es el 
> destinatario original, no deberá examinar, usar, copiar o distribuir este 
> mensaje o la información que contiene. Si lo recibe por error, por favor 
> reenvíelo a la persona que se lo envió y elimínelo. Cualquier retención o 
> uso total o parcial no autorizada de este mensaje está estrictamente 
> prohibida y sancionada por ley.
> 
> -- 
> [[[ If you see a signature in spanish below/above this message, please
> omit it. It is automatically inserted in all my messages due to the
> internal privacy policies of the organization that owns the domain of my
> email address. ]]]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]