all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Adding target and custom id links doesn't ask for description
@ 2022-08-02 17:44 Carlos Pita
  2022-08-02 18:58 ` Carlos Pita
  2022-08-10  5:39 ` [PATCH] " Ihor Radchenko
  0 siblings, 2 replies; 13+ messages in thread
From: Carlos Pita @ 2022-08-02 17:44 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

When storing a <<target>> or CUSTOM_ID link with org-store-link and then adding it with C-c C-l, org doesn’t ask for a description but automatically inserts an ugly description like:

    ~/Desktop/Org/captures.org::target

or:

    ~/Desktop/Org/captures.org::#7EFBCEA1-0D17-45B9-A125-10FE581752F8

The entire path is inserted even when the target itself is simply “target”. But, more importantly, no chance to change the description is given to the user.

This behavior is not observed when an ID link is stored, which seems pretty inconsistent since there is no clear difference wrt the CUSTOM_ID case.

The inconvenience of this behavior and the inconsistent treatment of ID vs CUSTOM_ID makes me believe that this is not intended but a bug (perhaps a regression, but I’ve not been using org-mode for long enough to say).

The source of this behavior is in org-store-link:

        ;; If store function actually set `:description' property, use
        ;; it, even if it is nil.  Otherwise, fallback to link value.
	(setq desc (if (plist-member org-store-link-plist :description)
                       (plist-get org-store-link-plist :description)
		     link)))

so that auto-desc is later assumed in org-insert-link, even then the store function has provided no description at all!

Best regards
—
Carlos




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

end of thread, other threads:[~2022-09-13 13:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-02 17:44 Adding target and custom id links doesn't ask for description Carlos Pita
2022-08-02 18:58 ` Carlos Pita
2022-08-03 11:35   ` Max Nikulin
2022-08-10  5:39 ` [PATCH] " Ihor Radchenko
2022-08-10 12:30   ` Carlos Pita
2022-08-11 15:50     ` Max Nikulin
2022-08-12 19:18       ` Carlos Pita
2022-08-13  5:01         ` [PATCH v2] " Ihor Radchenko
2022-08-14  9:53           ` Max Nikulin
2022-09-11 13:18             ` Max Nikulin
2022-09-12 11:02               ` Ihor Radchenko
2022-09-12 16:05                 ` Max Nikulin
2022-09-13 13:08           ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.