all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bob Proulx <bob@proulx.com>
To: s1ohy@waifu.club
Cc: help-gnu-emacs@gnu.org
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	[thread overview]
Message-ID: <20161206234935004640700@bob.proulx.com> (raw)
In-Reply-To: <61e09a1f5e3aa9edbc2560bd9a0563d9@waifu.club>

s1ohy@waifu.club 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



      parent reply	other threads:[~2016-12-07  7:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06  2:58 When using rectangle-mark-mode in an editable dired buffer, how can I edit the region? s1ohy
2016-12-06  7:25 ` Bob Proulx
2016-12-06 16:54   ` Michael Heerdegen
2016-12-06 17:02     ` Michael Heerdegen
2016-12-06 22:26   ` s1ohy
2016-12-07  4:52     ` B.V. Raghav
2016-12-07  7:00     ` Bob Proulx [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161206234935004640700@bob.proulx.com \
    --to=bob@proulx.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=s1ohy@waifu.club \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.