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 invisible changes Date: 14 Nov 2002 00:31:16 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: <5x4ralcaij.fsf@kfs2.cua.dk> References: <200211011623.gA1GNAL03601@rum.cs.yale.edu> <5xznsnvabl.fsf@kfs2.cua.dk> <200211061511.gA6FBfL02691@rum.cs.yale.edu> <5xfzu79jxp.fsf@kfs2.cua.dk> <200211121849.gACInHA08073@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037233515 9281 80.91.224.249 (14 Nov 2002 00:25:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 14 Nov 2002 00:25:15 +0000 (UTC) Cc: storm@cua.dk (Kim F. Storm), rms@gnu.org, miles@lsi.nec.co.jp, monnier+gnu/emacs@rum.cs.yale.edu, emacs-devel@gnu.org, emacs-pretest-bug@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18C7Qb-0001MP-00 for ; Thu, 14 Nov 2002 01:00:13 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18C7cj-000304-00 for ; Thu, 14 Nov 2002 01:12:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18C7Q5-0000c3-00; Wed, 13 Nov 2002 18:59:41 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18C62m-0006WL-00 for emacs-devel@gnu.org; Wed, 13 Nov 2002 17:31:32 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18C62i-0006TW-00 for emacs-devel@gnu.org; Wed, 13 Nov 2002 17:31:31 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10) id 18C62h-0006Sx-00; Wed, 13 Nov 2002 17:31:28 -0500 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 92C477C017; Wed, 13 Nov 2002 22:31:23 +0000 (GMT) Original-To: "Stefan Monnier" In-Reply-To: <200211121849.gACInHA08073@rum.cs.yale.edu> Original-Lines: 52 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9402 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9402 "Stefan Monnier" writes: > > 1) it doesn't test for 'invisible properties, so it happily processes > > invisible text when deciding the (visible) width of the lines, > > Are you sure ? It uses current-column which does pay attention > to `invisible' properties. It works in relation to fill, yes. But in general, the behaviour of current-column is "questionable" when the buffer contains invisible newlines. Consider the following code: (let ((b (get-buffer-create "current-column test"))) (set-buffer b) (erase-buffer) (insert "abc\ndef\nghi") (add-text-properties 4 5 '(invisible t)) (add-text-properties 8 9 '(invisible t)) ;; buffer now displays as one line: abcdefghi ;; position on the `h' (goto-char 10) (current-column)) It creates a buffer with the following data line (where # indicates an invisible newline): abc# def# ghi I.e. the visible result is: abcdefghi Here, current-column claims that `h' is in column 1. This is because current_column_1 uses scan_newline to find the line start, but scan_newline doesn't skip over invisible newlines... > > > 3) when the fill code inserts a newline to wrap the text, it may > > insert that newline in an invisible part of the buffer, so it has > > no visible effect (i.e. displaying one very long line rather than > > two normal width lines). > > You can fix this easily. See fill-nobreak-predicate. Thanks. I learn something new every day. ++kfs