From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Smith_RS Newsgroups: gmane.emacs.help Subject: Re: Column-number-mode ordinality question Date: Thu, 15 Apr 2010 18:17:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <6e35721a-1cf3-439b-aadc-9ed115e80181@x3g2000yqd.googlegroups.com> <87fx2wh1ck.fsf@fh-trier.de> <7a823b97-3960-44b9-8fad-00380960f3f9@b33g2000yqc.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273060918 12889 80.91.229.12 (5 May 2010 12:01:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 May 2010 12:01:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 05 14:01:57 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1O9dIa-0003XG-K7 for geh-help-gnu-emacs@m.gmane.org; Wed, 05 May 2010 14:01:56 +0200 Original-Received: from localhost ([127.0.0.1]:57392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9dIZ-0003KI-Rk for geh-help-gnu-emacs@m.gmane.org; Wed, 05 May 2010 08:01:55 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!y17g2000yqd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 67 Original-NNTP-Posting-Host: 208.65.73.111 Original-X-Trace: posting.google.com 1271380644 5404 127.0.0.1 (16 Apr 2010 01:17:24 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 16 Apr 2010 01:17:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y17g2000yqd.googlegroups.com; posting-host=208.65.73.111; posting-account=FPshOQoAAABhQbXLwYlqquO5tX-UXyrO User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729), gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:177711 X-Mailman-Approved-At: Tue, 04 May 2010 16:54:09 -0400 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:73404 Archived-At: I got a little further. Instead of hacking directly on bindings.el I located bindings+.el, put it in site-lisp, and that overrode things the right way. The problem is that the "eval" construct doesn't get eval'd every time the cursor moves. Also, you can't mix %l and $d in a format that way. I tried this and it didn't work: (10 (:eval (propertize (format " (%d,%d)" (current-line) (1+ (current-column))) 'local-map mode-line-column-line-number-mode-map 'mouse-face 'mode-line-highlight This works better but does not update frequently enough: (5 (:eval (propertize (format " C%d" (1+ (current-column))) 'local-map mode-line-column-line-number-mode-map 'mouse-face 'mode-line-highlight It's close, but not quite. On Apr 15, 6:22=A0pm, Smith_RS wrote: > Andreas, > > Thanks, but I tried directly hacking bindings.el, re-compiling > the .elc, and it didn't change anything. > > Is there something special about 23.1 for Windows? =A0Is there some sort > of weird caching going on? > > On Apr 15, 5:06=A0pm, Andreas Politz wrote: > > > Smith_RS writes: > > > I know that historically RMS was against this, but is there any way i= n > > > 23.1 to change the behavior of column-number-mode so that it begins > > > with 1 and not 0? > > > > Under Linux I can just change the code in xdisp.c, but I'm doing more > > > work with Windows these days. > > > > Thanks. > > > I suppose, you could change the > > > (propertize ... "(%l,%c)" parts in > > > `mode-line-position' to something like > > > ... > > (column-number-mode > > =A0(10 (:eval > > =A0 =A0 =A0 (propertize > > =A0 =A0 =A0 =A0(format " (%l,%d)" (1+ (current-column))) > > =A0 =A0 =A0 =A0'local-map mode-line-column-line-number-mode-map > > =A0 =A0 =A0 =A0'mouse-face 'mode-line-highlight > > =A0 =A0 =A0 =A0'help-echo "Line number and Column number\n\ > > mouse-1: Display Line and Column Mode Menu"))) > > =A0... > > > =A0-ap