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

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

Re: Window remembering last used buffer and i-search


From: Oliver Scholz
Subject: Re: Window remembering last used buffer and i-search
Date: Tue, 27 May 2003 12:43:43 +0200
User-agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (windows-nt)

Lars Brange <lars.brange@aurum.se> writes:

> Hello,
>
> Is there any function or extension to emacs 21.2.1 that let each window
> remember its last used buffer and last i-search string? I often have the
> same buffer open in two windows and then switch to another buffer in one
> of the windows. I then want to switch back to the first buffer again in
> that window (ie I have the same buffer in the two windows again). The
> problem is that emacs suggest the second last used buffer for *all*
> emacs windows, not the one I'm currently using. This means I have to
> enter the buffer name again; I don't want to do that...

You could try `M-x winner-mode RET'. When you have winner-mode thus
activated, Emacs makes window-configurations "undoable". Use 
`C-x <left>' to switch to the previous configuration. ("redo" is on
`C-x <right>'. It does not preserve point, though.

> Also, I would like emacs to remember the last i-search string for each
> window or buffer. Now I have a global i-search string for all
> windows/buffers.
[...]

To get this buffer local, you could eval

(make-local-variable 'search-ring)

in your buffer (use a hook etc. as appropriate).

In order to get this window local, you'd have to hack Emacs' C core,
I'm afraid.

    Oliver
-- 
8 Prairial an 211 de la Révolution
Liberté, Egalité, Fraternité!


reply via email to

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