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 force evaluation of this string's math *before* print?.... Date: Wed, 9 Oct 2002 12:54:30 -0700 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <20021009125430.A1678@spawar.navy.mil> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034193382 15018 127.0.0.1 (9 Oct 2002 19:56:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 9 Oct 2002 19:56:22 +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 17zMwO-0003u5-00 for ; Wed, 09 Oct 2002 21:56:20 +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 17zMvG-0005C9-00; Wed, 09 Oct 2002 15:55:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17zMun-00054o-00 for help-gnu-emacs@gnu.org; Wed, 09 Oct 2002 15:54:41 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17zMui-00053S-00 for help-gnu-emacs@gnu.org; Wed, 09 Oct 2002 15:54:40 -0400 Original-Received: from seberino.spawar.navy.mil ([128.49.22.159]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17zMuh-00052C-00 for help-gnu-emacs@gnu.org; Wed, 09 Oct 2002 15:54:36 -0400 Original-Received: from seberino by seberino.spawar.navy.mil with local (Exim 4.10) id 17zMuc-0000SI-00; Wed, 09 Oct 2002 12:54:30 -0700 Original-To: Jesper Harder Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from harder@myrealbox.com on Wed, Oct 09, 2002 at 07:06:32PM +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:2430 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2430 Jesper Thank you so much!! I implemented your suggestion and it gave me a column number on my mode line that indeed updates itself as I move around my document!!! Can I ask you one last question? I noticed that often the column number will *not* be updated with this suggestion. For some reason, on some lines, the column number is not updated when I move right and left with the cursor until some event forces an update. For example, when I change line numbers that seems to force an update of the column number. Often pressing right/left arrow *does* effect an update of column number on modeline but not always. Thanks again, Chris On Wed, Oct 09, 2002 at 07:06:32PM +0200, Jesper Harder wrote: > seberino@spawar.navy.mil writes: > > > On modeline I have this element.... > > > > '(:eval "%c + 1") > > > > How can I tell Emacs to evaluate the addition in quotes above??? Right > > now it literally prints "+ 1" all the time rather than adding it to > > column number (%c). > > You can do it like this: > > '(:eval (format "%d" (1+ (current-column)))) > _______________________________________________ > 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 _______________________________________