all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikolaj Schumacher <me@nschum.de>
To: Neal Becker <ndbecker2@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: extending mouse selection?
Date: Sat, 04 Oct 2008 17:00:12 +0200	[thread overview]
Message-ID: <m2r66wwglf.fsf@nschum.de> (raw)
In-Reply-To: <gc61qa$9ft$1@ger.gmane.org> (Neal Becker's message of "Fri\, 03 Oct 2008 17\:11\:37 -0400")

Neal Becker <ndbecker2@gmail.com> wrote:

> Should this work?

Emacs doesn't necessarily follow such conventions.
One could argue, however, that it should work at least in cua-mode.  You
could report it as a bug and see what happens.

> Is there an alternative key binding?

I don't know, but writing your own command is pretty straight-forward:

(defun mouse-extend-region (event)
  (interactive "e")
  (let ((pos (posn-point (event-start event))))
    (set-mark (if mark-active
                  (if (< pos (region-beginning))
                      (region-end)
                    (region-beginning))
                (point)))
    (goto-char pos)))

(global-set-key (kbd "<S-mouse-1>") 'mouse-extend-region)
(global-set-key (kbd "<S-down-mouse-1>") nil)

regards,
Nikolaj Schumacher




      parent reply	other threads:[~2008-10-04 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03 21:11 extending mouse selection? Neal Becker
2008-10-03 22:40 ` Peter Dyballa
2008-10-04 15:00 ` Nikolaj Schumacher [this message]

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=m2r66wwglf.fsf@nschum.de \
    --to=me@nschum.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ndbecker2@gmail.com \
    /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.