all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: 32420@debbugs.gnu.org
Subject: bug#32420: 26.1.50; Ibuffer: Detect correctly the buffers running a process
Date: Sun, 12 Aug 2018 01:48:22 +0900	[thread overview]
Message-ID: <8736vkn92h.fsf@calancha-pc.dy.bbexcite.jp> (raw)


emacs -Q
M-x info RET
m Emacs RET
M-x ibuffer RET
;; Ibuffer wrongly reports *info* buffer as running a process.
--8<-----------------------------cut here---------------start------------->8---
commit db8f778c98bd6eb8db7b16239f6fddab012e5314
Author: Tino Calancha <tino.calancha@gmail.com>
Date:   Sun Aug 12 01:38:03 2018 +0900

    Ibuffer: Detect correctly the buffers running a process
    
    * lisp/ibuffer.el (filename-and-process): Store the process buffer
    as a text property; check for such property to detect a buffer
    with a process (Bug#32420).

diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 0a7bfe00a9..03018d08a5 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1912,11 +1912,9 @@ filename-and-process
      (let ((procs 0)
 	   (files 0))
        (dolist (string strings)
-	 (if (string-match "\\(?:\\`([[:ascii:]]+)\\)" string)
-	     (progn (setq procs (1+ procs))
-		    (if (< (match-end 0) (length string))
-			(setq files (1+ files))))
-	   (setq files (1+ files))))
+         (when (get-text-property 1 'ibuffer-process string)
+           (setq procs (1+ procs)))
+	 (setq files (1+ files)))
        (concat (cond ((zerop files) "No files")
 		     ((= 1 files) "1 file")
 		     (t (format "%d files" files)))
@@ -1928,7 +1926,8 @@ filename-and-process
 	(filename (ibuffer-make-column-filename buffer mark)))
     (if proc
 	(concat (propertize (format "(%s %s)" proc (process-status proc))
-			    'font-lock-face 'italic)
+			    'font-lock-face 'italic
+                            'ibuffer-process proc)
 		(if (> (length filename) 0)
 		    (format " %s" filename)
 		  ""))
--8<-----------------------------cut here---------------end--------------->8---

In GNU Emacs 26.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2018-08-11
Repository revision: ec6f588940e51013435408a456c10d33ddf98fb2
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description:	Debian GNU/Linux 9.5 (stretch)





             reply	other threads:[~2018-08-11 16:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-11 16:48 Tino Calancha [this message]
2018-08-11 16:57 ` bug#32420: 26.1.50; Ibuffer: Detect correctly the buffers running a process Eli Zaretskii
2018-08-11 17:13   ` Tino Calancha
2018-08-11 17:37     ` Eli Zaretskii
2018-08-12  8:21       ` Tino Calancha
2018-08-12 18:46         ` Eli Zaretskii
2018-08-13 10:30           ` Tino Calancha

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

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

  git send-email \
    --in-reply-to=8736vkn92h.fsf@calancha-pc.dy.bbexcite.jp \
    --to=tino.calancha@gmail.com \
    --cc=32420@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.