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

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

Re: Grab and yank


From: Andreas Röhler
Subject: Re: Grab and yank
Date: Sun, 24 Jan 2010 15:32:49 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

andrea wrote:
> I notice that I often do this operation:
> I am in one buffer and I need to fetch something from another buffer.
> So I visit the other one, select what I need, go back and yank.
> Now something like that would be nice instead:
> - visit the buffer in view mode
> - when quitting automatically put it in kill-ring and yank it to the
>   point of the original buffer
>
> This would save quite a lot of time, what do you thik?
> I started something like that
>
> -8<---------------cut here---------------start------------->8---
>  (defun grab-and-yank (buffer)
>  "Grabs from another buffer and yank it to your point"
>  (interactive "bbuffer:\n")
>  (switch-to-buffer-other-window buffer)
>  (view-mode 1))
> --8<---------------cut here---------------end--------------->8---
>
> But the view mode apparently don't keep it read only, and I think I
> should change the keymap to make "q" do something different than just
> exiting
>
>
>
>
>
>   

Hi,

what about the following procedure:

1) register your point
2) swirl around and collect your honey into a second register :-)
3) back to point (first register)
4 insert second register

Andreas





reply via email to

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