From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: seberino@spawar.navy.mil Newsgroups: gmane.emacs.help Subject: Re: How add one to column # on modeline (%c) so starts from _1_? Date: Mon, 7 Oct 2002 10:49:31 -0700 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <20021007104931.A15231@spawar.navy.mil> References: <20020926053553.GA19380@spawar.navy.mil> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034013307 27396 127.0.0.1 (7 Oct 2002 17:55:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Oct 2002 17:55:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17yc5y-00077k-00 for ; Mon, 07 Oct 2002 19:55:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17yc1D-0006Wz-00; Mon, 07 Oct 2002 13:50:11 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17yc0g-0005ol-00 for help-gnu-emacs@gnu.org; Mon, 07 Oct 2002 13:49:38 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17yc0d-0005e8-00 for help-gnu-emacs@gnu.org; Mon, 07 Oct 2002 13:49:36 -0400 Original-Received: from seberino.spawar.navy.mil ([128.49.22.159]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17yc0c-0005aM-00 for help-gnu-emacs@gnu.org; Mon, 07 Oct 2002 13:49:35 -0400 Original-Received: from seberino by seberino.spawar.navy.mil with local (Exim 4.10) id 17yc0Z-0003yC-00; Mon, 07 Oct 2002 10:49:31 -0700 Original-To: Eli Zaretskii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from eliz@is.elta.co.il on Thu, Sep 26, 2002 at 07:52:58AM +0200 Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2335 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2335 Eli Thanks for this tip! I read Emacs Lisp manual on this and followed the example. After some tweaking I can get eval to print something without an error by adding following to modeline list.... '(:eval "%c + 1") The ' and the double quotes are necessary. The above will print "0 + 1" on the modeline when in the first column. *****How can I tell Emacs to evaluate the *addition* in quotes rather than just interpret it as a /string/???? Chris On Thu, Sep 26, 2002 at 07:52:58AM +0200, Eli Zaretskii wrote: > > On Wed, 25 Sep 2002 seberino@spawar.navy.mil wrote: > > > %c on modeline gives column number but it > > starts at 0 which is silly... > > > > How add 1 to this so starts at 1??? > > > > (%c + 1) doesn't do it of course. > > Try the (:eval FORM) construct. > > > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs -- _______________________________________ Dr. Christian Seberino SPAWAR Systems Center San Diego Code 2363 49590 Lassing Rd. Rm. A339 San Diego, CA 92152-6147 U.S.A. Phone: (619) 553-7940 Fax: (619) 553-1269 Email: seberino@spawar.navy.mil _______________________________________