help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: elscreen problem


From: Matthew Kennedy
Subject: Re: elscreen problem
Date: Thu, 03 Jul 2003 04:13:27 GMT
User-agent: Gnus/5.090024 (Oort Gnus v0.24) Emacs/21.3.50 (gnu/linux)

Lam <lam-no-spamm-thanks@nospam.org> writes:

> i use elscreen 
> il  would like  to know  if it  is possible  to list  only  buffers of
> current screen ? 
> for exemple : 
>
> if i have this configuration :
>
> ( [Screen number] -> buffer list )
>
> [0] -> foo1 foo3 foo5
> [1] -> foo2 foo4
> [3] -> foo6
>
> if i'm on screen1, it is possible to list only buffer foo2 and foo4 ? 
> (in fact a function like burry-buffer but for elscreen :))

Lam, I remember you asked in IRC about this.  I think the problem
comes down to your naming of screens (via. C-z A).  If you give a
screen a name, then C-z w, which normally shows you exactly what
buffers belong to each screen, then you will get the screen name you
set and not the buffers list.

Here's a patch I concocted to achieve that gives you the option of a
C-z w with screen names or C-u C-z w with buffer names instead.

Here's the example output for the original case and the prefixed case
(you normally see this echoed momentarily to the mini-buffer):

* C-z w

  0+ Gnus

* C-u C-z w

  0+ .bash_profile:*followup to Lam on gnu.emacs.help*

Matt

,----[ elscreen-prefix.patch ]
| --- /usr/share/emacs/site-lisp/elscreen/elscreen.el   2003-06-26 
20:55:59.000000000 -0500
| +++ elscreen.el       2003-07-01 10:52:22.000000000 -0500
| @@ -448,9 +448,9 @@
|    (elscreen-mode-line-update)
|    (switch-to-buffer (current-buffer)))
|  
| -(defun elscreen-show-list ()
| +(defun elscreen-show-list (&optional prefix)
|    "Show list of screens."
| -  (interactive)
| +  (interactive "P")
|    (let ((elscreen-tmp-this-screen (elscreen-get-current-screen))
|       (elscreen-tmp-previous-screen (elscreen-get-previous-screen))
|       (elscreen-list-message nil)
| @@ -511,7 +511,8 @@
|                                   (and (eq i (elscreen-get-previous-screen))
|                                        "-")
|                                   "")
| -                             (or (get-alist i elscreen-name-alist)
| +                             ;; show non-screen names if we were prefixed
| +                             (or (and (null prefix) (get-alist i 
elscreen-name-alist))
|                                   (get-alist i elscreen-tmp-name-alist)))
|                       "  ")))
|        (setq i (+ i 1)))
`----

-- 
Matthew Kennedy


reply via email to

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