From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#5809: 23.1.94; cross-reference by anchor yields in accurate position Date: Sun, 04 Apr 2010 22:06:31 -0400 Message-ID: References: <837hoszubi.fsf@gnu.org> <87hbnwy2un.fsf@mail.jurta.org> <83y6h8xz8a.fsf@gnu.org> <8739zf5bif.fsf@mail.jurta.org> <83y6h7vy6p.fsf@gnu.org> <87y6h7uitd.fsf@mail.jurta.org> <83wrwqx6r2.fsf@gnu.org> <83vdcax5hu.fsf@gnu.org> <87d3yi85sv.fsf@mail.jurta.org> <87eiix5u1a.fsf@mail.jurta.org> <878w94dxf2.fsf@mail.jurta.org> <87eiiuwz6g.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1270434375 18789 80.91.229.12 (5 Apr 2010 02:26:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Apr 2010 02:26:15 +0000 (UTC) Cc: 5809@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 05 04:26:10 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nyc0v-0001Pf-6K for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Apr 2010 04:26:09 +0200 Original-Received: from localhost ([127.0.0.1]:50243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nyc0t-0005mQ-Nl for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Apr 2010 22:26:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nyc0o-0005mK-Ku for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2010 22:26:02 -0400 Original-Received: from [140.186.70.92] (port=35063 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nyc0l-0005mC-WD for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2010 22:26:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nyc0k-0000te-3Y for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2010 22:25:59 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51730) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nyc0k-0000tY-0l for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2010 22:25:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NybiQ-0003kQ-6W; Sun, 04 Apr 2010 22:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Apr 2010 02:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5809 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5809-submit@debbugs.gnu.org id=B5809.127043319814400 (code B ref 5809); Mon, 05 Apr 2010 02:07:02 +0000 Original-Received: (at 5809) by debbugs.gnu.org; 5 Apr 2010 02:06:38 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nybi1-0003kD-W3 for submit@debbugs.gnu.org; Sun, 04 Apr 2010 22:06:38 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nybi0-0003k7-0p for 5809@debbugs.gnu.org; Sun, 04 Apr 2010 22:06:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAGbiuEvO+K6K/2dsb2JhbACbTHKyRYUHBIsq X-IronPort-AV: E=Sophos;i="4.51,364,1267419600"; d="scan'208";a="60201266" Original-Received: from 206-248-174-138.dsl.teksavvy.com (HELO pastel.home) ([206.248.174.138]) by ironport2-out.pppoe.ca with ESMTP; 04 Apr 2010 22:06:31 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BFFF385F0; Sun, 4 Apr 2010 22:06:31 -0400 (EDT) In-Reply-To: <87eiiuwz6g.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 05 Apr 2010 02:52:19 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 04 Apr 2010 22:07:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35936 Archived-At: > We could change the background color of the overlay's after-string > to look like the header line (grey background) so users will expect > that only mouse clicks should work on grey areas. I'd rather not change this part of the visual appearance, but maybe it's just my personal preference. I think this decision should be taken with the understanding that we will want to install a real-fix in Emacs-24 so that we can click with the keyboard and copy&paste the breadcrumbs and that we won't want to revert the visual appearance at that point (people get used to visual appearances). > - (when (> Info-breadcrumbs-depth 0) ; skip breadcrumbs line > - (forward-line 1)) I'd keep it commented out, since it may be useful again when we revert to using actual text rather than an after-string. > + (setq line (concat > + line > + (if (null line) "" (propertize " > " 'face 'header-line)) > + (cond > + ((null node) (propertize "..." 'face 'header-line)) > + ((equal node Info-current-node) > + ;; No point linking to ourselves. > + (propertize text 'font-lock-face 'info-header-node)) > + (t > + (propertize text > + 'mouse-face 'highlight > + 'font-lock-face 'info-header-xref > + 'help-echo "mouse-2: Go to node" > + 'keymap Info-link-keymap > + 'link-args text) > + )))))) If we want to use this header-line appearance, couldn't we use something like font-lock-append-text-property rather than apply `header-line' bit-by-bit (and worse yet: in different ways for different parts). I.e. the changes to info-header-xref and info-header-node faces earlier in the patch are not a good idea (think of people who changed those faces, for example). > @@ -4227,9 +4258,6 @@ (defun Info-fontify-node () > ((string-equal (downcase tag) "next") Info-next-link-keymap) > ((string-equal (downcase tag) "up" ) Info-up-link-keymap)))))) > - (when (> Info-breadcrumbs-depth 0) > - (Info-insert-breadcrumbs)) > - > ;; Treat header line. > (when Info-use-header-line > (goto-char (point-min)) > @@ -4260,7 +4288,10 @@ (defun Info-fontify-node () > ;; that is in the header, if it is just part. > (cond > ((> Info-breadcrumbs-depth 0) > - (put-text-property (point-min) (1+ header-end) 'invisible t)) > + (put-text-property (point-min) (1+ header-end) 'invisible t) > + (overlay-put > + (make-overlay header-end (1+ header-end)) > + 'after-string (Info-breadcrumbs))) > ((not (bobp)) > ;; Hide the punctuation at the end, too. > (skip-chars-backward " \t,") Why is the `overlay-put' at a different place than the former Info-insert-breadcrumbs? Stefan PS: the rest of the patch looks OK, so if you can fix the above feel free to install it.