From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adolf Mathias Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83pnrbhvna.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27834"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 34014@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 15 13:55:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6umG-00077M-Cz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Aug 2020 13:55:12 +0200 Original-Received: from localhost ([::1]:46030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6umE-0006tP-E5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Aug 2020 07:55:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6um6-0006t3-PS for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2020 07:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6um6-00089U-Et for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2020 07:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k6um6-0005BV-Ed for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2020 07:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Adolf Mathias Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Aug 2020 11:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34014 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 34014-submit@debbugs.gnu.org id=B34014.159749244719852 (code B ref 34014); Sat, 15 Aug 2020 11:55:02 +0000 Original-Received: (at 34014) by debbugs.gnu.org; 15 Aug 2020 11:54:07 +0000 Original-Received: from localhost ([127.0.0.1]:54387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6ulD-0005A8-95 for submit@debbugs.gnu.org; Sat, 15 Aug 2020 07:54:07 -0400 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:37312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6ulA-00059a-Ds for 34014@debbugs.gnu.org; Sat, 15 Aug 2020 07:54:06 -0400 Original-Received: by mail-wm1-f43.google.com with SMTP id k8so10007576wma.2 for <34014@debbugs.gnu.org>; Sat, 15 Aug 2020 04:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l7c3T4C2bTwMF2dp2TFmnSdxb1n2uBikQZnDX4zdfc0=; b=jcHzbw91RwCiE3mhCw6THQeGh+xYdzSNXvo3Nl8ujb4h2yy0NsUFp/CugIj6Sbs/cS +Mozr/91poA+QG5NvC8GYzsmwwNDMMDRb6loOt5TDo1N7tz7LGOWr9k1/gJQhYXukI+K sa/jRf6HFpk3leWKRKveI4Zn940oyYKrdEFwkQjYuqYZXh3yVGpQ0uUgu/dU+ghIrVIB OVhEjMkN6fbpL7ERROxSODwvmK8U1F0Yj8P/L7mUviClwKfIaTE7Q9tfDEZ98P7EXTce koHw/Duhnukm1qcs3BJQ2jHG4QqPinwUdfdqGFe7e1tzbfWF4w0UcW558SGjyeg2kj6A MKkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l7c3T4C2bTwMF2dp2TFmnSdxb1n2uBikQZnDX4zdfc0=; b=bQ0CzG+azUSM9k2xErVVWox8bLknV0wgc2/G5hxK/lVIAapYvZaqRWBORYwgXXi8WD y77HkgJIM/7Z4wP5DMV9NrFIuZJS/A+vmrXd3YddUKeqQwVM9Wnne6zd8SdGRsI2sdnt JJnnoQgg+41Oz4BUCiKnsrrdGOOuQ4dfM2NbekEz63Qnw8u1JpoBo9TqirJbrGQ+j0Ka PWqck41xFEc1l5xjYBOHg6ra3KbNWh7N9YYoUoVf/AjiOGNgcDGu8WyKbV7sisaGd9ip /6HRHTe5WF8khIkpQSXtbuBR8KrsVAsIAdB6qON2kvaItCfPWJWWi30sFiuUtcsHJQJS N65A== X-Gm-Message-State: AOAM530VVD/2sOUmnVEiIhphn39ZsgF9fuqRvxAHvvNvhReigiwwArs6 G0UkRUclqnnOo+lXDEeEVbNHlM9/ivLnlw8oJAq8Vhdx X-Google-Smtp-Source: ABdhPJwlyTghE7kkxv7CnCgycG+JZtMc2o7Ra+ytuOxeZ5vi5YjewP2gLAjr4mcakGiOw9yvexXxQWtmWuUWAQ8gJxI= X-Received: by 2002:a1c:c90d:: with SMTP id f13mr6637852wmb.25.1597492438452; Sat, 15 Aug 2020 04:53:58 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:185220 Archived-At: 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 wrote: > > Adolf Mathias 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