GNU bug report logs - #64795
30.0.50; manual-entry [(1) fails

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Sun, 23 Jul 2023 01:00:01 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 64795 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 64795 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#64795: 30.0.50; manual-entry [(1) fails
Date: Tue, 25 Jul 2023 14:45:09 +0300
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: 64795 <at> debbugs.gnu.org
> Date: Tue, 25 Jul 2023 03:05:34 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > @@ -937,7 +937,9 @@ Man-completion-table
> >                           "-k" (concat (when (or Man-man-k-use-anchor
> >                                                  (string-equal prefix ""))
> >                                          "^")
> > -                                      prefix))))
> > +                                      (if (string-equal prefix "")
> > +                                          prefix
> > +                                        (shell-quote-argument prefix))))))
> 
> I wonder however: why did you add that `shell-quote-argument' wrapper?
> I think there is no shell involved.  It doesn't seem to have an effect
> here, but I'm not sure if there are not more problems possible like the
> one involving the empty string.
> 
> Or do you expect that some people might set `manual-program' to
> something involving a shell?

I used shell-quote-argument because it did the job, and was simple.

What would be the alternative?  We could perhaps use regexp-quote, if
we believe the argument to "man -k" is interpreted as an Emacs regexp,
but the only reference I have just says "regular expression", and
"M-x man" says in the doc string it's an ERE, and I don't believe
regexp-quote can handle those reliably.  Developing a new function
that would quote an ERE was not my intent, but if you or someone else
wants to do that, please do.  (Btw, is there only one "man -k" variant
out there? if not, perhaps others don't accept regexps at all...)

Stefan, any suggestions?




This bug report was last modified 1 year and 355 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.