unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sebastian Tennant <sdt@sebyte.me>
To: 61552@debbugs.gnu.org
Subject: bug#61552: Feature request: Add variable Man-prefer-synchronous-call
Date: Mon, 20 Feb 2023 18:11:17 +0000	[thread overview]
Message-ID: <87edqkcim2.fsf@sebyte.me> (raw)
In-Reply-To: <87zg9dsfjs.fsf@tcd.ie> (Basil Contovounesios's message of "Thu,  16 Feb 2023 17:09:27 +0000")

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

Quoth Basil Contovounesios <contovob@tcd.ie>
on Thu, 16 Feb 2023 17:09:27 +0000:
> […]
> Please attach the patches here so that they can be tracked in this
> bugtracker.
>
> Thanks,

No problem Basil.  Here's a patch against master:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch against master --]
[-- Type: text/x-diff, Size: 1354 bytes --]

From 179af66f885630a7bdf3d3f3146aceb8ad205ce6 Mon Sep 17 00:00:00 2001
From: Sebastian Tennant <sdt@sebyte.me>
Date: Thu, 10 Mar 2022 08:36:04 +0000
Subject: [PATCH] Add user-customizable variable Man-prefer-synchronous-call

* lisp/man.el (Man-getpage-in-background): Only call #'start-process
when 'make-process satisfies #'fboundp AND Man-prefer-synchronous-call
is bound to nil.
---
 lisp/man.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/man.el b/lisp/man.el
index 286edf9314e..fb4f8f02db7 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -97,6 +97,12 @@ man
   :group 'external
   :group 'help)
 
+(defcustom Man-prefer-synchronous-call nil
+  "Non-nil means always call the Un*x man command synchronously,
+rather than asynchronously, which is the default behaviour."
+  :type 'boolean
+  :group 'man)
+
 (defcustom Man-filter-list nil
   "Manpage cleaning filter command phrases.
 This variable contains a list of the following form:
@@ -1118,7 +1124,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


  reply	other threads:[~2023-02-20 18:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 16:12 bug#61552: Feature request: Add variable Man-prefer-synchronous-call Sebastian Tennant
2023-02-16 17:09 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-20 18:11   ` Sebastian Tennant [this message]
2023-02-21 10:44     ` Robert Pluim
2023-02-21 14:08       ` Sebastian Tennant
2023-02-21 14:47         ` Robert Pluim
2023-02-22 17:16           ` Sebastian Tennant
2023-03-02 11:30             ` Eli Zaretskii
2023-03-03  8:51               ` Sebastian Tennant
2023-03-03 11:23                 ` Eli Zaretskii
2023-02-21  9:53 ` Stefan Kangas
2023-02-21 12:16   ` Sebastian Tennant
2023-02-21 12:28   ` Sebastian Tennant

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edqkcim2.fsf@sebyte.me \
    --to=sdt@sebyte.me \
    --cc=61552@debbugs.gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).