From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help 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 Message-ID: <20161206234935004640700@bob.proulx.com> References: <20161205233431659351400@bob.proulx.com> <61e09a1f5e3aa9edbc2560bd9a0563d9@waifu.club> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1481094048 21113 195.159.176.226 (7 Dec 2016 07:00:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Dec 2016 07:00:48 +0000 (UTC) User-Agent: NeoMutt/20161126 (1.7.1) Cc: help-gnu-emacs@gnu.org To: s1ohy@waifu.club Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 07 08:00:40 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEWDU-0003Mv-1Z for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Dec 2016 08:00:36 +0100 Original-Received: from localhost ([::1]:36705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEWDW-0000yU-DZ for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Dec 2016 02:00:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEWD7-0000yM-2X for help-gnu-emacs@gnu.org; Wed, 07 Dec 2016 02:00:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEWD3-0001ET-6T for help-gnu-emacs@gnu.org; Wed, 07 Dec 2016 02:00:13 -0500 Original-Received: from havoc.proulx.com ([96.88.95.61]:39371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEWD3-0001Ds-18 for help-gnu-emacs@gnu.org; Wed, 07 Dec 2016 02:00:09 -0500 Original-Received: from joseki.proulx.com (localhost [127.0.0.1]) by havoc.proulx.com (Postfix) with ESMTP id 9EAC01139; Wed, 7 Dec 2016 00:00:07 -0700 (MST) Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 5E3732192E; Wed, 7 Dec 2016 00:00:07 -0700 (MST) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id 49FDC2DC60; Wed, 7 Dec 2016 00:00:07 -0700 (MST) Mail-Followup-To: s1ohy@waifu.club, help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <61e09a1f5e3aa9edbc2560bd9a0563d9@waifu.club> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 96.88.95.61 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111891 Archived-At: 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