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

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

Re: When using rectangle-mark-mode in an editable dired buffer, how can


From: Bob Proulx
Subject: Re: When using rectangle-mark-mode in an editable dired buffer, how can I edit the region?
Date: Wed, 7 Dec 2016 00:00:07 -0700
User-agent: NeoMutt/20161126 (1.7.1)

address@hidden wrote:
> On 2016-12-06 07:25, Bob Proulx wrote:
> >   C-x C-q
> >   C-x (
> >   C-SPC
> >   C-e M-b C-b
> >   M-x upcase-initials-region RET
> >   C-n
> >   C-x )
> >   C-x e
> >   e
> >   e
> >   e
> >   ...
> >   C-x C-q

And as long as I am responding I made another mistake in the above.  I
ended with C-x C-q, which will then ask you if you want to save the
result.  I should have finished the dired edit using C-c C-c instead.

> Thanks for responding, Bob. Your suggestion of keyboard macros was
> great, as I was unaware I could combine them with non-interactive
> commands and mark-region.

I use regions with macros a lot.  I consider complex macros somewhat a
brute force solution.  But they do work and I use them a lot.

> Unfortunately, your suggestion, quoted above, only works if I
> manually position the cursor at the beginning of the filename, thus
> not being able to quickly repeat it with F4 or call it with a
> numeric argument.

And that was another mistake in the above.  Because I was slightly
confused when I composed the macro above.  Normally in dired mode both
C-n, n, and C-p, p (dired-next-line as you found) snap to the
beginning of the file entry.  Therefore when I wrote the above that is
what I was thinking would happen.  Oops.  It's a bug in my example.
Sorry.  But at least you figured it out and were able to add an
additional emacs tool into your toolbox. :-)

> But, to make your suggestion work I can use `dired-next-line`, which
> places the cursor at the the beginning of the next filename.

Good!  I am glad you figured it out.

B.V. Raghav wrote:
> (set-goal-column ARG)
> It is bound to C-x C-n.

That is a good idea!

Bob



reply via email to

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