emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Jonathan McHugh" <indieterminacy@libre.brussels>
To: "Rodrigo Morales" <rodrigo.morales@utec.edu.pe>, emacs-orgmode@gnu.org
Cc: bugs@gnu.support
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	[thread overview]
Message-ID: <9eb31da73b12fcaf6820484834cc8cd3@libre.brussels> (raw)
In-Reply-To: <87tul2ihhy.fsf@utec.edu.pe>

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	other threads:[~2021-07-10 18:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10 10:35 [bug] Setting org-id-link-to-org-use-id to t creates IDs properties when tangling Rodrigo Morales
2021-07-10 18:39 ` Jonathan McHugh [this message]
2021-07-11 12:28 ` [PATCH] " Ihor Radchenko
2021-09-26  6:59   ` Bastien
2023-07-29  7:01     ` Ihor Radchenko
2023-08-08 12:56       ` Ihor Radchenko

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=9eb31da73b12fcaf6820484834cc8cd3@libre.brussels \
    --to=indieterminacy@libre.brussels \
    --cc=bugs@gnu.support \
    --cc=emacs-orgmode@gnu.org \
    --cc=rodrigo.morales@utec.edu.pe \
    /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).