From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: invisible Date: Mon, 26 Nov 2007 10:29:36 -0500 Message-ID: References: <20040225.150142.12214540.kazu@iijlab.net> <200402282128.i1SLSuY15359@raven.dms.auburn.edu> <200402290224.i1T2Oip15705@raven.dms.auburn.edu> <87sl3fdqs3.fsf@escher.local.home> <87zlxc5r2f.fsf@escher.local.home> <474059CD.1060107@gmx.at> <87r6ihi1z7.fsf@escher.local.home> <4746E2CF.4010604@gmx.at> <87k5o8q0y5.fsf@escher.local.home> <4747312D.7020605@gmx.at> <87fxywpuuy.fsf@escher.local.home> <47474B8C.9020806@gmx.at> <87bq9kpnqd.fsf@escher.local.home> <4747EFE8.5090405@gmx.at> <474A7CF6.8030802@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196091104 20702 80.91.229.12 (26 Nov 2007 15:31:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2007 15:31:44 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Stephen Berman , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 26 16:31:51 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iwfva-0005WK-Md for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2007 16:31:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwfvL-0003te-DA for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2007 10:31:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iwfv8-0003jI-Sw for emacs-devel@gnu.org; Mon, 26 Nov 2007 10:30:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iwfv7-0003iB-N5 for emacs-devel@gnu.org; Mon, 26 Nov 2007 10:30:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iwfv7-0003hq-9h for emacs-devel@gnu.org; Mon, 26 Nov 2007 10:30:49 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iwfv2-0002bl-2q; Mon, 26 Nov 2007 10:30:44 -0500 Original-Received: from ceviche.home (vpn-132-204-232-58.acd.umontreal.ca [132.204.232.58]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id lAQFUgXZ015897; Mon, 26 Nov 2007 10:30:42 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id D4665B42E5; Mon, 26 Nov 2007 10:29:36 -0500 (EST) In-Reply-To: <474A7CF6.8030802@gmx.at> (martin rudalics's message of "Mon, 26 Nov 2007 08:59:50 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-NAI-Spam-Score: -2.5 X-NAI-Spam-Rules: 2 Rules triggered BAYES_00=-2.5, HAS_X_HELO=0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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: , 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:84143 gmane.emacs.pretest.bugs:20371 Archived-At: >> If you have a conrete situation where the current behavior is >> problematic, firsyt you need to understand how those things work: >> there are 2 places where invisibility impacts movement: >> - when combined with `intangible', it impacts every single movement of >> `point', including within elisp functions. This may "do the right >> thing" in some sense, but it tends to break a lot of code, and >> it can be terribly difficult to write code that works in the face of >> intangible properties. So I highly recommend against the use of >> `intangible' except for those rare cases where it's *really* >> absolutely needed. > Intangible text was never mentioned in this thread. Great. (I had no idea because the thread was just too big for me to follow it) > This thread is about `line-move-ignore-invisible' - an option defined in > simple.el with the following doc-string: > *Non-nil means C-n and C-p ignore invisible lines. > Outline mode sets this. > Either this option makes sense - then we have to talk about C-n/C-p > _and_ invisible text - or it doesn't. In the latter case let's remove > the option and the problem is resolved. It makes sense and we need to keep it. But it interacts with point adjustment. So try and reproduce the bug first with disable-point-adjustment so as to eliminate a variable. [ We could also dispense with the variable and use disable-point-adjustment for it, but then one wouldn't be able to disable one without disabling the other which is sometimes inconvenient while debugging. ] > I never use "those things" hence I don't care about whether these > qualify as "serious symptoms". You use point-adjustment all the time since it's enabled by default. > I just reacted to a couple of problems > reported by others. One of these was I wasn't ranting against you. Sorry. It was against this thread with its umpteen recipes. > "the cursor stays put, i.e., C-p is a no-op here" Great: a clear bug. Thanks for helping. > *** simple.el.~1.888.~ Sat Nov 10 09:23:20 2007 > --- simple.el Sun Nov 18 16:02:42 2007 > *************** > *** 3862,3868 **** > (save-excursion > ;; Like end-of-line but ignores fields. > (skip-chars-forward "^\n") > ! (while (and (not (eobp)) (invisible-p (point))) > (goto-char (next-char-property-change (point))) > (skip-chars-forward "^\n")) > (point)))) > --- 3862,3869 ---- > (save-excursion > ;; Like end-of-line but ignores fields. > (skip-chars-forward "^\n") > ! (while (and line-move-ignore-invisible > ! (not (eobp)) (invisible-p (point))) > (goto-char (next-char-property-change (point))) > (skip-chars-forward "^\n")) > (point)))) Looks good. > *************** > *** 3940,3948 **** > This function works only in certain cases, > because what we really need is for `move-to-column' > and `current-column' to be able to ignore invisible text." This text seems odd: AFAIK they *do* ignore invisible text. Does it want to say that they sould ignore the `invisible' text property? > This function works only in certain cases, > because what we really need is for `move-to-column' > and `current-column' to be able to ignore invisible text." > ! (cond > ! ((zerop col) > ! (beginning-of-line)) > ! (line-move-ignore-invisible > (move-to-column col)) > + (t > + ;; Tedious. > + (save-restriction > + (narrow-to-region (line-beginning-position) (line-end-position)) > + (move-to-column col)))) > > (when (and line-move-ignore-invisible > (not (bolp)) (invisible-p (1- (point)))) The docstring of line-move-to-column is too vague: it doesn't say what it intends to do, really: "considering invisibility" is not much help. If someone knows what it intends to do, really, maybe we can figure out how to fix it (probably the best fix will be to change the C code). Stefan