From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ray Newsgroups: gmane.emacs.help Subject: Re: narrow question Date: Wed, 27 Sep 2006 19:45:58 +0800 Message-ID: <2504af190609270445m56c58be7g38dcd59a7308f8e5@mail.gmail.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0574204871==" X-Trace: sea.gmane.org 1159357586 14423 80.91.229.2 (27 Sep 2006 11:46:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Sep 2006 11:46:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 27 13:46:24 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GSXrj-0000VM-6L for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Sep 2006 13:46:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GSXri-0004JW-8t for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Sep 2006 07:46:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GSXrV-0004J5-FR for help-gnu-emacs@gnu.org; Wed, 27 Sep 2006 07:46:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GSXrU-0004In-0K for help-gnu-emacs@gnu.org; Wed, 27 Sep 2006 07:46:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GSXrT-0004Ik-To for help-gnu-emacs@gnu.org; Wed, 27 Sep 2006 07:45:59 -0400 Original-Received: from [66.249.92.173] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GSXwK-0001gS-Nx for help-gnu-emacs@gnu.org; Wed, 27 Sep 2006 07:51:00 -0400 Original-Received: by ug-out-1314.google.com with SMTP id 36so41610uga for ; Wed, 27 Sep 2006 04:45:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Df4ie1ctbyYtLo+fv8COUhuHWUZB0qB2F6cjOKbdgIxa+r7fkO7Zns2ldfFS1BFTeGTqaPDvm3UE1yNbCzhWntlukBNq2VR2D0/xivELrKMrytgsGIBxiUPHNsL+8EWEZa/T/H8y4dmO2qG88ZObhqphp38JU8Yw3oZa8JjSaqs= Original-Received: by 10.67.100.17 with SMTP id c17mr431097ugm; Wed, 27 Sep 2006 04:45:58 -0700 (PDT) Original-Received: by 10.66.255.1 with HTTP; Wed, 27 Sep 2006 04:45:58 -0700 (PDT) Original-To: help-gnu-emacs@gnu.org In-Reply-To: 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:37671 Archived-At: --===============0574204871== Content-Type: multipart/alternative; boundary="----=_Part_31583_27246565.1159357558654" ------=_Part_31583_27246565.1159357558654 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline It works, Thank you. On 9/27/06, Barry Margolin wrote: > > In article , > ray wrote: > > > I have learned to use narrow-to-region to narrow a buffer. But how can I > > determine whether a buffer is narrowed with elisp? Thanks. > > (defun buffer-narrowed-p () > (/= (- (point-max-marker) (point-min-marker)) > (buffer-size))) > > -- > Barry Margolin, barmar@alum.mit.edu > Arlington, MA > *** PLEASE post questions in newsgroups, not directly to me *** > *** PLEASE don't copy me on replies, I'll read them in the group *** > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > ------=_Part_31583_27246565.1159357558654 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline It works,  Thank you.

On 9/27/06, Barry Margolin <barmar@alum.mit.edu> wrote:
In article <mailman.7430.1159275829.9609.help-gnu-emacs@gnu.org>,
ray <hantechs@gmail.com> wrote:

> I have learned to use narrow-to-region to narrow a buffer. But how can I
> determine whether a buffer is narrowed with elisp? Thanks.

(defun buffer-narrowed-p ()
  (/= (- (point-max-marker) (point-min-marker))
      (buffer-size)))

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

------=_Part_31583_27246565.1159357558654-- --===============0574204871== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0574204871==--