From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#32420: 26.1.50; Ibuffer: Detect correctly the buffers running a process Date: Sun, 12 Aug 2018 01:48:22 +0900 Message-ID: <8736vkn92h.fsf@calancha-pc.dy.bbexcite.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1534006032 26996 195.159.176.226 (11 Aug 2018 16:47:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2018 16:47:12 +0000 (UTC) To: 32420@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 11 18:47:08 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foX2h-0006tw-UM for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Aug 2018 18:47:08 +0200 Original-Received: from localhost ([::1]:60822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foX4o-0000GC-Ff for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Aug 2018 12:49:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foX4c-0000EX-4c for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 12:49:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foX4Z-0002mR-1A for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 12:49:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43311) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1foX4Y-0002mJ-S3 for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 12:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1foX4Y-0003yb-Le for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 12:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Aug 2018 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32420 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.153400612415257 (code B ref -1); Sat, 11 Aug 2018 16:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Aug 2018 16:48:44 +0000 Original-Received: from localhost ([127.0.0.1]:48329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foX4F-0003y0-Pd for submit@debbugs.gnu.org; Sat, 11 Aug 2018 12:48:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foX4E-0003xm-0M for submit@debbugs.gnu.org; Sat, 11 Aug 2018 12:48:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foX47-0002am-P2 for submit@debbugs.gnu.org; Sat, 11 Aug 2018 12:48:36 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1foX47-0002aZ-La for submit@debbugs.gnu.org; Sat, 11 Aug 2018 12:48:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foX46-0008R7-CV for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 12:48:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foX42-0002YL-Ft for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 12:48:34 -0400 Original-Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:41281) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1foX41-0002Xg-NJ for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 12:48:30 -0400 Original-Received: by mail-wr1-x42d.google.com with SMTP id j5-v6so10762083wrr.8 for ; Sat, 11 Aug 2018 09:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=DzEL0ubFLX9npAzTKHnpBNIpY/jj8MhEtfAvFHfeMHk=; b=arYy1xb8mtaXKvyVkr9ZNGe6buq2LgB4C9iBihwQXFuBNOHSZ6643H5JZcI+PRy+/u 0dukU0v+AVDVJhQ3uoNxp8RywNifrbgRs9BLXjj8bCHx1TztVfeqVJtGuoTG+51HuU1m 7E29nzN61ugnSl9kj5Mzt5XidwVZ6bVQb+6OfiqiyAcpjKLLfnPJae/inhYjtdLYUcnq l+M6i1CLO+5uEYlqDmzic3Es2RyF7bkRVeQqSh9vRMuFnWBSyUydk1AKl7rhz0w0cpzb azwKPr5kPf6c6OgHfe44wphHgIFEj2PKI1sxAfwHrwHuqIOlsdonsCpoV2H6acK1EDAr xwZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=DzEL0ubFLX9npAzTKHnpBNIpY/jj8MhEtfAvFHfeMHk=; b=CD5ff1b9ZM782ZZ9TsW1YEfy+2GPD+fnYE5OLqmLWmnuWnLLE63Hnox7i+QbNPdjmi l7CAU8KJjRpV0oSg+3qnZEqx1szj1MNL/2nVPF3Q3jUGGgLn3QMDdlMFJr0uLmnvUU/N nH1Qlt9a3I4ZcK4q2bPNGoXQjw95aXkTnEWDmD5TVBl2RPv+KwQuYD5cA1rvuMU5FW/1 GAuXld2SlXqbA4faDQbYhbti6Hiz8WzB++L1a3s44RoLvWT+wfRmoS7puYN+8lco77My 1/w88hF+8e7RC3Ksb9e/LeNrXE8X662rNsfRpM8b9gjQkULkwHHD0qY5FHxcITkKDzWL I45A== X-Gm-Message-State: AOUpUlHw7gTyZA/cAXrWrLzfG+Hu/ePemnOy4gB7/VbghsYZkGasrwhU 8N/R3XDQbSLfxWnkD9OJwi49Rl3n X-Google-Smtp-Source: AA+uWPzXe2gIOyRosAXw6oLg6LbDwRtpTX7KH187lMMCN8RWIVh4rNWJ0wSJWcYTrYwzqU6D2vYmRw== X-Received: by 2002:adf:e9c1:: with SMTP id l1-v6mr6657730wrn.14.1534006108109; Sat, 11 Aug 2018 09:48:28 -0700 (PDT) Original-Received: from calancha-pc.dy.bbexcite.jp (63.red-81-37-214.dynamicip.rima-tde.net. [81.37.214.63]) by smtp.gmail.com with ESMTPSA id h5-v6sm13865247wrr.19.2018.08.11.09.48.26 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Aug 2018 09:48:27 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149441 Archived-At: 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 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)