From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.help Subject: Re: What variable says that the buffer is in narrowed state? Date: Sat, 13 Oct 2007 15:45:43 +0200 Message-ID: <87tzov5drs.fsf@gmx.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192297214 17539 80.91.229.12 (13 Oct 2007 17:40:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Oct 2007 17:40:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 13 16:40:43 2007 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 1IgiAQ-0001F2-6M for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Oct 2007 16:40:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgiAJ-0004eM-Qo for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Oct 2007 10:40:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!news.tiscali.de!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: p548668e1.dip.t-dialin.net Original-X-Trace: quimby.gnus.org 1192283064 3285 84.134.104.225 (13 Oct 2007 13:44:24 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Sat, 13 Oct 2007 13:44:24 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:ijdqZz5nC7rCAWqS6OCEUl3kWK8= Original-Xref: shelby.stanford.edu gnu.emacs.help:152879 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:48384 Bastien writes: > I expected to find some `buffer-narrowed-p' variable. Is there > something like this? The mode-line is able to display this bit > of information, so I guess it might somehow be accessible. If there were such a thing, it should probably be a function rather than a variable. Doesn't seem there is one, so I wrote it for you: (defun buffer-narrowed-p () "Return t if buffer is narrowed, nil otherwise." (or (> (point-min) 1) (< (point-max) (buffer-size)))) The mode-line display is coded in src/xdisp.c, look for "Narrow" there. Cheers, Sven