all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Noam Postavsky <npostavs@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: iswitchb
Date: Mon, 12 Mar 2018 17:56:59 +0100	[thread overview]
Message-ID: <874llljkpw.fsf@gmail.com> (raw)
In-Reply-To: <CAM-tV-_hysho0B72=jp=4+0ouRPhcsrRx2rQYyr7zS5YrSENVA@mail.gmail.com> (Noam Postavsky's message of "Mon, 12 Mar 2018 10:41:39 -0400")

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

Noam Postavsky <npostavs@gmail.com> writes:

> On Mon, Mar 12, 2018 at 9:57 AM, Robert Pluim <rpluim@gmail.com> 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’s 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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Correct-Info-link-markup.patch --]
[-- Type: text/x-diff, Size: 1864 bytes --]

From a59d3fc1a7059064518f3842140f0df2e19799a1 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-Hide-URL-and-Info-node-markup-in-help-buffers.patch --]
[-- Type: text/x-diff, Size: 2012 bytes --]

From de6c4f2ba6defa8dca15e13d64c6371f3f23e6af Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
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


  reply	other threads:[~2018-03-12 16:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180311031648.8003.90161@vcs0.savannah.gnu.org>
     [not found] ` <20180311031649.A9FBF20F52@vcs0.savannah.gnu.org>
2018-03-11  3:21   ` [Emacs-diffs] master f1c48b0: Remove many items obsolete since Emacs 22.1 Daniel Colascione
2018-03-11  3:40     ` iswitchb (was: [Emacs-diffs] master f1c48b0: Remove many items obsolete since Emacs 22.1) Stefan Monnier
2018-03-12 10:22       ` iswitchb Robert Pluim
2018-03-12 11:21         ` iswitchb Eli Zaretskii
2018-03-12 11:44           ` iswitchb Eli Zaretskii
2018-03-12 13:57             ` iswitchb Robert Pluim
2018-03-12 14:41               ` iswitchb Noam Postavsky
2018-03-12 16:56                 ` Robert Pluim [this message]
2018-03-12 17:36                   ` iswitchb Eli Zaretskii
2018-03-12 17:56                     ` iswitchb Robert Pluim
2018-03-13 16:42                       ` iswitchb Robert Pluim
2018-03-14 15:54                         ` iswitchb Eli Zaretskii
2008-03-19 21:44 iswitchb Richard Stallman
2008-03-19 22:31 ` iswitchb paul r
2008-03-20  2:51   ` iswitchb Don Armstrong
2008-03-20  3:08     ` iswitchb Daniel Colascione
2008-03-20  8:43     ` iswitchb paul r
2008-03-20 14:22       ` iswitchb Stefan Monnier
2008-03-20 14:44         ` iswitchb paul r
2008-03-20 18:37     ` iswitchb Richard Stallman
2008-03-20 20:17       ` iswitchb Don Armstrong
2008-03-22  3:24         ` iswitchb Richard Stallman

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=874llljkpw.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=npostavs@gmail.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.