emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: Joseph Turner <joseph@breatheoutbreathe.in>, emacs-orgmode@gnu.org
Cc: rms@gnu.org
Subject: Copy info node name (was: Re: Ignore Local Variables list in source blocks)
Date: Fri, 20 Dec 2024 22:37:42 +0700	[thread overview]
Message-ID: <0dd3c8ba-ba37-4b00-9999-3b8070d7c453@gmail.com> (raw)
In-Reply-To: <87zfkr4amw.fsf@breatheoutbreathe.in>

Due to a recent texinfo thread on emacs-devel, I have added RMS to Cc.

On 20/12/2024 04:37, Joseph Turner wrote:
> Max Nikulin writes:
>> (info "(emacs) Specifying File Variables")
> By the way, is there a built-in command to copy that (info ...) sexp
> when viewing that info page?

TLDR;

"C-0 c" or "C-0 w"

Actually to get the reference above I copied and edited the file part of 
the HTTP URL

>> <https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html>

Autocompletion from browsing history in address bar is a rather 
convenient feature to quickly open some document visited earlier.

Unfortunately HTML page metadata does not contain manual and node names, 
so a browser extension that copies info references, while possible, 
would not be reliable. (I have noticed that HTML links may have extra 
data-manual="elisp" attributes without data-node conterpart.)

Back to Emacs, `org-store-link' allows to save an info link for 
insertion into an Org mode document.

However I am unaware of any command that allows to create a more precise 
reference. Enough nodes have index anchors and it may be more convenient:
<https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-_005f>
An issue with Org links to index anchors that they can not be easily 
exported to html_node variant of the texinfo document, especially if the 
manual is not installed on the machine. (E.g. sphinx puts 
machine-readable index of sections and anchors along with HTML files.)

Earlier I have not tries to find if it is possible to copy info node 
name as *a command*. Actually neither (info "(info)"), nor (info 
"(info-stnd"), nor (info "(emacs)") describe how to copy current node 
name, so the feature is a part of hidden UI. I still had an impression 
that I have seen a keybinding somewhere. This time I found it in "C-h m" 
list, it is present in "?" info help as well (of course, without details 
related to sexp).

The final step is the docstring for the "c" and "w" key bindings.

`Info-copy-current-node-name'

An advantage of the

     (info "(emacs) Specifying File Variables")

form is that it usually can be used to open specific part of the 
document in a standalone info browser. (Eli believes they are dead.)

Another feature I missed in info browsers is equivalent of browser "copy 
link" context menu option for links. It is handy to copy link for notes 
without leaving the current document.

I am not surprised that people use any option (HTTP URL, etc.), but not 
"(emacs) Specifying File Variables" form (or some dedicated URL scheme). 
The feature is hidden (and incompatible with yelp and khelpcenter).


      parent reply	other threads:[~2024-12-20 15:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18  4:13 Ignore Local Variables list in source blocks Joseph Turner
2024-12-18 17:16 ` Max Nikulin
2024-12-19 21:37   ` Joseph Turner via General discussions about Org-mode.
2024-12-20 14:46     ` Max Nikulin
2024-12-20 14:53       ` Nikolaos Chatzikonstantinou
2024-12-21  2:13         ` Joseph Turner
2024-12-21  2:13         ` Joseph Turner
2024-12-21  2:11       ` Joseph Turner
2024-12-20 15:37     ` Max Nikulin [this message]

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=0dd3c8ba-ba37-4b00-9999-3b8070d7c453@gmail.com \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=joseph@breatheoutbreathe.in \
    --cc=rms@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).