From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Scott Frazer Newsgroups: gmane.emacs.help Subject: Re: Adding total lines to modeline (NOT percentage)? Date: Thu, 14 Apr 2011 14:10:13 -0400 Message-ID: <4DA73885.8000802@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1302820421 24681 80.91.229.12 (14 Apr 2011 22:33:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Apr 2011 22:33:41 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: fork Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 15 00:33:37 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QAV6V-0001Pd-5k for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Apr 2011 00:33:35 +0200 Original-Received: from localhost ([::1]:51337 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAV6U-0008E3-Pv for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Apr 2011 18:33:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAQzg-0007UB-PY for help-gnu-emacs@gnu.org; Thu, 14 Apr 2011 14:10:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QAQzf-0001zn-TE for help-gnu-emacs@gnu.org; Thu, 14 Apr 2011 14:10:16 -0400 Original-Received: from sj-iport-6.cisco.com ([171.71.176.117]:31080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAQzf-0001zT-OS for help-gnu-emacs@gnu.org; Thu, 14 Apr 2011 14:10:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAGQ3p02tJXG//2dsb2JhbACET6Eqd6Rii1A8h2MwiGKBKYNNeASNbw X-IronPort-AV: E=Sophos;i="4.64,212,1301875200"; d="scan'208";a="681504594" Original-Received: from rcdn-core2-4.cisco.com ([173.37.113.191]) by sj-iport-6.cisco.com with ESMTP; 14 Apr 2011 18:10:14 +0000 Original-Received: from dhcp-64-102-76-127.cisco.com (dhcp-64-102-76-127.cisco.com [64.102.76.127]) by rcdn-core2-4.cisco.com (8.14.3/8.14.3) with ESMTP id p3EIADLH001285; Thu, 14 Apr 2011 18:10:13 GMT User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 171.71.176.117 X-Mailman-Approved-At: Thu, 14 Apr 2011 18:33:20 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80796 Archived-At: On 4/13/11 3:11 PM, fork wrote: > Is there a way to customize my modeline such that I can see the total number of > lines of the current file? > > The percentage is not particularly interesting to me... > > Thanks! > I use these forms in my `mode-line-format' variable to show "current_line/total_num_lines": (list 'line-number-mode " L%l/") (list 'line-number-mode (:eval (int-to-string (count-lines (point-min) (point-max)))))