From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: finger-pointer curser as default for mouse-face text Date: Thu, 28 Oct 2004 16:05:00 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098972326 3296 80.91.229.6 (28 Oct 2004 14:05:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Oct 2004 14:05:26 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 28 16:05:09 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CNAtp-0002TL-00 for ; Thu, 28 Oct 2004 16:05:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNB1c-00062k-Eq for ged-emacs-devel@m.gmane.org; Thu, 28 Oct 2004 10:13:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CNB1T-00062O-Is for emacs-devel@gnu.org; Thu, 28 Oct 2004 10:13:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CNB1S-000624-If for emacs-devel@gnu.org; Thu, 28 Oct 2004 10:13:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNB1R-000620-3L for emacs-devel@gnu.org; Thu, 28 Oct 2004 10:13:01 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1CNAta-0002HU-VE for emacs-devel@gnu.org; Thu, 28 Oct 2004 10:04:55 -0400 Original-Received: (qmail 83174 invoked from network); 28 Oct 2004 14:04:53 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 28 Oct 2004 14:04:53 -0000 Original-To: "Drew Adams" In-Reply-To: (Drew Adams's message of "Wed, 27 Oct 2004 10:29:55 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29112 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29112 [For the busy reader -- see patch to tooltip code at the end. ++kfs] "Drew Adams" writes: > -----Original Message-----From: Kim F. Storm > document the current "standard" behaviour, > and then add a section at an appropriate place which says something like: > > Whenever you can click with mouse-2 to follow a link, you may also be > able to follow the link by a double click or a short click with > mouse-1. The actual mouse-1 action that you need to follow a link is > controlled by the user option mouse-1-click-follows-link. > > mouse-1 click to follow links or click action buttons, if available, should > become the _standard_ behavior. Instead of introducing mouse-2 as the > standard behavior, and then saying that mouse-1 "may also be" usable as an > alternative in many contexts, we should just introduce mouse-1 clicking (or > not bother to introduce it at all! - the closer Emacs behavior is to what > users are used to, the less explanation we need). We should not mention > mouse-2 in this context. Mouse-2 IS the standard behaviour -- Lisp code binds mouse-2, not mouse-1. Changing that is a HUGE change. In comparison, the proposed change is a tiny change which adds a convenient mapping of mouse-1 to mouse-2 in this specific case. The text could be rephrased to say: With the default settings, click mouse-1 to follow a highlighted link. If you want to set the point rather than follow the link, just keep the mouse-1 button pressed a little longer (at least 0.35 seconds). This behaviour is a major change from traditional emacs mouse behaviour where you use mouse-2 to follow links, while mouse-1 (typically) would set point in the link. The mouse-2 binding is still the standard binding for following a link, while the mouse-1 behaviour is customized via the variable mouse-1-click-follows-link. For example, you can control the length of the click, or you can make only a mouse-1 double-click follow links, while keeping the traditional mouse-1 behaviour. > > What about mouse-2? If mouse-1 clicking follows links, there is no reason > for mouse-2 to duplicate this behavior. I think Kim has (for now) left > mouse-2 as an alternative to mouse-1 in his patch: both do the same thing > wrt links. I would prefer that we adopt mouse-1 and drop mouse-2 (except as > an optional replacement for mouse-1 -- one or the other; not both). Let > users (or future Emacs versions) use mouse-2 for something else in this > context - by default, it should probably be `mouse-yank-at-click' in most > contexts. I don't think we shall do anything about mouse-2 clicks -- that's the traditional binding, and the binding you make at the Lisp level. > One problem is the tooltips which say "click mouse-2 to ...". > To fix that requires that we change all places where the tooltips > are created (unless there is some place we can put in a clever > rewrite of the message). > > Such messages should ideally be constructed based on dynamic key bindings, > so that they would automatically reflect the appropriate behavior. Isn't it > possible to use, say, `substitute-command-keys' here? Here is a patch to the tooltip code to change mouse-2 to mouse-1 on the fly: *** tooltip.el 01 Sep 2003 17:45:17 +0200 1.34 --- tooltip.el 28 Oct 2004 13:31:16 +0200 *************** *** 480,486 **** (defun tooltip-show-help-function (msg) "Function installed as `show-help-function'. MSG is either a help string to display, or nil to cancel the display." ! (let ((previous-help tooltip-help-message)) (setq tooltip-help-message msg) (cond ((null msg) ;; Cancel display. This also cancels a delayed tip, if --- 480,502 ---- (defun tooltip-show-help-function (msg) "Function installed as `show-help-function'. MSG is either a help string to display, or nil to cancel the display." ! (let ((previous-help tooltip-help-message) ! mp pos) ! (if (and mouse-1-click-follows-link ! (stringp msg) ! (save-match-data ! (string-match "^mouse-2" msg)) ! (setq mp (mouse-pixel-position)) ! (consp (setq pos (cdr mp))) ! (setq pos (posn-at-x-y (car pos) (cdr pos) (car mp))) ! (windowp (posn-window pos))) ! (with-current-buffer (window-buffer (posn-window pos)) ! (setq lttt (list msg mp pos)) ! (if (mouse-on-link-p (posn-point pos)) ! (setq msg (concat ! (if (eq mouse-1-click-follows-link 'double) ! "double-" "") ! "mouse-1" (substring msg 7)))))) (setq tooltip-help-message msg) (cond ((null msg) ;; Cancel display. This also cancels a delayed tip, if -- Kim F. Storm http://www.cua.dk