all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adolf Mathias <adolf.mathias@gmail.com>
To: Stefan Kangas <stefan@marxist.se>
Cc: 34014@debbugs.gnu.org
Subject: bug#34014: 25.2; binding down mouse event with modifier to mouse-drag-region does not work
Date: Sat, 15 Aug 2020 13:53:47 +0200	[thread overview]
Message-ID: <CACHJYueuu5j8OJUnePaBsrt_wwvg-0UF1FmhNRaankMUjFUqeQ@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmnNLvz2F82jPW=X61wicOsK0XagYEaAG3f_xmWfDsEeVA@mail.gmail.com>

Sorry, I always had the impression that the comment of
mouse-stay-ad-copy was explicit enough - also, when I was in
conversation with the previous guy who processed this bug report, I
explained it to him, and most certainly didn't reply to all, and that
person did not mention this to me as you did. Anyway...

The function allows a workflow that I know from the SunOS Textedit
from the late 1980s. Your cursor is somewhere in the text, you drag
out a region in the same window/buffer or another one, and the text
that you selected gets copied to your cursor at mouse button release,
without having to reposition your cursor.

Without it, the normal workflow is: you remember where your cursor is,
select a region and either use middle button to paste at the
remembered position, given that you are dexterous enough to hit the
right spot (which, as you can tell from my experiences with SunOS, is
not so much the case any more), or hit Ctrl-C or Alt-W, then position
the cursor at the remembered position and hit Ctrl-Y or Ctrl-V.

mouse-stay-and-copy accelerates a very frequent operation and saves
the user from having to remember the original inserting position and
being dexterous enough to hit it again,  or having to use the Emacs
mark stack that I personally find rather unintuitive.

Along with mouse-stay-and-copy, I also have mouse-stay-and-kill, which
kills the temporarily dragged out region and moves it to the original
cursor position, and mouse-stay-and-swap, which, given a currently
selected region, allows to drag out that temporary selection whose
content is then swapped with the original selection. That one saves a
lot of work in certain cases, once you are used to it. I used to bind
it to C-M-button1.

On Sat, Aug 15, 2020 at 4:20 AM Stefan Kangas <stefan@marxist.se> wrote:
>
> Adolf Mathias <adolf.mathias@gmail.com> writes:
>
> > On Emacs Post 24, this stopped to work.
>
> Could you also explain what exactly your code is supposed to be doing?
>
> And did you try the following?
>
> (define-key global-map '[S-down-mouse-1] 'mouse-stay-and-copy)
> (define-key global-map '[S-drag-mouse-1] 'mouse-set-region)
>
> Best regards,
> Stefan Kangas





  reply	other threads:[~2020-08-15 11:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08  9:51 bug#34014: 25.2; binding down mouse event with modifier to mouse-drag-region does not work Adolf Mathias
2019-03-01  8:00 ` Eli Zaretskii
2020-08-13 12:02   ` Stefan Kangas
     [not found]     ` <CACHJYuftHtcJ_ixA0vKbRavKstkaR8fkBaZxyoO_N41Zq7Qy4w@mail.gmail.com>
2020-08-14 14:29       ` Stefan Kangas
2020-08-14 18:58         ` Adolf Mathias
2020-08-15  2:20           ` Stefan Kangas
2020-08-15 11:53             ` Adolf Mathias [this message]
2020-08-16 14:34               ` Stefan Kangas
2020-08-16 16:20                 ` Adolf Mathias
2020-08-16 17:10                   ` Stefan Kangas
2020-08-16 20:54                     ` Adolf Mathias
2020-08-17 14:27                       ` Stefan Kangas
     [not found]                         ` <CACHJYue_KVWZ=wF-sa6nHCsAso0SDb0XSoXCRgW0teiR_Gt15Q@mail.gmail.com>
2020-08-18 13:26                           ` Stefan Kangas
2020-08-18 15:07                       ` Adolf Mathias
2020-08-18 15:32                         ` Stefan Kangas
2020-08-15 12:07             ` Adolf Mathias
2020-08-16 21:00 ` bug#34014: Adolf Mathias

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=CACHJYueuu5j8OJUnePaBsrt_wwvg-0UF1FmhNRaankMUjFUqeQ@mail.gmail.com \
    --to=adolf.mathias@gmail.com \
    --cc=34014@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    /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.