From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Romain Francoise Newsgroups: gmane.emacs.devel Subject: Re: follow-link not on mouse-face Date: Sat, 22 Oct 2005 14:14:18 +0200 Organization: orebokech dot com Message-ID: <87br1hwxyd.fsf@pacem.orebokech.com> References: <87ll0n11ey.fsf@jurta.org> <87pspzm0ou.fsf@pacem.orebokech.com> <87zmp2q1pl.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129984427 13998 80.91.229.2 (22 Oct 2005 12:33:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2005 12:33:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 22 14:33:46 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ETIYP-00074I-CG for ged-emacs-devel@m.gmane.org; Sat, 22 Oct 2005 14:32:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ETIYO-00028t-9Q for ged-emacs-devel@m.gmane.org; Sat, 22 Oct 2005 08:32:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ETIJd-00055h-OP for emacs-devel@gnu.org; Sat, 22 Oct 2005 08:17:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ETIJZ-000546-H3 for emacs-devel@gnu.org; Sat, 22 Oct 2005 08:17:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ETIIb-0004dK-0T for emacs-devel@gnu.org; Sat, 22 Oct 2005 08:16:33 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1ETIIb-0000Gv-0Y for emacs-devel@gnu.org; Sat, 22 Oct 2005 08:16:33 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ETIHR-0003ec-Bc for emacs-devel@gnu.org; Sat, 22 Oct 2005 14:15:21 +0200 Original-Received: from yeast.orebokech.com ([82.67.41.165]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Oct 2005 14:15:21 +0200 Original-Received: from romain by yeast.orebokech.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Oct 2005 14:15:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 74 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: yeast.orebokech.com X-Face: }9mYu,e_@+e!`Z-P5kVXa3\_b:hdJ"B)ww[&=b<2=awG:GOIM List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44572 Archived-At: Juri Linkov writes: > So I think the question is not whether to make mouse-1 to have the > exact same effect as mouse-2, but why mouse-2 sensitive areas are > bigger than areas with mouse-face=highlight in the *Occur* buffer. Yes. I think we should simply remove all special properties from the context lines: they're just context and do not really mean anything wrt the match itself. When you click on a context line, point moves to the match line in the buffer, not to the line you clicked in the Occur buffer, which doesn't make much sense. With the following patch, mouse actions and highlighting are put on the match line only, which solves the problem. Clicking mouse-1 elsewhere just sets point. What do you think? Index: lisp/replace.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v retrieving revision 1.225 diff -c -r1.225 replace.el *** lisp/replace.el 20 Oct 2005 16:53:10 -0000 1.225 --- lisp/replace.el 22 Oct 2005 12:00:37 -0000 *************** *** 1133,1139 **** ;; We don't put `mouse-face' on the newline, ;; because that loses. And don't put it ;; on context lines to reduce flicker. ! (propertize curstring 'mouse-face 'highlight) "\n")) (data (if (= nlines 0) --- 1133,1143 ---- ;; We don't put `mouse-face' on the newline, ;; because that loses. And don't put it ;; on context lines to reduce flicker. ! (propertize curstring 'mouse-face 'highlight ! 'occur-target marker ! 'follow-link t ! 'help-echo ! "mouse-2: go to this occurrence") "\n")) (data (if (= nlines 0) *************** *** 1154,1164 **** (let ((beg (point)) (end (progn (insert data) (point)))) (unless (= nlines 0) ! (insert "-------\n")) ! (add-text-properties ! beg end ! `(occur-target ,marker follow-link t ! help-echo "mouse-2: go to this occurrence"))))) (goto-char endpt)) (if endpt (progn --- 1158,1164 ---- (let ((beg (point)) (end (progn (insert data) (point)))) (unless (= nlines 0) ! (insert "-------\n"))))) (goto-char endpt)) (if endpt (progn -- Romain Francoise | I like the streets when it's a miracle -- http://orebokech.com/ | they're empty, I can make the | rest up.