emacs-devel
[Top][All Lists]
Advanced

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

Re: Buffer listing in multiple frames/ttys


From: Károly Lőrentey
Subject: Re: Buffer listing in multiple frames/ttys
Date: Thu, 24 Nov 2005 22:44:33 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.52 (gnu/linux)

[emacs-devel in Cc: because I think the included patch should be
applied on the CVS trunk.]

Len Trigg <address@hidden> writes:
> Many years ago I chose XEmacs, mainly becuase (at the time) it was the
> only one that supported font-lock in a tty and multiple tty
> connections to the one server.  A few months ago I switched over to
> FSF Emacs-multi-tty and so far it's been going pretty well.  One
> difference that has been niggling me is that XEmacs used to keep the
> recently-used buffer listing on a per-tty/frame basis, whereas
> Emacs-multi-tty seems to just have a global list.

I have good news!  Emacs has per-frame buffer-lists as well: see
<info:(elisp)The Buffer List>.

> For example, I typically have separate emacs tty's for my mail client,
> for calendar/diary, and for my coding.  In XEmacs, list-buffers called
> from the coding tty would list all the code-related buffers at the
> top, whereas in multi-tty emacs, I get a mixture of buffers from all
> three ttys.  It's obvious that the XEmacs way is preferrable.  Is
> there any chance of this feature being implemented in the multi-tty
> patch? (or is it even something that applies to the main Emacs
> branch?)

`list-buffers' (C-x C-b) does not use the frame-local buffer-list, but
rather the global one.  This seems like a bug in the CVS trunk, easily
fixed by a one-line patch:

--- orig/lisp/buff-menu.el
+++ mod/lisp/buff-menu.el
@@ -717,7 +717,7 @@
                                   (if (memq c '(?\n ?\s)) c underline))
                                 header)))))
       ;; Collect info for every buffer we're interested in.
-      (dolist (buffer (or buffer-list (buffer-list)))
+      (dolist (buffer (or buffer-list (buffer-list (selected-frame))))
        (with-current-buffer buffer
          (let ((name (buffer-name))
                (file buffer-file-name))

2005-11-24  Lőrentey Károly  <address@hidden>

        * buff-menu.el (list-buffers-noselect): Display the selected
         frame's buffer list, not the global one.

Any objections?

(The other issue is that other ttys get blocked if one of them is
waiting on input in the minibuffer.  Apparently this single keyboard
mode is intentional, but it's annoying nontheless, and certainly a
trick for new players)

I agree, but it's very hard to fix it.  I wonder what did the XEmacs
developers do; did they simply ignore the underlying problem?

--
Károly

Attachment: pgpiovnUArJeT.pgp
Description: PGP signature


reply via email to

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