From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jpw@pobox.com (John Paul Wallington) Newsgroups: gmane.emacs.help Subject: Re: Regex Problem Date: Mon, 21 Jul 2008 17:23:16 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216572049 10010 80.91.229.12 (20 Jul 2008 16:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jul 2008 16:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 20 18:41:38 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KKbyX-0004yn-MO for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jul 2008 18:41:33 +0200 Original-Received: from localhost ([127.0.0.1]:45943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKbxe-0001gu-JZ for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jul 2008 12:40:38 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 7 Original-X-Trace: individual.net fqfrYpx+z5NITMWz5Pq+QASiDkkzc2zORCKsh3IKfZ1v3FjebQ Cancel-Lock: sha1:Rn55RZuLgPx+bywuBHd7UuLGELs= X-URL: http://www.shootybangbang.com/ X-Attribution: JPW User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (windows-nt) Original-Xref: news.stanford.edu gnu.emacs.help:160404 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55752 Archived-At: Xah writes: > (setq mytext (buffer-substring-no-properties (point) (1+ (buffer- > size)))) Just a nitpick: in general you want to use `point-max' rather than (1+ (buffer-size)) to take into account any narrowing.