unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Bob Proulx <bob@proulx.com>
To: help-gnu-emacs@gnu.org
Subject: Re: select text without moving the point in graphical interface
Date: Sun, 8 Dec 2013 18:53:13 -0700	[thread overview]
Message-ID: <20131209015313.GA8583@hysteria.proulx.com> (raw)
In-Reply-To: <a364a43b-28c2-4cc8-9a3e-6e08173d9e76@default>

Drew Adams wrote:
> Ernest Adrogué wrote:
> > one of the things I like about running emacs in a terminal is that I
> > can select text without moving the point; is it possible to do the
> > same when running in a graphical interface (GTK)?

I also dearly would like to have this behavior too.  For pasting there
is of course the mouse-middle button.  And with mouse-yank-at-point it
will paste at the point just like in a raw terminal.

  (setq mouse-yank-at-point t)

But that is only the paste half.  The cut half is still missing.

> > Sorry, I wasn't specific enough. I meant selecting text using the mouse.
> >
> > In a terminal, the mouse is independent from emacs and it doesn't interfere
> > with it in any perceivable way, except when I paste something with a middle
> > click.  I think it's the terminal program, and not emacs, who handles the
> > mouse inputs.
> 
> Yes.  The relevant doc is (emacs) `Text-Only Mouse', which explains
> that only some text terminals support mouse clicks.

That is the opposite case.  That covers adding mouse support to a text
terminal.  (Personally I would never want that.  Blech!  But each to
their own.)

The question being asked is to have the graphics terminal behave such
that cutting with the mouse does not move the point.

> > In a GUI, it doesn't work the same way - as soon as I click anywhere the
> > point moves to that location.  I was wondering if tweaking some options I
> > could make GUI emacs behave more or less like when it runs inside a
> > terminal.  For example, to be able to select text (using the X cursor)
> > without moving emacs's point in the process.
> 
> Mouse selection in GUI Emacs is specifically for setting the region
> to the selected text.  So no, to have `mouse-1' not set point you
> would need to redefine a fair number of things.

It is a shame that there isn't some way to create a replacement for
mouse-drag-region that does a save-excursion so that it can cut the
text and then return the point to the previous position when done.  I
have wanted that behavior for years.

> In terminal mode, Emacs does not even recognize the mouse, in the
> sense that if you do `C-h k' and then click or drag the mouse, that
> action is unrecognized.

In terminal mode everything always works "correctly".  :-)  The desire
would be to have the gui mode work the same.

Bob



  reply	other threads:[~2013-12-09  1:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-08 19:00 select text without moving the point in graphical interface Ernest Adrogué
2013-12-08 19:11 ` Drew Adams
2013-12-08 19:34   ` Ernest Adrogué
2013-12-08 20:24     ` Drew Adams
2013-12-08 20:41       ` Ernest Adrogué
2013-12-08 22:13         ` Drew Adams
2013-12-09  1:53           ` Bob Proulx [this message]
2013-12-09  3:45           ` Eli Zaretskii
     [not found]           ` <<83fvq2znym.fsf@gnu.org>
2013-12-09  5:17             ` Drew Adams
2013-12-09 16:20               ` Eli Zaretskii
     [not found]               ` <<83bo0qyp1d.fsf@gnu.org>
2013-12-09 18:16                 ` Drew Adams
2013-12-09 18:33                   ` Eli Zaretskii
     [not found]                   ` <<8338m1zxfj.fsf@gnu.org>
2013-12-09 18:59                     ` Drew Adams
2013-12-08 21:25 ` Michael Heerdegen
2013-12-08 22:58   ` Ernest Adrogué
2013-12-09 19:26     ` Michael Heerdegen
2013-12-10 18:58       ` Ernest Adrogué
2013-12-10 19:02         ` Drew Adams
2013-12-10 19:13         ` Michael Heerdegen
2013-12-10 19:26           ` Ernest Adrogué

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131209015313.GA8583@hysteria.proulx.com \
    --to=bob@proulx.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).