GNU bug report logs -
#74792
29.2.50; goto-address-mode should support RET in special-mode buffers
Previous Next
Full log
View this message in rfc822 format
>> Typing just RET would be more intuitive, but indeed there is a problem
>> that e.g. 'C-h C-t RET RET RET ...' will scroll lines one by one
>> until this line becomes current:
>>
>> https://www.gnu.org/licenses/why-assign.html
>>
>> Then RET will surprisingly visit that URL.
>>
>> Unfortunately, an option can't help because most users might want to
>> enable it, but only if it doesn't misfire in unexpected situations.
>
> True. Perhaps it should be enabled buffer-locally, then. Then a user
> can set it in a major-mode hook - and if a major-mode does not bind RET
> to something else, the major-mode can just enable it.
This means disabling RET on links in etc/TODO and all other
link-rich files that use 'view-help-file':
(defun describe-distribution ()
"Display info on how to obtain the latest version of GNU Emacs."
(interactive)
(view-help-file "DISTRIB"))
(defun describe-copying ()
"Display info on how you may redistribute copies of GNU Emacs."
(interactive)
(view-help-file "COPYING"))
(defun view-emacs-problems ()
"Display info on known problems with Emacs and possible workarounds."
(interactive)
(view-help-file "PROBLEMS"))
(defun view-emacs-debugging ()
"Display info on how to debug Emacs problems."
(interactive)
(view-help-file "DEBUG"))
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.
This bug report was last modified 75 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.