[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request - a plain @ref command
From: |
Thien-Thi Nguyen |
Subject: |
Re: Feature request - a plain @ref command |
Date: |
Sun, 05 Mar 2017 08:46:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
() Eli Zaretskii <address@hidden>
() Sat, 04 Mar 2017 16:29:43 +0200
Cross-references are not only for symbols in the index.
True, generally. The suggestion is oriented towards OP's
specific use-case, a high-density listing of symbols, all of
which appear to be API elements.
Here's a more general version (w/ more general name):
(defun Info-index-topic-at-point ()
"Do ‘Info-index’ on the topic at point.
If the region is active, use its text as the topic.
Otherwise, use the symbol at point as the topic."
(interactive)
(Info-index
(if (region-active-p)
;; TODO: strip leading/trailing whitespace
;; TODO: normalize internal whitespace
(buffer-substring-no-properties
(region-beginning) (region-end))
(thing-at-point 'symbol))))
Thanks for the inspiration! :-D
I've just skimmed the ‘interactive’ form of ‘Info-index’ and
suppose another approach (instead of adding a command) is to
extend ‘Info-index’ to be region-aware. That would allow an
opportunity to further refine TOPIC. Personally, i like the
immediacy (w/o further interaction) of grabbing the topic at
point. Perhaps ‘Info-index-jump-to-topic’ would be a better
name, especially as "j" is still unbound in ‘Info-mode-map’.
Anyway, this is probably only marginally on-topic for Texinfo.
I'll continue Emacs-side discussion elsewhere.
--
Thien-Thi Nguyen -----------------------------------------------
(defun responsep (query)
(pcase (context query)
(`(technical ,ml) (correctp ml))
...)) 748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502
signature.asc
Description: PGP signature