emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anthony Carrico <acarrico@memebeam.org>
To: emacs-orgmode@gnu.org
Subject: [BUG] org-store-link on document title
Date: Wed, 28 Jun 2023 15:31:20 -0400	[thread overview]
Message-ID: <4c7716d8-eb38-9ea9-44cf-687c1b0b5910@memebeam.org> (raw)

On 6/28/23 12:48, Ihor Radchenko wrote:
 > I cannot reproduce.
 > Please provide more details and report this under a different email
 > subject, so that we can easily distinguish the two bugs.
 > See https://orgmode.org/manual/Feedback.html#Feedback

Ah, very sorry for the distraction on the "This link has already been 
stored" issue.

I'll describe the behavior I observe, and a more useful behavior. I'm 
not sure this constitutes an actual bug, since org-store-link isn't 
documented to work on the title line of a document.

Org mode version 9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/)
GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, 
cairo version 1.17.6) of 2023-01-02

To duplicate:

Create file test.org as in this example:
#+begin_example
#+TITLE: test org title link
#+end_example

1. go to title line of test.org, and do org-store link: 'C-c l'
2. go to new file test2.org, and do org-insert-link: 'C-c C-l M-p <RET>'

Here is the actual file test2.org produced by this method:
#+begin_example
[[file:test.org::+TITLE: test org title link]]
#+end_example

This isn't great because there is no description.

1. Expected file test2.org:
#+begin_example
[[file:test.org::+TITLE: test org title link][test org title link]]
#+end_example

Or even better:

2. Desired file test2.org:
#+begin_example
[[file:test.org][test org title link]]
#+end_example

Here the title is used as the description, and the file itself is 
linked, rather than the title line.

The second option makes more sense to me. Why? Because at the title line 
I intend to store a link to the document labeled with the title, and at 
a headline I intend to store a link to a section of the document labeled 
with the headline.

This option also produces cleaner html output (at least a few years 
ago--see org mailing list around 2020-08-06 with subject "ISSUE: Unable 
to resolve link (html export)").

-- 
Anthony Carrico


             reply	other threads:[~2023-06-28 19:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 19:31 Anthony Carrico [this message]
2023-06-28 19:56 ` [BUG] org-store-link on document title Ihor Radchenko
2023-06-28 20:05   ` Anthony Carrico
2023-06-28 20:16     ` Ihor Radchenko
2023-06-29 13:06       ` Anthony Carrico
2023-06-29 13:20         ` Ihor Radchenko
2023-06-29 15:43           ` Anthony Carrico
2023-06-29 15:54             ` Ihor Radchenko
2023-06-29 16:11               ` Anthony Carrico
2023-07-14 11:59               ` Max Nikulin

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=4c7716d8-eb38-9ea9-44cf-687c1b0b5910@memebeam.org \
    --to=acarrico@memebeam.org \
    --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).