emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-store-link relative to parent headings
@ 2024-10-01 23:24 a4ofubmq
  2024-10-13 11:19 ` [FR] Allow searching by outline path in file: links to Org files [file:<filename::*parent heading::*child] (was: org-store-link relative to parent headings) Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: a4ofubmq @ 2024-10-01 23:24 UTC (permalink / raw)
  To: emacs-orgmode

I'd like to propose an alternative method to format links (org-store-
link) that would include parents of a heading. For example in a
document like this:

* heading 1
** subheading 1
* heading 2
** subheading 1

there is ambiguity right now if you want to org-store-link to heading 2
> subheading 1. By default org stores
[[file:<FILENAME>::*subheading1]], which would incorrectly point to
heading 1.

Instead it could be [[file:<FILENAME>::*heading 2**subheading1]]

Please let me know what you think, if this has been already suggested.
I know that you could create unique UUID in PROPERTIES, but wouldn't it
be more informative if org-store-link used parent headings instead? I
think it would be more elegant and not dissimilar from other popular
addressing schemes (e.g. file paths or urls).

reference stackoverflow question:
https://emacs.stackexchange.com/questions/82234/org-store-link-relative-to-parent?noredirect=1#comment138536_82234



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

* [FR] Allow searching by outline path in file: links to Org files [file:<filename::*parent heading::*child] (was: org-store-link relative to parent headings)
  2024-10-01 23:24 org-store-link relative to parent headings a4ofubmq
@ 2024-10-13 11:19 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-10-13 11:19 UTC (permalink / raw)
  To: a4ofubmq; +Cc: emacs-orgmode

a4ofubmq@anonaddy.com writes:

> there is ambiguity right now if you want to org-store-link to heading 2
>> subheading 1. By default org stores
> [[file:<FILENAME>::*subheading1]], which would incorrectly point to
> heading 1.
>
> Instead it could be [[file:<FILENAME>::*heading 2**subheading1]]
>
> Please let me know what you think, if this has been already suggested.
> I know that you could create unique UUID in PROPERTIES, but wouldn't it
> be more informative if org-store-link used parent headings instead? I
> think it would be more elegant and not dissimilar from other popular
> addressing schemes (e.g. file paths or urls).

I think that such feature does make sense.
In a way, we already use something similar in org-refile - search by
outline path.

I am not sure if I like the format you proposed though.
Maybe we can instead try to implement nested search options. Something
like [file:<filename>::*heading 2::*subheading1]

You may refer to the existing code in `org-id-open' that allows to
narrow down link search to an existing subtree.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2024-10-13 11:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 23:24 org-store-link relative to parent headings a4ofubmq
2024-10-13 11:19 ` [FR] Allow searching by outline path in file: links to Org files [file:<filename::*parent heading::*child] (was: org-store-link relative to parent headings) Ihor Radchenko

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