From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64795: 30.0.50; manual-entry [(1) fails Date: Tue, 25 Jul 2023 14:45:09 +0300 Message-ID: <83bkg0qkoq.fsf@gnu.org> References: <87bkg3igto.fsf@web.de> <838rb6tosb.fsf@gnu.org> <87v8eaf9lr.fsf@web.de> <831qgxs7y2.fsf@gnu.org> <87o7k0u7fl.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29326"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64795@debbugs.gnu.org, Stefan Monnier To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 25 13:45:21 2023 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 1qOGTh-0007NK-AG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Jul 2023 13:45:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOGTY-0004r6-OX; Tue, 25 Jul 2023 07:45:12 -0400 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 1qOGTO-0004aT-Es for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 07:45:05 -0400 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 1qOGTO-0000xC-6L for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 07:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOGTN-0002SW-MA for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 07:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jul 2023 11:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64795 X-GNU-PR-Package: emacs Original-Received: via spool by 64795-submit@debbugs.gnu.org id=B64795.16902854769399 (code B ref 64795); Tue, 25 Jul 2023 11:45:01 +0000 Original-Received: (at 64795) by debbugs.gnu.org; 25 Jul 2023 11:44:36 +0000 Original-Received: from localhost ([127.0.0.1]:44769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOGSy-0002RW-EQ for submit@debbugs.gnu.org; Tue, 25 Jul 2023 07:44:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOGSu-0002RG-DP for 64795@debbugs.gnu.org; Tue, 25 Jul 2023 07:44:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOGSn-0000pv-OI; Tue, 25 Jul 2023 07:44:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9BeRl7yLIuxg9CLFYo/dsZfz9hxqY3r8zQLekFFH9t8=; b=VwjDbSLscUec fop+Cb78owyE18HmfGZAPe1X5HVWCbO1Au8ZT+AixrUFeH3o24v5aX5YCnq1Z3ffNqcxOpjvLdKcP mysUbtNpME8reEZO4oWSKsPgdp9/o92UdQWugtsj6Jfgm6etbyhBHTZ4l7wfaAlwcaB3m+JsM+R1h rj+oaQVgEX6igyNcvEvjOQYsK10Mt3y2msanl719VSHYRNu0jH4YSDJuM/p5DI1QGix/CswrZLmSN HKV2OPh6XrZEefju9dXnaNlfh8l/CSecpzuGbfPdXVMbWDk1CZJ/ipN+ON53an7SdNSPJ+gEpfaKM 0yxzbFwbtopcn/8nErNWdg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOGSn-0005Ts-81; Tue, 25 Jul 2023 07:44:25 -0400 In-Reply-To: <87o7k0u7fl.fsf@web.de> (message from Michael Heerdegen on Tue, 25 Jul 2023 03:05:34 +0200) 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:266041 Archived-At: > From: Michael Heerdegen > Cc: 64795@debbugs.gnu.org > Date: Tue, 25 Jul 2023 03:05:34 +0200 > > Eli Zaretskii 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?