unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ergus <spacibba@aol.com>
Cc: 42160@debbugs.gnu.org
Subject: bug#42160: Issue with Man-kill and background process.
Date: Fri, 03 Jul 2020 11:02:08 +0300	[thread overview]
Message-ID: <835zb5vxfj.fsf@gnu.org> (raw)
In-Reply-To: <20200702022309.bpj4t77e73n23c4y@ergus> (bug-gnu-emacs@gnu.org)

> Date: Thu, 2 Jul 2020 04:23:09 +0200
> From: Ergus via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> 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(#<process man> "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))
 





  reply	other threads:[~2020-07-03  8:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200702022309.bpj4t77e73n23c4y.ref@ergus>
2020-07-02  2:23 ` bug#42160: Issue with Man-kill and background process Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-03  8:02   ` Eli Zaretskii [this message]
2020-07-10  6:59     ` Eli Zaretskii
2020-07-18  7:46       ` Eli Zaretskii
2020-07-25  7:16         ` Eli Zaretskii
     [not found]   ` <handler.42160.D42160.159566142122750.notifdone@debbugs.gnu.org>
2020-07-25 11:16     ` bug#42160: closed (Re: bug#42160: Issue with Man-kill and background process.) Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=835zb5vxfj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=42160@debbugs.gnu.org \
    --cc=spacibba@aol.com \
    /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).