emacs-devel
[Top][All Lists]
Advanced

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

Re: `buffer-list' and the frame-parameter `buffer-predicate'


From: Oliver Scholz
Subject: Re: `buffer-list' and the frame-parameter `buffer-predicate'
Date: Sat, 17 Aug 2002 13:19:08 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu)

Richard Stallman <address@hidden> writes:

>     for all the rest of my editing. The effect of my mode should be that
>     all functions for buffer-listing or buffer-switching in the Gnus-frame
>     show only resp. apply only to the *Group*, *Summary*, *Article* and
>     the message-buffers, while exactly those buffer are not visible in the
>     other frame. In other words: it would seem as if Gnus were running in
>     a separate instance of Emacs, while, of course, it still _is_ the same
>     instance with all the benefits implied by this.
>
> Do you mean that C-x b would hide the existence of other buffers?
> Would it simply refuse to show them in completion?

Yes, that's the intention.

> Would it refuse to switch to them if you specify their names?

I have not yet thought about this. Usually I insert the first two or
three characters of a buffer-name and then I "tab" my way through
until I have the full name in the minibuffer (with `switch-to-buffer')
or I start to type a part of the name until I have my buffer selected
(with `ido-switch-buffer' or `iswitch-buffer'). The "other" buffers
should stay "hidden" in a specialized frame then. But if a user
specifies the _full_ name of a buffer out of her head, then this is a
clear signal that she _really_ wants to switch to this buffer. So
ideally this should be an exception.

> What about C-x C-b?

The same. It should list only the predefined buffers of the specified
type.

> The other question is, why is this feature useful?  If you want to use
> a certain frame only for Gnus, you could simply choose not to switch
> to any other buffer in that frame.  If that is not a sufficient
> solution to the problem, could you tell me why not?

The whole idea behind this is to get the buffers sorted. It is like
keeping my stuff sorted in different drawers instead of keeping it in
one single box in the middle of my room. Or to take another metaphor:
it is like keeping my books and papers on my working desk and the food
and dishes on the dining table. If I want to work, I go to my desk,
and if I want to eat, I go to the dining table. This way I don't have
to search for a book under pizza-boxes and I don't have to rummage in
the papers to find a spoon.

Maybe I am wrong to make a conclusion from myself to others. But I
have usually about 50 buffers around and I do seldom recall the exact
name of a buffer on which I was working half an hour ago. So if I want
to switch back, it typically goes like this:

"Enough played, now back to the paper about XYZ ..."

C-x b

"No, wait, what was the name?"

<some characters> TAB

[Looking at a list of buffers] "No, that's wrong."

C-a C-k TAB

[Looking at a list of 30 to 60 buffers] "Hmm ... where is it? ..."

---

(Actually the real story is /slightly/ different, because I use `ido'
and not `switch-to-buffer'. And I am not quite so lost as this
suggests, because I have `C-x C-b' bound to `bs-show' and there
already is a mechanism in `bs-show' to limit the buffer-listing.  But
I hope this makes clear what I mean.)

Want I would like to see in Emacs is a generalized way to deal with
this. Or rather: I want to make an additional abstraction
possible. Like every abstraction this includes closing options,
i.e. it is based on negating possibilities in order to shape something
out of the continuum of possible relations. 

At it's core the idea is to make frames (_some_ of them) optionally to
/work-spaces/. I think, Robert Chassell, explained this in a better
way than I could do it.

If I -- for example -- want to add something to my personal Wiki, I go
to the "emacs-wiki" frame, where all the buffers in emacs-wiki-mode
"lie". If I want to execute a shell-command, I go to the shell-frame,
where all my shell-mode buffers "lie". If I want to learn Scheme, I go
to the Scheme-frame, where two or three *.scm file-buffers "lie",
together with the inferior-scheme-process buffer, the r5rs in an
Info-buffer and the html-version of SICP in a W3-buffer. If I want to
work on my paper about Hegel, I go to the Hegel-frame
... etc. etc. ...

Much the same as I go to the kitchen to prepare a meal and back to my
working desk to work at my computer, rather than peeling potatoes and
writing an email to the Emacs-developers on the same table.

>     The big, big problem is that this bypasses functions like
>     `save-buffers-kill-emacs', too. And exactly this makes it unusable.
>
> Why is that a problem?  It seems like a feature to me.

Suppose I have two frames. I have some modified buffers in frame A,
but I have frame B selected, which is, say, a specialized frame for
emacs-wiki and none of the Wiki buffers is modified. If I hit `C-x
C-c' now, Emacs will quit unconditionally and without offering to save
the modified buffers. All modifications are lost.

> I guess the question is, are you trying to improve your own
> convenience as a user, or are you trying to create a mode which will
> truly "fool" a user into thinking that two separate Emacses are running?

I am not sure about the wording here. I don't want to fool anyone. On
the contrary I have thought quite a bit about the user interface, but
I still think I have not yet the ideal solution to indicate visually
that there is something special with the specialized frames.

This is certainly not (only) for my own convenience. If it were only
for myself, I would neither take the pains to implement this as a
minor mode, nor bother you with it. I would simply hack something for
the functions I currently use on `C-x b' and `C-x C-b'. It would take
less time than it took to write this email.

I am not sure if I understand this question correctly.

    -- Oliver

-- 
30 Thermidor an 210 de la Révolution
Liberté, Egalité, Fraternité!






reply via email to

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