unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Window remembering last used buffer and i-search
@ 2003-05-27  7:08 Lars Brange
  2003-05-27  7:47 ` Kai Großjohann
  2003-05-27 10:43 ` Oliver Scholz
  0 siblings, 2 replies; 7+ messages in thread
From: Lars Brange @ 2003-05-27  7:08 UTC (permalink / raw)


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...

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.

Thanks in advance,

Lars Brange

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Window remembering last used buffer and i-search
@ 2003-05-27  7:20 Rene Reitinger
  0 siblings, 0 replies; 7+ messages in thread
From: Rene Reitinger @ 2003-05-27  7:20 UTC (permalink / raw)


Hi,

when yu call i-search using C-s simply hit C-s again, and it will search
for the last used search string.

Cheers
Rene

Lars Brange wrote:

 > 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...
 >
 > 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.
 >
 > Thanks in advance,
 >
 > Lars Brange
 >
 >
 > _______________________________________________
 > Help-gnu-emacs mailing list
 > Help-gnu-emacs@gnu.org
 > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
 >
 >


-- 
Rene Reitinger
Research student
School for Computer Sciences and Engineering
The University of New South Wales, Sydney
NSW 2052,  Australia

email: rener@cse.unsw.edu.au
http://www.cse.unsw.edu.au/

Disclaimer:
http://www.eng.unsw.edu.au/emaildis.htm



-- 
Rene Reitinger
Research student
School for Computer Sciences and Engineering
The University of New South Wales, Sydney
NSW 2052,  Australia

email: rener@cse.unsw.edu.au
http://www.cse.unsw.edu.au/

Disclaimer:
http://www.eng.unsw.edu.au/emaildis.htm

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Window remembering last used buffer and i-search
       [not found] <mailman.6815.1054020561.21513.help-gnu-emacs@gnu.org>
@ 2003-05-27  7:39 ` Lars Brange
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Brange @ 2003-05-27  7:39 UTC (permalink / raw)


I know. What I want to do is that I want to have different i-search strings for
each buffer. Let's say I start a search for "main" in one buffer and then
switch to another buffer and search for "sub". When I switch back to the first
buffer and hit C-s twice I want it to use "main", not "sub".

Lars

Rene Reitinger wrote:

> Hi,
>
> when yu call i-search using C-s simply hit C-s again, and it will search
> for the last used search string.
>
> Cheers
> Rene
>
> Lars Brange wrote:
>
>  > 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...
>  >
>  > 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.
>  >
>  > Thanks in advance,
>  >
>  > Lars Brange
>  >
>  >
>  > _______________________________________________
>  > Help-gnu-emacs mailing list
>  > Help-gnu-emacs@gnu.org
>  > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
>  >
>  >
>
> --
> Rene Reitinger
> Research student
> School for Computer Sciences and Engineering
> The University of New South Wales, Sydney
> NSW 2052,  Australia
>
> email: rener@cse.unsw.edu.au
> http://www.cse.unsw.edu.au/
>
> Disclaimer:
> http://www.eng.unsw.edu.au/emaildis.htm
>
> --
> Rene Reitinger
> Research student
> School for Computer Sciences and Engineering
> The University of New South Wales, Sydney
> NSW 2052,  Australia
>
> email: rener@cse.unsw.edu.au
> http://www.cse.unsw.edu.au/
>
> Disclaimer:
> http://www.eng.unsw.edu.au/emaildis.htm

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Window remembering last used buffer and i-search
  2003-05-27  7:08 Window remembering last used buffer and i-search Lars Brange
@ 2003-05-27  7:47 ` Kai Großjohann
  2003-05-27 10:43 ` Oliver Scholz
  1 sibling, 0 replies; 7+ messages in thread
From: Kai Großjohann @ 2003-05-27  7:47 UTC (permalink / raw)


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

> Is there any function or extension to emacs 21.2.1 that let each window
> remember its last used buffer [...]?

Maybe you can save the window configuration to achieve this.  I think
winner-mode can do this.  If not, then
window-configuration-to-register might help.
-- 
This line is not blank.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Window remembering last used buffer and i-search
  2003-05-27  7:08 Window remembering last used buffer and i-search Lars Brange
  2003-05-27  7:47 ` Kai Großjohann
@ 2003-05-27 10:43 ` Oliver Scholz
  2003-05-27 15:55   ` Kevin Rodgers
  1 sibling, 1 reply; 7+ messages in thread
From: Oliver Scholz @ 2003-05-27 10:43 UTC (permalink / raw)


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é!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Window remembering last used buffer and i-search
  2003-05-27 10:43 ` Oliver Scholz
@ 2003-05-27 15:55   ` Kevin Rodgers
  2003-05-28  7:01     ` Lars Brange
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2003-05-27 15:55 UTC (permalink / raw)


Oliver Scholz wrote:

> Lars Brange <lars.brange@aurum.se> writes:
>>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).

Or in your ~/.emacs file (i.e. globally):


(make-variable-buffer-local 'search-ring)

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Window remembering last used buffer and i-search
  2003-05-27 15:55   ` Kevin Rodgers
@ 2003-05-28  7:01     ` Lars Brange
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Brange @ 2003-05-28  7:01 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 731 bytes --]

Thanks for the help everyone. The winner-mode was not exactly want I wanted
but it can work. make-variable-buffer-local works fine.

Lars

Kevin Rodgers wrote:

> Oliver Scholz wrote:
>
> > Lars Brange <lars.brange@aurum.se> writes:
> >>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).
>
> Or in your ~/.emacs file (i.e. globally):
>
> (make-variable-buffer-local 'search-ring)
>
> --
> <a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>



[-- Attachment #1.2: Type: text/html, Size: 949 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-05-28  7:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-27  7:08 Window remembering last used buffer and i-search Lars Brange
2003-05-27  7:47 ` Kai Großjohann
2003-05-27 10:43 ` Oliver Scholz
2003-05-27 15:55   ` Kevin Rodgers
2003-05-28  7:01     ` Lars Brange
  -- strict thread matches above, loose matches on Subject: below --
2003-05-27  7:20 Rene Reitinger
     [not found] <mailman.6815.1054020561.21513.help-gnu-emacs@gnu.org>
2003-05-27  7:39 ` Lars Brange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).