From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sebastian Tennant Newsgroups: gmane.emacs.bugs Subject: bug#61552: Feature request: Add variable Man-prefer-synchronous-call Date: Wed, 22 Feb 2023 17:16:24 +0000 Message-ID: <87zg95lixj.fsf@sebyte.me> References: <87h6vlpp18.fsf@sebyte.me> <87zg9dsfjs.fsf@tcd.ie> <87edqkcim2.fsf@sebyte.me> <87edqjmh6p.fsf@gmail.com> <87lekr9km4.fsf@sebyte.me> <87a617m5xs.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19413"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) To: 61552@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 22 18:17:23 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 1pUsk5-0004mX-OY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Feb 2023 18:17:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUsjx-000193-3D; Wed, 22 Feb 2023 12:17:13 -0500 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 1pUsjp-000108-Do for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2023 12:17:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUsjm-0000Gi-LB for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2023 12:17:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pUsjm-0000bd-Gs for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2023 12:17:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87h6vlpp18.fsf@sebyte.me> Resent-From: Sebastian Tennant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Feb 2023 17:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61552 X-GNU-PR-Package: emacs Original-Received: via spool by 61552-submit@debbugs.gnu.org id=B61552.16770861972293 (code B ref 61552); Wed, 22 Feb 2023 17:17:02 +0000 Original-Received: (at 61552) by debbugs.gnu.org; 22 Feb 2023 17:16:37 +0000 Original-Received: from localhost ([127.0.0.1]:60249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUsjM-0000au-Se for submit@debbugs.gnu.org; Wed, 22 Feb 2023 12:16:37 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:40097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUsjH-0000ae-M4 for 61552@debbugs.gnu.org; Wed, 22 Feb 2023 12:16:35 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 599755C00B0; Wed, 22 Feb 2023 12:16:26 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 22 Feb 2023 12:16:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc :content-type:date:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm1; t=1677086186; x=1677172586; bh=VU2yPq6FEEvYRkCiGRXIHklps rcz/3tVDzKAbuiXUs8=; b=w283HcmXLd++2Qyuzwlj7XZBDSnPWoBcrIcGyeo4i n17nJdLTmvAqt2A2952oiPoBfDNmaWgQRJLhkAVsnPp6Q7s0PW0ijCeeTa/KWe9U ia9OWzAuW2l9pnb9+hi6CVvNBAQR8m3hsX5HgSjPdz0fZdYUItoU+9VkK+LLoY1g kbJh8nI1vdVXccULfWUb4sgbHwz0WwPyy7AMaOjmW+AngO80/hJy6PqYyePkHqzb a22/gjbdXJOszV/Vc/dmpYPXtaXl4aTQT2mFTBheGQbJuusuMwmKMmHrduhzAS/b zLfhKSY90pCijp2FDSkmwCNGAdsWOxZyGEmNqL4202vMQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1677086186; x=1677172586; bh=VU2yPq6FEEvYRkCiGRXIHklpsrcz/3tVDzK AbuiXUs8=; b=IX/MgjmBrjNum41lTcIHYjCvLzqIs7ttDFXI/Q8AUCdJ2RZF7ko MtSEs/cS6WHUvX6c1BvSEtM8xKT4AsBeeUVvWp/knG5xPZZO7C7O5N0ppm4udoA0 3DVjIUkCdC+vefaiPcrWLK3Yn38ekE4becF96UULLuTPIlm2Mt1fhdfbTez5KGuX pLIGUul95AbtWEb/al1LOmFYotZbmLv/LXDSw+v8HJNGvVwnAK16DCH0cWj6Pnga 7A/DAusav6Kf+wuQWlbnVCtJjmzKHEi/AqUtLoCtGzs5oK0iq0IQ/wAkfYWESCt1 6/KV9WXcz1q0MUwPAZoN+xnsf37hBtwf2wA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejledgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufhffkfgfgggtsehmtderre dtreejnecuhfhrohhmpefuvggsrghsthhirghnucfvvghnnhgrnhhtuceoshguthesshgv sgihthgvrdhmvgeqnecuggftrfgrthhtvghrnhepteelvdejhfdugeeiueekieeufedutd ekgfejiedtueetheegkefgvdejieefgfffnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepshgvsgihthgvodhrvghtuhhrnhdqphgrthhhsehfrg hsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i9e78401f:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for <61552@debbugs.gnu.org>; Wed, 22 Feb 2023 12:16:25 -0500 (EST) Original-Received: from sebyte by balor with local (Exim 4.94.2) (envelope-from ) id 1pUsjA-000HDa-95 for 61552@debbugs.gnu.org; Wed, 22 Feb 2023 17:16:24 +0000 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:256384 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Quoth Robert Pluim on Tue, 21 Feb 2023 15:47:11 +0100: > [=E2=80=A6] > Everything in Emacs should be in the manual :-) Indeed. > [=E2=80=A6] > Sorry, I meant "a complete sentence, and only taking up one screen > line, not exceeding `emacs-lisp-docstring-fill-column'", ie > > Whether to call the Un*x 'man' command synchronously. > When this is non-nil call 'man' synchronously instead of the default > asynchronous behaviour. > > since `apropos' displays only the first line Understood. Hopefully this updated patch (against master) is starting to look acceptable: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Add-new-user-option-Man-prefer-synchronous-call.patch >From 80fab7ad842bd9f41a98e18bb7a09a9e07866707 Mon Sep 17 00:00:00 2001 From: Sebastian Tennant Date: Thu, 10 Mar 2022 08:36:04 +0000 Subject: [PATCH] Add new user option Man-prefer-synchronous-call * lisp/man.el (Man-getpage-in-background): Add new defcustom Man-prefer-synchronous-call and modify #'Man-getpage-in-background. Only call #'start-process when 'make-process satisfies #'fboundp AND Man-prefer-synchronous-call is bound to nil. --- doc/emacs/programs.texi | 6 ++++++ etc/NEWS | 7 +++++++ lisp/man.el | 11 ++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index d97bd56be21..c6c67047c43 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1387,6 +1387,12 @@ Man Page @kbd{M-p} to switch between man pages in different sections. The mode line shows how many manual pages are available. +@vindex Man-prefer-synchronous-call + By default, @kbd{M-x man} calls the @code{man} program +asynchronously. If you would prefer it if @kbd{M-x man} called the +@code{man} program synchronously, you may set variable +@code{Man-prefer-synchronous-calls} to a non-@code{nil} value. + @findex woman @cindex manual pages, on MS-DOS/MS-Windows An alternative way of reading manual pages is the @kbd{M-x woman} diff --git a/etc/NEWS b/etc/NEWS index 4b0e4e6bd46..51526079313 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -192,6 +192,13 @@ This command adds a docstring comment to the current defun. If a comment already exists, point is only moved to the comment. It is bound to 'C-c C-d' in 'go-ts-mode'. +** Man-mode + ++++ +*** New user option 'Man-prefer-synchronous-call'. +When this is non-nil, call the 'man' program synchronously rather than +asynchronously, which is the default behaviour. + * New Modes and Packages in Emacs 30.1 diff --git a/lisp/man.el b/lisp/man.el index 9f75c07c791..5e5c10aac36 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -97,6 +97,14 @@ man :group 'external :group 'help) +(defcustom Man-prefer-synchronous-call nil + "Whether to call the Un*x 'man' program synchronously. +When this is non-nil, call the 'man' program synchronously +(rather than asynchronously, which is the default behaviour)." + :type 'boolean + :group 'man + :version 30.1) + (defcustom Man-filter-list nil "Manpage cleaning filter command phrases. This variable contains a list of the following form: @@ -1118,7 +1126,8 @@ Man-getpage-in-background "[cleaning...]") 'face 'mode-line-emphasis))) (Man-start-calling - (if (fboundp 'make-process) + (if (and (fboundp 'make-process) + (not Man-prefer-synchronous-call)) (let ((proc (start-process manual-program buffer (if (memq system-type '(cygwin windows-nt)) -- 2.30.2 --=-=-=--