From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: `vertical-motion', `goto-line' set point to invisible text Date: Sun, 03 Jul 2011 16:33:54 +0300 Message-ID: <837h7zqyil.fsf@gnu.org> References: <87ei28f4re.fsf@gmail.com> <87liwf4y7o.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1309700263 18261 80.91.229.12 (3 Jul 2011 13:37:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2011 13:37:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Kurochkin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 03 15:37:37 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QdMrh-00059d-CW for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2011 15:37:37 +0200 Original-Received: from localhost ([::1]:45641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdMrg-0006tF-EX for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2011 09:37:36 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdMow-0006JB-CW for emacs-devel@gnu.org; Sun, 03 Jul 2011 09:34:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdMou-0007lH-Ds for emacs-devel@gnu.org; Sun, 03 Jul 2011 09:34:46 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:37751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdMot-0007l7-W4 for emacs-devel@gnu.org; Sun, 03 Jul 2011 09:34:44 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LNR00600E4CPI00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sun, 03 Jul 2011 16:34:42 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.8.216]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LNR004E7F1POTR0@a-mtaout22.012.net.il>; Sun, 03 Jul 2011 16:34:38 +0300 (IDT) In-reply-to: <87liwf4y7o.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141491 Archived-At: > From: Dmitry Kurochkin > Cc: emacs-devel@gnu.org > Date: Sun, 03 Jul 2011 11:31:23 +0400 > > Is there a way to ask Emacs to sync point to visible position, so > that I do not have to do it by hand? Not sure what that means. Can you explain more about what you are looking for? > I.e. M-: (progn (backward-char) (point)) works fine. But after that > M-: (point) returns another position which corresponds to the > beginning of the hidden line. I guess this has to do command loop I > know nothing about. When a command finishes and Emacs is idle (i.e. has nothing else to do), it examines the position of point. If it finds that point is on some character where it shouldn't be, it moves point to the next "suitable" character in the direction of last move. Text where point shouldn't be includes: invisible text, non-base character that belongs to a composed character, and text covered by a "replacing" `display' property. > IMO Emacs should not touch the point in this case, because it is > already visible. Sounds like a bug to me. If no one comes up with a plausible explanation until tomorrow, feel free to submit a bug report. Btw, I just tried past releases, and Emacs 21.4 didn't have this problem, but Emacs 22.3 did. I guess that's a side effect of point adjustment described above, which Emacs 21.4 didn't have: in Emacs 21.4, the cursor stays put for several C-f or C-b commands, as long as point is on invisible text.