From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#57408: [PATCH] New value 'thrifty' for Man-notify-method Date: Thu, 25 Aug 2022 18:32:50 +0200 Message-ID: <87r114cmh9.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="28130"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: 57408@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 25 18:33:16 2022 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 1oRFnA-00078t-0y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 18:33:16 +0200 Original-Received: from localhost ([::1]:45174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRFn9-0001fy-0t for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 12:33:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRFmw-0001fN-Vm for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 12:33:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRFmw-00086r-Mz for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 12:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRFmw-0005Fe-HD for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 12:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Aug 2022 16:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57408 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166144518020176 (code B ref -1); Thu, 25 Aug 2022 16:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Aug 2022 16:33:00 +0000 Original-Received: from localhost ([127.0.0.1]:51141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRFmu-0005FM-3c for submit@debbugs.gnu.org; Thu, 25 Aug 2022 12:33:00 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRFmr-0005FE-VJ for submit@debbugs.gnu.org; Thu, 25 Aug 2022 12:32:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRFmr-0001bi-Lk for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 12:32:57 -0400 Original-Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:37563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRFmp-00081i-Ou for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 12:32:57 -0400 Original-Received: by mail-ej1-x62b.google.com with SMTP id h22so30358952ejk.4 for ; Thu, 25 Aug 2022 09:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc; bh=yURueO0H6hSIf/OhK+hBDFauG+sZsyQFeVBDqgmhoAY=; b=Cg7UoqKkU5PAqfu0HWexFjcc//zWxF/dmVHY/bl/joB0cCh5g+guH/yRnNMb8hiKse 2rUCmuxGMFRME66i1wN3j27ePkbyc3Zp6zh62zSOz8gFpk/62gTgw8kkZCe9pqjU/01O c4K5B2Sc98/a1JZOEF9uAzFkzF0SPI2D97lM8hGOcS33+oVW3YOGX3ZCfS00CFXMvNei 6O6eO/MWdrekUMFhwDzJhTr3YFDKyGDm071r+EEpXyRvm30+Er7sfuE/jpivnHrIr7jX tkHY6VlRhtTSzjWweY7eaioegrGJT3Lygp5gPj3luvViRE47AxVj4Sj74+dP9GG74n4P 6aiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc; bh=yURueO0H6hSIf/OhK+hBDFauG+sZsyQFeVBDqgmhoAY=; b=Pj5Bt82X6sxmgYqlUN2yK2II1aiEN+a5RuAEBdC58fAJyG+7BgSGUtqoEgj7oZGOp7 H2mVbIOQawo96Z7o8iZVs5VWY9dy5ZP6gyVt2g0tM5siqqRynsp9oE6hM1SoIjPIHdDV OL5PPwYX4R1IZG74GujJACGNLtup/YyEq6BW4F55fmVPrzRPOBQOA0Km48Pn9j6fEQOi SdrutNZE1H2Hme+JLtJ/OKJEIwL6UNX1DrC4GChwa3n1OeSRzIU5+xPRuLlUv9PDKPON CE9PtBcFqAY/A+v+gbzlDuC0GvxhgiOjQHHY5fYe4rYH9cbOmMNvzpWDpt29ieN83dEB yL2A== X-Gm-Message-State: ACgBeo2iemm8QQ0kN4O9DoKM+u1G3WckpVc0x+p3S074FU7jx1DkUe// dSL7HcVU8d3E8pxctEkP811hMWrD35Y= X-Google-Smtp-Source: AA6agR7xnm1nCv/nk1V8iWOfj4ZG+cgywIYHsl097C1Bf8W5rRDYn0q6qWoXXg2DuTcXJ3rcqBsV/A== X-Received: by 2002:a17:907:2daa:b0:73d:7e5e:9ae with SMTP id gt42-20020a1709072daa00b0073d7e5e09aemr2946396ejc.532.1661445173328; Thu, 25 Aug 2022 09:32:53 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::157b]) by smtp.gmail.com with ESMTPSA id b2-20020a17090630c200b0072b92daef1csm2399391ejb.146.2022.08.25.09.32.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:32:52 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=arstoffel@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:240731 Archived-At: --=-=-= Content-Type: text/plain Fiddling with buffer-display-alist can be a bit tricky[1], so I'd like to suggest the following additional Man-notify-method value. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-New-option-thrifty-for-Man-notify-method.patch >From 4150463ed4743ba6e78c29b0ed690ebf809c85de Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Thu, 25 Aug 2022 18:21:39 +0200 Subject: [PATCH] New option thrifty for Man-notify-method * lisp/man.el (Man-notify-when-ready): Accept new 'thrifty' notify method. (Man-notify-method): Explain what 'thrifty' does. --- lisp/man.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/man.el b/lisp/man.el index d66f63972a..7ba7bee417 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -168,13 +168,14 @@ Man-notify-method bully -- make the manpage the current buffer and only window (sf) aggressive -- make the manpage the current buffer in the other window (sf) friendly -- display manpage in the other window but don't make current (sf) +thrifty -- reuse an existing manpage window if possible (sf) polite -- don't display manpage, but prints message and beep when ready quiet -- like `polite', but don't beep meek -- make no indication that the manpage is ready Any other value of `Man-notify-method' is equivalent to `meek'." :type '(radio (const newframe) (const pushy) (const bully) - (const aggressive) (const friendly) + (const aggressive) (const friendly) (const thrifty) (const polite) (const quiet) (const meek)) :group 'man) @@ -1229,6 +1230,11 @@ Man-notify-when-ready (and (frame-live-p saved-frame) (select-frame saved-frame)) (display-buffer man-buffer 'not-this-window)) + ('thrifty + (and (frame-live-p saved-frame) + (select-frame saved-frame)) + (display-buffer man-buffer '(display-buffer-reuse-mode-window + (mode . Man-mode)))) ('polite (beep) (message "Manual buffer %s is ready" (buffer-name man-buffer))) -- 2.37.2 --=-=-= Content-Type: text/plain [1]: For instance, Man-getpage-in-background may display a manpage buffer before setting its major mode, so setting (setq display-buffer-alist '(((derived-mode . Man-mode) ... )) ...) doesn't work. --=-=-=--