From: Fabrice BAUZAC-STEHLY <noon@mykolab.com>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 45800@debbugs.gnu.org
Subject: bug#45800: 27.1; ibuffer sort by filename/process fails with Dired
Date: Tue, 19 Jan 2021 22:37:38 +0100 [thread overview]
Message-ID: <8735ywbobh.fsf@mykolab.com> (raw)
In-Reply-To: <874kjf1t3d.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sun, 17 Jan 2021 15:27:50 +0000")
[-- Attachment #1: Type: text/plain, Size: 53 bytes --]
Here is the patch, hopefully in the correct format.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch --]
[-- Type: text/x-diff, Size: 1165 bytes --]
From b8ea8fed4729297bb22416893ac6369abdb51ee1 Mon Sep 17 00:00:00 2001
From: Fabrice Bauzac <noon@mykolab.com>
Date: Mon, 18 Jan 2021 23:02:21 +0100
Subject: [PATCH] Sort according to filename/process as displayed
* ibuf-ext.el (ibuffer-do-sort-by-filename/process): use the same
function for sorting and for displaying the
filename/process (Bug#45800).
---
lisp/ibuf-ext.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index ed5c9c0211..44574abd46 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1497,10 +1497,10 @@ filename/process
(string-lessp
;; FIXME: For now just compare the file name and the process name
;; (if it exists). Is there a better way to do this?
- (or (buffer-file-name (car a))
+ (or (with-current-buffer (car a) (ibuffer-buffer-file-name))
(let ((pr-a (get-buffer-process (car a))))
(and (processp pr-a) (process-name pr-a))))
- (or (buffer-file-name (car b))
+ (or (with-current-buffer (car b) (ibuffer-buffer-file-name))
(let ((pr-b (get-buffer-process (car b))))
(and (processp pr-b) (process-name pr-b))))))
--
2.29.2
next prev parent reply other threads:[~2021-01-19 21:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 20:02 bug#45800: 27.1; ibuffer sort by filename/process fails with Dired Fabrice BAUZAC-STEHLY
2021-01-17 15:27 ` Basil L. Contovounesios
2021-01-18 22:05 ` Fabrice BAUZAC-STEHLY
2021-01-19 21:37 ` Fabrice BAUZAC-STEHLY [this message]
2021-01-20 14:21 ` Basil L. Contovounesios
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=8735ywbobh.fsf@mykolab.com \
--to=noon@mykolab.com \
--cc=45800@debbugs.gnu.org \
--cc=contovob@tcd.ie \
/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).