[Top][All Lists]

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

Re: Replacing huge hidden selection when pasting text

From: Michael Heerdegen
Subject: Re: Replacing huge hidden selection when pasting text
Date: Sun, 03 Jan 2016 03:25:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Alexandre Oberlin <> writes:

> On Sunday, January 3, 2016 at 12:05:17 AM UTC+1, Drew Adams wrote:
> > Apologies for not following this thread.  But offhand I'd say that
> > there's your problem right there: you enable `delete-selection-mode'
> > but you disable `transient-mark-mode'.  That should be a no-no.
> Oh my dear, I managed to hit a no-no! But if it's a no-no why is it
> possible in the first place? Why ain't there a single warning? Where
> are emacs's no-nos listed? Where is the checkbox and message saying "I
> agree not to do any emacs no-no, even if I don't know what they are"?
> Are you serious?

I think there was much confusion in the thread, no doubt did the
nihilistic tone of Alexandre inhibit a fruitful discussion.

Drew only wanted to help.  But I think he was wrong with what he said.
I think it's ok to use the two modes at the same time.  In the sentence
Drew cited:

 When Delete Selection mode is enabled, Transient Mark mode is also
 enabled, typed text replaces the selection if the selection is active,
 and DEL deletes the selection.

I think there is an "and" missing, and the sentence means something
different from what we thought.

The current docstring (in my Emacs 25) says:

  When Delete Selection mode is enabled, typed text replaces the
  selection if the selection is active.  Otherwise, typed text is just
  inserted at point regardless of any selection.

With `transient-mark-mode' off, you can mark a region (i.e., turn on
transient mark mode temporarily) by hitting C-SPC twice.  Only then does
delete-selection-mode replace the region.  In any other case (when the
region is not visible, i.e. not active) transient-mark-mode is just off,
and delete-selection-mode should not delete the region, never.

So I think the behavior he sometimes gets could indeed be a bug.  Would
be good to have a bug report, and it would be good if Alexandre would
try to find a recipe so that we can find out what's going on (this could
also be caused by some add on package) and fix the issue when necessary.


reply via email to

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