From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: invisible Date: Mon, 26 Nov 2007 08:59:50 +0100 Message-ID: <474A7CF6.8030802@gmx.at> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050403030809060306010004" X-Trace: ger.gmane.org 1196065863 1846 80.91.229.12 (26 Nov 2007 08:31:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2007 08:31:03 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Stephen Berman , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 26 09:31:10 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 1IwZN0-0002on-2j for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2007 09:31:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwZMl-0002MZ-1R for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2007 03:30:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IwZLz-00029j-9Y for emacs-devel@gnu.org; Mon, 26 Nov 2007 03:30:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IwZLv-00028z-Ju for emacs-devel@gnu.org; Mon, 26 Nov 2007 03:30:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwZLv-00028w-EM for emacs-devel@gnu.org; Mon, 26 Nov 2007 03:30:03 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IwZLu-0002YW-Rw for emacs-devel@gnu.org; Mon, 26 Nov 2007 03:30:03 -0500 Original-Received: (qmail invoked by alias); 26 Nov 2007 08:03:21 -0000 Original-Received: from N846P012.adsl.highway.telekom.at (EHLO [62.47.49.172]) [62.47.49.172] by mail.gmx.net (mp032) with SMTP; 26 Nov 2007 09:03:21 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18zGgF4/LIzrjF9Ngqbjf2l6k6ETo9Ch2uuT7f+gO 09nhzkvO23W/VR User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:84131 gmane.emacs.pretest.bugs:20367 Archived-At: This is a multi-part message in MIME format. --------------050403030809060306010004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > 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. > - when not combined with `intangible', invisible properties have the > effect (just like composition and display properties) that after each > *command* (i..e more or less just after running post-command-hook) > point is moved outside of the invisible text. Now since it's done at > the end of a command (which may have moved point many times in > arbitrarily complex ways), you can't do it right 100% of the time. > OTOH this interacts fine with pretty much any elisp code. > > Many of the problems you point out have to do with interactions with C-n > and C-p which are surprisingly complex functions. The interaction > between all three is even worse. > > So if you can try and reproduce the problem with only C-n/C-p (i.e. no > intangible text and with non-nil disable-point-adjustement) or with > only intangible text or with only invisible text, that makes it more > likely we can try and fix 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. > Also the interaction with those things is sufficiently bad, that there > are many problematic cases. So if the problem only appears when you mix > those, to have a better chance of seeing your bug fixed, try to make > sure the symptom is really serious: e.g. C-n does move at all (or moves > backward). I never use "those things" hence I don't care about whether these qualify as "serious symptoms". I just reacted to a couple of problems reported by others. One of these was "the cursor stays put, i.e., C-p is a no-op here" reported in 2004. Apparently, it didn't have much chance getting fixed then. > And focus on *1* problem at a time. I focused on *1* solution at a time. >>Meanwhile could you please check my patch for simple.el too? > > > Please post it again, Attached. --------------050403030809060306010004 Content-Type: text/plain; name="simple.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="simple.patch" *** 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)))) *************** *** 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." ! (if (zerop col) ! (beginning-of-line) (move-to-column col)) (when (and line-move-ignore-invisible (not (bolp)) (invisible-p (1- (point)))) --- 3941,3956 ---- 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)))) --------------050403030809060306010004 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------050403030809060306010004--