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: Info enhancements Date: 09 Dec 2003 12:53:23 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <878ylrbbk4.fsf@mail.jurta.org> <200312051426.hB5EQeZ11287@f7.net> <87ekvjuuj8.fsf@mail.jurta.org> <200312051802.hB5I2EC04476@raven.dms.auburn.edu> <87d6b2iyec.fsf@mail.jurta.org> <87brqkl3x2.fsf@mail.jurta.org> <87vfor62k9.fsf@mail.jurta.org> <871xrfy4d3.fsf@mail.jurta.org> <878ylnbdui.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1070967988 7417 80.91.224.253 (9 Dec 2003 11:06:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Dec 2003 11:06:28 +0000 (UTC) Cc: Eli Zaretskii , karl@freefriends.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Dec 09 12:06:17 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ATfh3-0007Ri-00 for ; Tue, 09 Dec 2003 12:06:17 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ATfh3-00062G-00 for ; Tue, 09 Dec 2003 12:06:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ATgUS-0001Jl-AM for emacs-devel@quimby.gnus.org; Tue, 09 Dec 2003 06:57:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ATgUG-0001J2-N2 for emacs-devel@gnu.org; Tue, 09 Dec 2003 06:57:08 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ATgTk-0001Gh-I1 for emacs-devel@gnu.org; Tue, 09 Dec 2003 06:57:07 -0500 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.24) id 1ATgSi-0001Cq-CY for emacs-devel@gnu.org; Tue, 09 Dec 2003 06:55:32 -0500 Original-Received: (qmail 82766 invoked from network); 9 Dec 2003 10:54:03 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 9 Dec 2003 10:54:03 -0000 Original-To: Juri Linkov In-Reply-To: <878ylnbdui.fsf@mail.jurta.org> Original-Lines: 65 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18576 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18576 Juri Linkov writes: > Eli Zaretskii writes: > >> From: Juri Linkov > >> Date: Mon, 08 Dec 2003 12:46:00 +0200 > >> > >> inserting the text "See" into Info buffers breaks > >> some Info functions (e.g. `Info-last', `Info-search'). > > > > You don't need to actually insert "see" into the buffer, you could > > define an overlay instead. > > Seems overlays don't interact well with the `invisible' property. > For instance, move point to the beginning of the reference > with Info-hide-note-references=t and evaluate this code: > M-: (overlay-put (make-overlay (point) (point)) 'before-string "See ") > and the reference loses its fontification. I still think Info-hide-note-references=t is a good default choice if we can make it work better. And I think we can. The following patch seems to work well for me (no lost fontification of the reference), and it doesn't alter the buffer as before, which should make references by buffer positions work again. And copy/paste works at least as well (or equally bad) as before. *** info.el.~1.374.~ 2003-10-06 09:14:21.000000000 +0200 --- info.el 2003-12-09 12:48:04.000000000 +0100 *************** *** 2938,2944 **** (goto-char next)) (if hide-tag (add-text-properties (match-beginning 1) (match-end 1) ! '(invisible t front-sticky nil rear-nonsticky t))) (add-text-properties (match-beginning 2) (match-end 2) (cons 'help-echo --- 2938,2946 ---- (goto-char next)) (if hide-tag (add-text-properties (match-beginning 1) (match-end 1) ! (if other-tag ! `(display ,other-tag front-sticky nil rear-nonsticky t) ! '(invisible t front-sticky nil rear-nonsticky t)))) (add-text-properties (match-beginning 2) (match-end 2) (cons 'help-echo *************** *** 2950,2959 **** (when (eq Info-hide-note-references t) (add-text-properties (match-beginning 3) (match-end 3) '(invisible t front-sticky nil rear-nonsticky t))) - (when other-tag - (save-excursion - (goto-char (match-beginning 1)) - (insert other-tag))) (when (and Info-refill-paragraphs (or hide-tag (eq Info-hide-note-references t))) (push (set-marker (make-marker) start) --- 2952,2957 ---- -- Kim F. Storm http://www.cua.dk