From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: what-page and first line of page? Date: Wed, 16 Sep 2009 13:15:05 +0200 Message-ID: References: <87tyz5ajte.fsf@x2.delysid.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1253099845 30634 80.91.229.12 (16 Sep 2009 11:17:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Sep 2009 11:17:25 +0000 (UTC) Cc: Mario Lang , Emacs Bug Tracker , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 16 13:17:18 2009 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 1MnsVf-0003SO-E4 for ged-emacs-devel@m.gmane.org; Wed, 16 Sep 2009 13:17:15 +0200 Original-Received: from localhost ([127.0.0.1]:48105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnsVe-0006Gh-Hj for ged-emacs-devel@m.gmane.org; Wed, 16 Sep 2009 07:17:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MnsU6-0005XX-0P for emacs-devel@gnu.org; Wed, 16 Sep 2009 07:15:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MnsU0-0005Tc-Sk for emacs-devel@gnu.org; Wed, 16 Sep 2009 07:15:36 -0400 Original-Received: from [199.232.76.173] (port=36255 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnsTz-0005TB-Ve for emacs-devel@gnu.org; Wed, 16 Sep 2009 07:15:32 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:37394) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MnsTz-0007jn-GN for emacs-devel@gnu.org; Wed, 16 Sep 2009 07:15:31 -0400 Original-Received: from mail-fx0-f226.google.com ([209.85.220.226]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MnsTx-00072o-Jz for emacs-devel@gnu.org; Wed, 16 Sep 2009 07:15:29 -0400 Original-Received: by fxm26 with SMTP id 26so3602025fxm.42 for ; Wed, 16 Sep 2009 04:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=9zO0C2U+YN/6cRGnlvWGHLmIDk4QqugcScOyjJJIquQ=; b=in9ry/+XcCu3JLQb1E+ShjOL8urkfRenDpbXkl8Ys+t2gS7yDtySZ+Ly75Y4UMfwek z4e8AW/M90D6/maoKlDRjrAIG+ouviZ2XprF0X1zoaqcvBlxrF2T0WGuf6U2A74SatHH 1IxuOl6sy3il8KLpOD4/g5bmd5NtQZRNdaxjg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=sqyfGXPOEJvds91qIeoh+uMaaxqwqlVbxxlqegXToMmxJ4J/GKW7LbXmNY83joCiiU 336bQHfKOvJolDOJqhHfXJi+qxAp0b2W2TnbSlfxNfXf+56RlGMRfAmqYB48+r/ZJ5Fe UzTEF4R70NeMZlapF93o632E0DbjD/sfZTs+8= Original-Received: by 10.239.187.212 with SMTP id m20mr452725hbh.209.1253099727081; Wed, 16 Sep 2009 04:15:27 -0700 (PDT) In-Reply-To: X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/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:115384 Archived-At: On Tue, Sep 15, 2009 at 03:22, Stefan Monnier wrote: > I removed the beginning-of-line (has been there since the original > commit 1.1 in 1989). Strangely enough, that `beginning-of-line' somewhat masked a bug in `what-page' that happens when `re-search-forward' matches but does not move the point. For example, emacs -Q lisp/ChangeLog M-x what-page => "Page 1, line 1" but emacs -Q lisp/ChangeLog M-x what-page => loops until C-g This happens in ChangeLog files because `page-delimiter' has the value "^\\<\\|^\f", which matches the empty string at the beginning of the buffer. I said the change "somewhat masked" the bug because before it, when the point was on the first line of a ChangeLog, opoint was 1 (because of the beginning-of-line), so the match failed and `what-page' terminated. It only looped from line 2 on, while now it loops from point 2 on. Juanma