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#42160: Issue with Man-kill and background process. Date: Fri, 03 Jul 2020 11:02:08 +0300 Message-ID: <835zb5vxfj.fsf@gnu.org> References: <20200702022309.bpj4t77e73n23c4y.ref@ergus> <20200702022309.bpj4t77e73n23c4y@ergus> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6436"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42160@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 03 10:03:09 2020 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 1jrGf7-0001ZR-OL for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 10:03:09 +0200 Original-Received: from localhost ([::1]:42846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrGf6-0004jB-Pl for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jul 2020 04:03:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrGf0-0004j3-2F for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 04:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44816) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrGez-0007IX-PV for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 04:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrGez-0003hm-Jj for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2020 04:03: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: Fri, 03 Jul 2020 08:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42160 X-GNU-PR-Package: emacs Original-Received: via spool by 42160-submit@debbugs.gnu.org id=B42160.159376333714186 (code B ref 42160); Fri, 03 Jul 2020 08:03:01 +0000 Original-Received: (at 42160) by debbugs.gnu.org; 3 Jul 2020 08:02:17 +0000 Original-Received: from localhost ([127.0.0.1]:56362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrGeG-0003gi-ML for submit@debbugs.gnu.org; Fri, 03 Jul 2020 04:02:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrGeF-0003gX-Iv for 42160@debbugs.gnu.org; Fri, 03 Jul 2020 04:02:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49591) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrGeA-00070k-14; Fri, 03 Jul 2020 04:02:10 -0400 Original-Received: from [176.228.60.248] (port=1665 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jrGe9-0002nZ-7E; Fri, 03 Jul 2020 04:02:09 -0400 In-Reply-To: <20200702022309.bpj4t77e73n23c4y@ergus> (bug-gnu-emacs@gnu.org) 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:182656 Archived-At: > Date: Thu, 2 Jul 2020 04:23:09 +0200 > From: Ergus via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > When using man with big manuals (like gcc). There is an error when > trying to quit with k just after opening the manual. > This seems to be related with the formating process that is running in > the background. > > To reproduce the issue: > > emacs -Q > M-x toggle-debug-on-error RET > M-x man RET > gcc RET > k > > And I get this error message: > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > Man-bgproc-filter(# "nt, there is no need to use address spaces like \"_...") Thanks. Does the patch below fix this? diff --git a/lisp/man.el b/lisp/man.el index 5278a1a..bc8fd45 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1392,7 +1392,7 @@ Man-bgproc-filter command is run. Second argument STRING is the entire string of output." (save-excursion (let ((Man-buffer (process-buffer process))) - (if (null (buffer-name Man-buffer)) ;; deleted buffer + (if (not (buffer-live-p Man-buffer)) ;; deleted buffer (set-process-buffer process nil) (with-current-buffer Man-buffer @@ -1426,7 +1426,7 @@ Man-bgproc-sentinel (delete-buff nil) message) - (if (null (buffer-name Man-buffer)) ;; deleted buffer + (if (not (buffer-live-p Man-buffer)) ;; deleted buffer (or (stringp process) (set-process-buffer process nil))