From: Juri Linkov <juri@linkov.net>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: dmitry@gutov.dev, Eli Zaretskii <eliz@gnu.org>, 74792@debbugs.gnu.org
Subject: bug#74792: 29.2.50; goto-address-mode should support RET in special-mode buffers
Date: Mon, 16 Dec 2024 19:54:43 +0200 [thread overview]
Message-ID: <87seqnecnw.fsf@mail.linkov.net> (raw)
In-Reply-To: <87a5d06ntm.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 13 Dec 2024 09:31:49 +0200")
> For a long time I had been using RET to scroll by one line in Info:
>
> (define-key Info-mode-map [return]
> (lambda ()
> (interactive)
> (if nil ;; TODO: add predicate to check if point is on Info refs
> (Info-follow-nearest-node)
> (View-scroll-line-forward))))
>
> But still can't find a predicate that would prevent RET from visiting
> a reference only when the cursor moves to it while scrolling.
> And don't believe this is possible. So need to use other
> less intuitive keys to visit links.
I forgot about other futile attempts to find a suitable heuristic:
(define-key gnus-article-mode-map [return] 'my-gnus-article-press-or-scroll)
(defun my-gnus-article-press-or-scroll ()
(interactive)
;; When point is at the bottom of the window while scrolling
(if (eq (point) (save-excursion (move-to-window-line -1) (point)))
(View-scroll-line-forward)
(gnus-article-press-button)))
Here the button is pressed when point is not at the bottom,
because point moves to the bottom while scrolling.
But in `emacs -Q` I see that point remains at the top
while scrolling. So this behavior depends on customization.
next prev parent reply other threads:[~2024-12-16 17:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 16:10 bug#74792: 29.2.50; goto-address-mode should support RET in special-mode buffers Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-11 17:09 ` Eli Zaretskii
2024-12-11 17:39 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-11 18:55 ` Eli Zaretskii
2024-12-12 16:35 ` Juri Linkov
2024-12-12 20:47 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-13 7:31 ` Juri Linkov
2024-12-16 17:54 ` Juri Linkov [this message]
2024-12-12 23:20 ` Dmitry Gutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87seqnecnw.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=74792@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
--cc=eliz@gnu.org \
--cc=sbaugh@janestreet.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.