emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH v2] Re: Adding target and custom id links doesn't ask for description
Date: Mon, 12 Sep 2022 23:05:35 +0700	[thread overview]
Message-ID: <tfnlch$qmm$1@ciao.gmane.io> (raw)
In-Reply-To: <87v8psvorm.fsf@localhost>

On 12/09/2022 18:02, Ihor Radchenko wrote:
> Max Nikulin writes:
> 
>> Unfortunately, your patch does not fix the real issue. The title (not
>> nil) should be saved for link description when the heading contains the
>> CUSTOM_ID property. I tried to address it in the following patches:
>>
>> Max Nikulin. Re: Bug: org-store-link uses CUSTOM_ID instead of target
>> point. Sat, 6 Nov 2021 19:51:29 +0700.
>> https://list.orgmode.org/e2c807a7-1924-6f08-9e63-4f70aee9d3b5@gmail.com
> 
> Does it mean that my patch + the patch you linked can be used to fix the
> issue reported in this thread?

To fix the #custom_id issue it is enough to commit 2 patches from the 
linked thread: reverting the change caused duplication of stored 
#custom_id links and an alternative fix to store link to <<target>>.

As to <<target>> links, I am unsure what description should be stored 
for <<target>>. I do not think it should be heading title and I do not 
like /full/path/file.org::target that looks strange when file is 
stripped for a link to the same file, but description contains full 
path. I proposed (3rd patch) to store just "target" as description, you 
may prefer nil. Both approaches allows to bypass broken auto-desc logic 
(which I would like to remove) and to show the prompt for description.

I consider your patch as a general improvement because it allows to 
avoid description = link in more cases.



  reply	other threads:[~2022-09-12 16:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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:
  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='tfnlch$qmm$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).