all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* C-Backspace behavior
@ 2013-04-02 15:08 Timur Aydin
  0 siblings, 0 replies; 2+ messages in thread
From: Timur Aydin @ 2013-04-02 15:08 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

Here is a scenario that I am running into many times everyday and it has 
gotten sufficiently annoying that I just wanted to find out how others 
are dealing with this.

I have TODO files in a file tree like this:

src
    foo
       TODO
    bar
       TODO
    rap
       TODO

So I open the first TODO file, mark a region, then do C-x C-f and do 
C-Backspace to delete foo and hit enter. In the dired buffer, I select 
the second TODO and yank. But, annoyingly, foo is pasted instead of the 
region that I have marked.

For this particular case, it is easy to just Backspace "foo" and enter 
"bar", but if the directory hierarchy is deeper nested, I just want to 
quickly delete all directories up to a certain point, open the dired 
buffer and navigate to the next directory without loosing the region 
that I have killed.

I don't just want to redefine the C-Backpace key to not kill, so my 
question is, how should I work so that I don't run into this problem?

-- 
Timur



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

* Re: C-Backspace behavior
       [not found] <mailman.23297.1364915345.855.help-gnu-emacs@gnu.org>
@ 2013-04-02 15:21 ` Alan Mackenzie
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Mackenzie @ 2013-04-02 15:21 UTC (permalink / raw)
  To: help-gnu-emacs

Timur Aydin <ta@taydin.org> wrote:
> Hi,

> Here is a scenario that I am running into many times everyday and it has 
> gotten sufficiently annoying that I just wanted to find out how others 
> are dealing with this.

> I have TODO files in a file tree like this:

> src
>    foo
>       TODO
>    bar
>       TODO
>    rap
>       TODO

> So I open the first TODO file, mark a region, then do C-x C-f and do 
> C-Backspace to delete foo and hit enter. In the dired buffer, I select 
> the second TODO and yank. But, annoyingly, foo is pasted instead of the 
> region that I have marked.

If I understand you right, at this point M-y might help.

> For this particular case, it is easy to just Backspace "foo" and enter 
> "bar", but if the directory hierarchy is deeper nested, I just want to 
> quickly delete all directories up to a certain point, open the dired 
> buffer and navigate to the next directory without loosing the region 
> that I have killed.

> I don't just want to redefine the C-Backpace key to not kill, so my 
> question is, how should I work so that I don't run into this problem?

All the regions that you kill are placed, successively, on the "kill ring".
C-y yanks the top kill.  M-y, following a C-y, yanks succeeding elements
from the kill ring.  Try it!

> -- 
> Timur

-- 
Alan Mackenzie (Nuremberg, Germany).



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

end of thread, other threads:[~2013-04-02 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-02 15:08 C-Backspace behavior Timur Aydin
     [not found] <mailman.23297.1364915345.855.help-gnu-emacs@gnu.org>
2013-04-02 15:21 ` Alan Mackenzie

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.