emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Adding target and custom id links doesn't ask for description
Date: Tue, 2 Aug 2022 14:44:58 -0300	[thread overview]
Message-ID: <D99A712C-18D1-4A4F-8093-35A0BFB469C4@gmail.com> (raw)

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:




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)

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

Best regards

             reply	other threads:[~2022-08-02 17:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 17:44 Carlos Pita [this message]
2022-08-02 18:58 ` Adding target and custom id links doesn't ask for description 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

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:

  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=D99A712C-18D1-4A4F-8093-35A0BFB469C4@gmail.com \
    --to=carlosjosepita@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).