emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/ibuf-ext.el,v


From: Dan Nicolaescu
Subject: [Emacs-diffs] Changes to emacs/lisp/ibuf-ext.el,v
Date: Fri, 25 Jan 2008 05:38:35 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   08/01/25 05:38:34

Index: ibuf-ext.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ibuf-ext.el,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- ibuf-ext.el 17 Jan 2008 05:16:11 -0000      1.64
+++ ibuf-ext.el 25 Jan 2008 05:38:31 -0000      1.65
@@ -1155,6 +1155,20 @@
      (with-current-buffer (car b)
        (buffer-size))))
 
+;;;###autoload (autoload 'ibuffer-do-sort-by-filename/process "ibuf-ext")
+(define-ibuffer-sorter filename/process
+ "Sort the buffers by their file name/process name."
+  (:description "file name")
+  (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)) 
+       (let ((pr-a (get-buffer-process (car a))))
+        (and (processp pr-a) (process-name pr-a))))
+   (or (buffer-file-name (car b)) 
+       (let ((pr-b (get-buffer-process (car b))))
+        (and (processp pr-b) (process-name pr-b))))))
+
 ;;; Functions to emulate bs.el
 
 ;;;###autoload




reply via email to

[Prev in Thread] Current Thread [Next in Thread]