[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to replace string for a block?
From: |
Vagn Johansen |
Subject: |
Re: How to replace string for a block? |
Date: |
Wed, 27 May 2009 19:26:50 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin) |
Barry Margolin <barmar@alum.mit.edu> writes:
> In article <mailman.7904.1243427777.31690.help-gnu-emacs@gnu.org>,
> Alan Mackenzie <acm@muc.de> wrote:
>
>> > There's no need to narrow the buffer: just set the mark and the point
>> > and M-x replace-{string,regexp} won't go beyond, as documented. Well,
>> > you've activated transient-mark-mode, of course. Who would disable it?
>>
>> I would. Actually, I have. transient-mark-mode is an ill thought out
>> conflation of several logically unrelated features, some of which have
>> names which can only have been thought up when their namers were smoking
>> something soothing, complicated to use, and utterly at variance with
>> Emacs's ethos of elegant simplicity and keeping out of the user's way.
>>
>> Some people seem to like it, though. ;-)
>
> I've been an Emacs user for almost 30 years. For at least half that
> time transient-mark-mode didn't even exist, and after it was added (for
> the benefit of converts from PC word processors, I believe) I resisted
> enabling it for a long time, it seemed like sacrilege. But I finally
> gave in a couple of years ago when I started using Emacs in GUI mode
> heavily at work, and I'm happy I did.
Why? What did you gain?
I immediately disabled it when was introduced. Mostly due to a
(possibly unfounded) fear of having to press C-g all the time to
disable the mark.
> I particularly like when commands automatically operate on either
> the buffer or region depending on whether it's enabled. I installed
> shell-command.el, which makes shell-command-on-region do this
> automagically.
shell-command-on-region is a part Emacs (simple.el). The
shell-command.el I know of augments this with completion features.
But anyway, you don't even need transient-mark-mode enabled to do
this.
Calling set-mark twice (C-SPC C-SPC) enables transient-mark
temporarily (~ transient-transient-mark-mode :-) ). I use it all the
time with M-; (comment-dwim)
--
Vagn Johansen
- How to replace string for a block?, Wu, Kejia, 2009/05/26
- Re: How to replace string for a block?, Lennart Borgman, 2009/05/26
- RE: How to replace string for a block?, Drew Adams, 2009/05/26
- Message not available
- Re: How to replace string for a block?, Pascal J. Bourguignon, 2009/05/27
- Re: How to replace string for a block?, Alan Mackenzie, 2009/05/27
- RE: How to replace string for a block?, Drew Adams, 2009/05/27
- Message not available
- Re: How to replace string for a block?, Barry Margolin, 2009/05/27
- Re: How to replace string for a block?, Alan Mackenzie, 2009/05/27
- Re: How to replace string for a block?, Andreas Röhler, 2009/05/27
- Re: How to replace string for a block?,
Vagn Johansen <=
- Re: How to replace string for a block?, Barry Margolin, 2009/05/27
- Message not available
- Transient mark mode (was Re: How to replace string for a block?), Barry Margolin, 2009/05/27
Re: How to replace string for a block?, Wu, Kejia, 2009/05/26