From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#74792: 29.2.50; goto-address-mode should support RET in special-mode buffers Date: Fri, 13 Dec 2024 09:31:49 +0200 Organization: LINKOV.NET Message-ID: <87a5d06ntm.fsf@mail.linkov.net> References: <86ldwm2lko.fsf@gnu.org> <86ed2e2gnm.fsf@gnu.org> <87v7vp6vfd.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1278"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: dmitry@gutov.dev, Eli Zaretskii , 74792@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 13 08:38:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tM0Fj-0000Cb-C6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Dec 2024 08:38:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM0FT-0003jo-TW; Fri, 13 Dec 2024 02:38:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tM0FO-0003jB-NT for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2024 02:38:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tM0FO-0003pW-Ec for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2024 02:38:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=2FN6oCEiMdeCUSbN9vyIgTKc7O2CrUG4z2E3AHuDmRM=; b=E5nVEmgjnX1y5u72bJgUvWR32EPIWlG2+xpkc35aFXogjLZpot8kSh4xz+06i3DgHmJx7wRApBC0pv5wYmeUc+W/AyhGNk7jJsPKB5e26jP9ncYh2ZIFZuvIotk5fvEgIRylzYvJqMydokohFFhsenlvwPEB5yOtR+W+yjvUtjSVKdNwYhrcONvjUq/aOlOYrRnatJwaawUroK2AALG5MGU81KpkRtLHgLnskqAosyBVaKashuFyF4faEd+9bgHzHUteS9l3ik6nakolW3q2Fd8eme+zAMyi2y4RLQkcuhO0G+Q6M15vdC5P2ECjkUBbQPH6GygL5MUNKrszXrb0xA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tM0FN-0006Pt-Tv for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2024 02:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Dec 2024 07:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74792 X-GNU-PR-Package: emacs Original-Received: via spool by 74792-submit@debbugs.gnu.org id=B74792.173407547124644 (code B ref 74792); Fri, 13 Dec 2024 07:38:01 +0000 Original-Received: (at 74792) by debbugs.gnu.org; 13 Dec 2024 07:37:51 +0000 Original-Received: from localhost ([127.0.0.1]:41391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tM0FD-0006PQ-7X for submit@debbugs.gnu.org; Fri, 13 Dec 2024 02:37:51 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:42071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tM0F8-0006P6-PJ for 74792@debbugs.gnu.org; Fri, 13 Dec 2024 02:37:50 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id C7B9A1BF206; Fri, 13 Dec 2024 07:37:39 +0000 (UTC) In-Reply-To: (Spencer Baugh's message of "Thu, 12 Dec 2024 15:47:12 -0500") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296960 Archived-At: >> 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.