From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: `vertical-motion', `goto-line' set point to invisible text Date: Sun, 03 Jul 2011 10:50:21 -0400 Message-ID: References: <87ei28f4re.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309704650 6898 80.91.229.12 (3 Jul 2011 14:50:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2011 14:50:50 +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 16:50:45 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 1QdO0T-0002CF-A5 for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2011 16:50:45 +0200 Original-Received: from localhost ([::1]:44850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdO0S-0001bJ-7O for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2011 10:50:44 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdO09-0001an-4z for emacs-devel@gnu.org; Sun, 03 Jul 2011 10:50:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdO07-0001s5-Rh for emacs-devel@gnu.org; Sun, 03 Jul 2011 10:50:24 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:60246 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdO07-0001ru-Cc for emacs-devel@gnu.org; Sun, 03 Jul 2011 10:50:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAIiAEE5FxIxr/2dsb2JhbABSp3x4iHrARIY2BJ5chCw X-IronPort-AV: E=Sophos;i="4.65,467,1304308800"; d="scan'208";a="120012622" Original-Received: from 69-196-140-107.dsl.teksavvy.com (HELO ceviche.home) ([69.196.140.107]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 03 Jul 2011 10:50:21 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 32D1266112; Sun, 3 Jul 2011 10:50:21 -0400 (EDT) In-Reply-To: <87ei28f4re.fsf@gmail.com> (Dmitry Kurochkin's message of "Sun, 03 Jul 2011 06:59:49 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 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:141496 Archived-At: > While working on notmuch [1] emacs client, I stumbled upon an unexpected > behavior: `beginning-of-visual-line' places point to invisible text in > the beginning to the line. I.e. you have: > line1 > line2 <--- this line is not visible > line3 <--- point is on this line > in this case, `beginning-of-visual-line' will set the position to start > of line2 (which is invisible), not line3. It differs from what > `move-beginning-of-line' and even does not match > `line-beginning-position'. `beginning-of-visual-line' uses > `vertical-motion' to do the job. `goto-line' has a similar behavior. I > believe there are more functions like this. > This does not look right to me. I expect these functions never set > point inside invisible text and there should be some general way to > protect from this. AFAIK none of those positions are *inside* invisible text (remember that point is always between two chars). Stefan