all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 64795@debbugs.gnu.org
Subject: bug#64795: 30.0.50; manual-entry [(1) fails
Date: Sun, 23 Jul 2023 22:23:48 +0300	[thread overview]
Message-ID: <838rb6tosb.fsf@gnu.org> (raw)
In-Reply-To: <87bkg3igto.fsf@web.de> (message from Michael Heerdegen on Sun, 23 Jul 2023 02:58:59 +0200)

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Date: Sun, 23 Jul 2023 02:58:59 +0200
> 
> In Gnu/Linux there is a binary named "[" in /usr/bin/, and it has a man
> page I can read in a terminal using "man '[(1)'".
> 
> Requesting the man page in Emacs using `man' is broken, however:
> 
>   M-x manual-entry RET [ TAB
> 
> echoes "[No match]" - this is the first problem (the failing
> completion).
> 
> C-g, let's try differently:
> 
>   M-x manual-entry RET TAB [ TAB
> 
> (that's the same as before but additionally requesting all candidates
> before writing in the minibuffer) suddenly completes to "[(1)" as
> expected.  But when confirming with RET the man buffer only has these
> contents:
> 
> | /bin/sh: 1: Syntax error: "(" unexpected
> |
> | process exited abnormally with code 2
> 
> That's the second problem.

Does the patch below give good results?

diff --git a/lisp/man.el b/lisp/man.el
index 479bf9f9a3c..bbcbe5d1525 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -315,7 +315,7 @@ Man-cooked-hook
   :type 'hook
   :group 'man)
 
-(defvar Man-name-regexp "[-[:alnum:]_­+][-[:alnum:]_.:­+]*"
+(defvar Man-name-regexp "[-[:alnum:]_­+[][-[:alnum:]_.:­+]*"
   "Regular expression describing the name of a manpage (without section).")
 
 (defvar Man-section-regexp "[0-9][a-zA-Z0-9+]*\\|[LNln]"
@@ -937,7 +937,7 @@ Man-completion-table
                          "-k" (concat (when (or Man-man-k-use-anchor
                                                 (string-equal prefix ""))
                                         "^")
-                                      prefix))))
+                                      (shell-quote-argument prefix)))))
               (setq table (Man-parse-man-k)))))
 	;; Cache the table for later reuse.
         (when table





  reply	other threads:[~2023-07-23 19:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-23  0:58 bug#64795: 30.0.50; manual-entry [(1) fails Michael Heerdegen
2023-07-23 19:23 ` Eli Zaretskii [this message]
2023-07-24  0:15   ` Michael Heerdegen
2023-07-24 14:25     ` Eli Zaretskii
2023-07-25  1:05       ` Michael Heerdegen
2023-07-25 11:45         ` Eli Zaretskii
2023-07-26  3:20           ` Michael Heerdegen
2023-07-26 14:31             ` Eli Zaretskii

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=838rb6tosb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=64795@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.