* comment-dwim does not do what I mean
@ 2010-10-21 19:58 Lars Magne Ingebrigtsen
2010-10-21 20:35 ` Stefan Monnier
0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-21 19:58 UTC (permalink / raw)
To: emacs-devel
I don't have transient-mark-mode switched on.
If I set the mark somewhere, and I then hit `M-;', then the region is no
longer commented out like it used to be.
Is this meant to work this way, or is it just a bug?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comment-dwim does not do what I mean
2010-10-21 19:58 comment-dwim does not do what I mean Lars Magne Ingebrigtsen
@ 2010-10-21 20:35 ` Stefan Monnier
2010-10-21 21:25 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2010-10-21 20:35 UTC (permalink / raw)
To: emacs-devel
> I don't have transient-mark-mode switched on.
> If I set the mark somewhere, and I then hit `M-;', then the region is no
> longer commented out like it used to be.
> Is this meant to work this way, or is it just a bug?
M-; can't guess whether the mark you set was placed there because you
intend to get back there at some point, or because you intend to operate
on the region.
So you need to tell M-; which it is, and you do that by controlling the
"active"-ness of the region. So C-SPC C-SPC ... M-; should do, as will
... C-u C-x C-x M-;
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comment-dwim does not do what I mean
2010-10-21 20:35 ` Stefan Monnier
@ 2010-10-21 21:25 ` Lars Magne Ingebrigtsen
2010-10-22 0:43 ` Miles Bader
2010-10-22 3:23 ` Stefan Monnier
0 siblings, 2 replies; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-21 21:25 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> M-; can't guess whether the mark you set was placed there because you
> intend to get back there at some point, or because you intend to operate
> on the region.
Yes... but all other commands that work on the region ... work on the
region. Now, `M-;' no longer is `comment-region', but `comment-dwim',
which means that it's certainly legitimate to work the way it does, but
I'd rather prefer that it work the way it used to. The way it is today,
the easiest way (by far) to actually do what I mean is to say `M-x
comment-region'.
Which is weird.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comment-dwim does not do what I mean
2010-10-21 21:25 ` Lars Magne Ingebrigtsen
@ 2010-10-22 0:43 ` Miles Bader
2010-10-22 9:59 ` Lars Magne Ingebrigtsen
2010-10-22 3:23 ` Stefan Monnier
1 sibling, 1 reply; 7+ messages in thread
From: Miles Bader @ 2010-10-22 0:43 UTC (permalink / raw)
To: emacs-devel
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Yes... but all other commands that work on the region ... work on the
> region. Now, `M-;' no longer is `comment-region', but `comment-dwim',
> which means that it's certainly legitimate to work the way it does, but
> I'd rather prefer that it work the way it used to.
Wait a minute, hasn't M-; been comment-dwim for a _long_ time...?
Also I seem to recall that the no-region behavior of M-; is _ancient_
(even predating comment-dwim?), and not all that obscure, so probably
isn't the sort of thing to be messed with at least by default...
[BTW, one thing that annoys me about message-mode is that it rebinds
M-; to comment-region -- I often want to _remove_ a level of citation,
and expect M-; to work "normally" (like comment-dwim) ... but it
doesn't, it acts in oppositely from comment-dwim in that situation
:( ]
-Miles
--
Justice, n. A commodity which in a more or less adulterated condition the
State sells to the citizen as a reward for his allegiance, taxes and personal
service.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comment-dwim does not do what I mean
2010-10-22 0:43 ` Miles Bader
@ 2010-10-22 9:59 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-22 9:59 UTC (permalink / raw)
To: emacs-devel
Miles Bader <miles@gnu.org> writes:
> [BTW, one thing that annoys me about message-mode is that it rebinds
> M-; to comment-region -- I often want to _remove_ a level of citation,
> and expect M-; to work "normally" (like comment-dwim) ... but it
> doesn't, it acts in oppositely from comment-dwim in that situation
> :( ]
Message doesn't bind `M-;' any more (as of yesterday), so this should
now work.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comment-dwim does not do what I mean
2010-10-21 21:25 ` Lars Magne Ingebrigtsen
2010-10-22 0:43 ` Miles Bader
@ 2010-10-22 3:23 ` Stefan Monnier
2010-10-22 9:58 ` Lars Magne Ingebrigtsen
1 sibling, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2010-10-22 3:23 UTC (permalink / raw)
To: emacs-devel
>> M-; can't guess whether the mark you set was placed there because you
>> intend to get back there at some point, or because you intend to operate
>> on the region.
> Yes... but all other commands that work on the region ... work on the
> region. Now, `M-;' no longer is `comment-region', but `comment-dwim',
You got it backwards: M-; has never been comment-region.
It's comment-dwim that brought the comment-region behavior to M-;
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: comment-dwim does not do what I mean
2010-10-22 3:23 ` Stefan Monnier
@ 2010-10-22 9:58 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-22 9:58 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> You got it backwards: M-; has never been comment-region.
> It's comment-dwim that brought the comment-region behavior to M-;
Oops. Sorry. I could have sworn that I remembered typing `M-;' before
to comment out code, but I must be misremembering, then.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-10-22 9:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21 19:58 comment-dwim does not do what I mean Lars Magne Ingebrigtsen
2010-10-21 20:35 ` Stefan Monnier
2010-10-21 21:25 ` Lars Magne Ingebrigtsen
2010-10-22 0:43 ` Miles Bader
2010-10-22 9:59 ` Lars Magne Ingebrigtsen
2010-10-22 3:23 ` Stefan Monnier
2010-10-22 9:58 ` Lars Magne Ingebrigtsen
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.