From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: iswitchb Date: Mon, 12 Mar 2018 17:56:59 +0100 Message-ID: <874llljkpw.fsf@gmail.com> References: <20180311031648.8003.90161@vcs0.savannah.gnu.org> <20180311031649.A9FBF20F52@vcs0.savannah.gnu.org> <87r2opk2yl.fsf@gmail.com> <1A9BA5E5-3700-4B32-9709-10B112F0E76F@gnu.org> <87efkpjt16.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1520873801 8105 195.159.176.226 (12 Mar 2018 16:56:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Mar 2018 16:56:41 +0000 (UTC) Cc: Eli Zaretskii , Stefan Monnier , Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 12 17:56:37 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1evQkV-0001vr-P7 for ged-emacs-devel@m.gmane.org; Mon, 12 Mar 2018 17:56:35 +0100 Original-Received: from localhost ([::1]:33233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evQmY-0000w1-N0 for ged-emacs-devel@m.gmane.org; Mon, 12 Mar 2018 12:58:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evQl2-00089V-H7 for emacs-devel@gnu.org; Mon, 12 Mar 2018 12:57:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evQl1-0007l2-Gg for emacs-devel@gnu.org; Mon, 12 Mar 2018 12:57:08 -0400 Original-Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:53076) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1evQkw-0007hj-WD; Mon, 12 Mar 2018 12:57:03 -0400 Original-Received: by mail-wm0-x22d.google.com with SMTP id t3so17977058wmc.2; Mon, 12 Mar 2018 09:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-followup-to:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=CWQcZa+UOAJhVMDZefciqKPkuYPzBAa5vVUea96VJYs=; b=IJEs02qEZsdpGgFpNmEWBPno+dNQf+n+GCv1zi9EKTILVTxFaGQ57UOdnU3UdMAKA+ kZgwqd1MIjqoQQAgpi2dl8SzTzW5trWKC24ihqpBXbMUezO5xNGp+ufiHADbLY/W0LOB UYkN67HJSUokvABEdMS5BRh3J6GYf02e67P8BlAcTBTHAZxxNmjPUkSJqLTbph4n9fFo lVhsBbQDi/oVUXr9wOpiYhXbQ/k3Xx6p/VWo97sjHTROLXtGLfd+Sjhinsg7ucto7qqC 5Djoez8R46Ze4bimbMY3PocZDvqh43NGC1taZMc5NHAD8i7uOjc/liGWMJIpm0+3kzTw T2UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-followup-to :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id :mime-version; bh=CWQcZa+UOAJhVMDZefciqKPkuYPzBAa5vVUea96VJYs=; b=P6SeH/mllxQxhfBS8hJ0Ygcb4nJjFIPosuIOx+1wkc3imDvURu3GTqRLENAE68+ILf lB5dpbzXbJH0Ld+01BAIpklSqi72EENTOlIHgkJq/J291r2NhCM8qA+CF7IBAc6ufPf2 F2agDFkQ96cuf5BisB7uzBxbDnz0R9NMp5Z5YSo2DUf783FeYf2RFcq/FbWsc28zPoJm Q8JeiqKLBQKCQNldzyD0FG1wnMpkKTAJUxwAEpWMswzkCW3jN/JMfXwnGhmkrWVIJl+e cisPSJDYDOShmkojpSvuTKmuSZyhvPeCet0UCGalgsg4HxjoG6k8JWRrfesksu+NEZCR bgMA== X-Gm-Message-State: AElRT7FslmEQ+OMC/MeduMKMkM8tBLQpwJVleQTTn+TWVOa1/RqqJzEs 7RCfDiwvM/FVrVcE87nCNw0= X-Google-Smtp-Source: AG47ELvgJcsE2N5O1DHcqztYllMl8E41jLqXriPmYb2Nh75lTS0j77jD8a9qfnyYtjtC58M87UEg4A== X-Received: by 10.28.211.132 with SMTP id k126mr5733108wmg.142.1520873821608; Mon, 12 Mar 2018 09:57:01 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id k130sm9240466wmg.9.2018.03.12.09.57.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 09:57:00 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Noam Postavsky's message of "Mon, 12 Mar 2018 10:41:39 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223645 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Noam Postavsky writes: > On Mon, Mar 12, 2018 at 9:57 AM, Robert Pluim wrote: > >> [1] Info-goto-node only works if you're in an *info* file. Should it >> be taught to work from *Help* buffers as well? Or perhaps >> "(filename)Node name" strings should be clickable? > > It works if you say "Info node `(filename) Node name'" (not if you say > "Info nodeS `(filename) Node name' etc"), so completing-read docstring > could be changed to > > See also Info node `(elisp) Basic Completion' for the details > about completion, and Info node `(elisp) Programmed Completion' > for expectations from COLLECTION when it=E2=80=99s a function. Indeed, that works, as does Info node `(elisp)Basic Completion' (without the space after the right paren) Patch for this and one other instance of the same issue attached. I've also attached a proposed patch for hiding the 'Info node' and 'URL' prefixes in *Help* buffers, since I find they just get in the way. First one could go to either emacs-26 or master. Second one I think is master-only (does it require a NEWS entry?). Robert --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Correct-Info-link-markup.patch >From a59d3fc1a7059064518f3842140f0df2e19799a1 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 12 Mar 2018 17:43:23 +0100 Subject: [PATCH 1/2] Correct Info link markup * lisp/gnus/gnus-agent.el (gnus-agent-auto-agentize-methods): Correct markup for Info link. * src/minibuf.c (Fcompleting_read): Likewise. --- lisp/gnus/gnus-agent.el | 2 +- src/minibuf.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index ada148d20b..628c9430c9 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -172,7 +172,7 @@ gnus-agent-expire-unagentized-dirs (defcustom gnus-agent-auto-agentize-methods nil "Initially, all servers from these methods are agentized. The user may remove or add servers using the Server buffer. -See Info nodes `(gnus)Server Buffer', `(gnus)Agent Variables'." +See Info node `(gnus)Server Buffer' and Info node `(gnus)Agent Variables'." :version "22.1" :type '(repeat symbol) :group 'gnus-agent) diff --git a/src/minibuf.c b/src/minibuf.c index 95e62cedda..d4484efb04 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1626,8 +1626,8 @@ COLLECTION can also be a function to do the completion itself. PREDICATE limits completion to a subset of COLLECTION. See `try-completion', `all-completions', `test-completion', and `completion-boundaries', for more details on completion, -COLLECTION, and PREDICATE. See also Info nodes `(elisp)Basic Completion' -for the details about completion, and `(elisp)Programmed Completion' for +COLLECTION, and PREDICATE. See also Info node `(elisp)Basic Completion' +for the details about completion, and Info node `(elisp)Programmed Completion' for expectations from COLLECTION when it's a function. REQUIRE-MATCH can take the following values: -- 2.16.1.72.g5be1f00a9 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-Hide-URL-and-Info-node-markup-in-help-buffers.patch >From de6c4f2ba6defa8dca15e13d64c6371f3f23e6af Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 12 Mar 2018 17:50:08 +0100 Subject: [PATCH 2/2] Hide URL and Info node markup in help buffers * lisp/help-mode.el (help-make-xrefs): Make URL and Info node markup invisible. --- lisp/help-mode.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 4fb3fb85c9..f64915e541 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -470,17 +470,23 @@ help-make-xrefs ;; Info references (save-excursion (while (re-search-forward help-xref-info-regexp nil t) - (let ((data (match-string 2))) + (let ((data (match-string 2)) + (beg (match-beginning 0)) + (end (match-beginning 2))) (save-match-data (unless (string-match "^([^)]+)" data) (setq data (concat "(emacs)" data))) (setq data ;; possible newlines if para filled - (replace-regexp-in-string "[ \t\n]+" " " data t t))) + (replace-regexp-in-string "[ \t\n]+" " " data t t)) + (put-text-property beg end 'invisible t)) (help-xref-button 2 'help-info data)))) ;; URLs (save-excursion (while (re-search-forward help-xref-url-regexp nil t) - (let ((data (match-string 1))) + (let ((data (match-string 1)) + (beg (match-beginning 0)) + (end (match-beginning 1))) + (put-text-property beg end 'invisible t) (help-xref-button 1 'help-url data)))) ;; Mule related keywords. Do this before trying ;; `help-xref-symbol-regexp' because some of Mule -- 2.16.1.72.g5be1f00a9 --=-=-=--