From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Possible problem with looking-back function Date: Wed, 18 Aug 2010 22:15:25 -0300 Message-ID: <4C6C85AD.1010500@ig.com.br> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282180360 4264 80.91.229.12 (19 Aug 2010 01:12:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Aug 2010 01:12:40 +0000 (UTC) To: "GNU Emacs (devel)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 19 03:12:38 2010 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.69) (envelope-from ) id 1OltgK-0006Zn-Rz for ged-emacs-devel@m.gmane.org; Thu, 19 Aug 2010 03:12:37 +0200 Original-Received: from localhost ([127.0.0.1]:35220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OltgK-0007dB-8D for ged-emacs-devel@m.gmane.org; Wed, 18 Aug 2010 21:12:36 -0400 Original-Received: from [140.186.70.92] (port=39801 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OltgC-0007ag-QR for emacs-devel@gnu.org; Wed, 18 Aug 2010 21:12:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OltgB-0003o0-Qo for emacs-devel@gnu.org; Wed, 18 Aug 2010 21:12:28 -0400 Original-Received: from mail-yw0-f41.google.com ([209.85.213.41]:34517) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OltgB-0003nr-Ng for emacs-devel@gnu.org; Wed, 18 Aug 2010 21:12:27 -0400 Original-Received: by ywo7 with SMTP id 7so595020ywo.0 for ; Wed, 18 Aug 2010 18:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=xrcvjs6XKID+lEu367W19KIU3ZjHu/u7r8jPCB2k/JU=; b=Eu876fqetCyJf+CY0mKLQWgQsEVP9F1PWQRGESWLEszPf9mKV5Oiw5ozbWyE8v6NpM hokNmxTOTFNIUJS71OutRHYs2Vhj9zU0m61PRIK3CHd57gRZ8xTm1taSWEbFQmBHyZD8 3w7D7AtKQJo1ptyWH2/AQigZu3CCyk6olHQjM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=K33D73MpvBBLqQFE+VY9ga3T0BpWbnpGrnjJisOgGUhNXTxkLD/cIDWL2oKC0jIzsJ USZurQeW7AXCUMU2JuDfOMH6KXzbwbxc8bJi9UE/Fc46e618JtubvI67jRZCpuPOtotC 3HU1LYYU99zlTlMqYQF2x9V2FlKXxCyCL2zR0= Original-Received: by 10.151.13.7 with SMTP id q7mr1338645ybi.57.1282180346628; Wed, 18 Aug 2010 18:12:26 -0700 (PDT) Original-Received: from [192.168.0.101] ([187.106.54.236]) by mx.google.com with ESMTPS id v6sm2754308ybm.23.2010.08.18.18.12.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Aug 2010 18:12:25 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:128858 Archived-At: Hi, I'm not sure if there is a problem with looking-back function in Emacs 24. Let me explain the problem. Suppose the buffer content is: | 1| .\n | 2| \n | 3| \ \ \ \n | 7| \t\n | 9| \n |10| \n |11| : Where: . represents the point position \n represents the end of line \ represents a space character \t represents a tab character : represents the end of buffer The numbers at first column indicates the point position at beginning of line. Ok, executing the following code: (progn (looking-at "^\\([ \t\n]+\\)") (match-end 1)) It returns 11. Now executing: (progn (goto-char 11) ; go to end of buffer (looking-back "^\\([ \t\n]+\\)" 1 t) (match-beginning 1)) It returns 9. Shouldn't it return 1?