unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Perry E. Metzger" <perry@piermont.com>
To: emacs-devel@gnu.org
Subject: Re: Advice needed on modeline customization hack...
Date: Sat, 15 Apr 2017 21:55:29 -0400	[thread overview]
Message-ID: <20170415215529.40ad1ef1@jabberwock.cb.piermont.com> (raw)
In-Reply-To: <20170415212800.5be89037@jabberwock.cb.piermont.com>

On Sat, 15 Apr 2017 21:28:00 -0400 "Perry E. Metzger"
<perry@piermont.com> wrote:
> The two line patch at the end of this adds a %C modeline construct
> that acts just like %c only it displays the modeline with characters
> starting at 1 instead of zero. Doing it that way gives you
> essentially no extra performance hit. That part turns out to be the
> easy bit.
>
> Harder is this: short of redefining the entirety of the really,
> really long mode-line-position variable from bindings.el, which
> isn't something one wants to tell people to casually do in
> their .emacs (it's long and complicated as heck), I'm not quite
> sure how to do a practical customization here. Then again, I only
> half understand how the modeline format stuff works at all, and it
> seems semantically rich enough that some reasonable way to do this
> should exist.
>
> Advice on how to do the elisp half of this so there can be an easy
> setting to let you pick one based or zero based?

So, partially answering my own question, it seems like the only
obvious way to do this is to add yet another foo-mode variable and a
bunch of lines to the definition of mode-line-position in bindings.el
that do exactly what the current ones do for when column-number-mode
is set, only selecting between using %c and %C in the constructs.

This seems a little gross, but I'm not really sure what else is
practical. Assuming this is the right thing, advice on what to call
this new (very) minor mode are solicited.

Perry
-- 
Perry E. Metzger		perry@piermont.com



  reply	other threads:[~2017-04-16  1:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-16  1:28 Advice needed on modeline customization hack Perry E. Metzger
2017-04-16  1:55 ` Perry E. Metzger [this message]
2017-04-16  3:11 ` Stefan Monnier
2017-04-16 13:49   ` Perry E. Metzger
2017-04-16 14:07     ` Stefan Monnier
2017-04-16 14:46       ` Perry E. Metzger
2017-04-16 15:02         ` Clément Pit-Claudel
2017-04-16 16:09           ` Perry E. Metzger
2017-04-16 20:59             ` Clément Pit-Claudel
2017-04-16 22:06               ` Perry E. Metzger
2017-04-16 22:16                 ` Perry E. Metzger
2017-04-16 22:57                   ` Perry E. Metzger
2017-04-16 23:48                     ` Drew Adams
2017-04-17  0:13                       ` Perry E. Metzger
2017-04-17  6:00                     ` Eli Zaretskii
2017-04-17 12:53                       ` Perry E. Metzger
2017-04-17 14:17                         ` Eli Zaretskii
2017-04-17 15:24                           ` Perry E. Metzger
2017-04-17 15:34                             ` Eli Zaretskii
2017-04-17 18:07                               ` Perry E. Metzger
2017-04-17 18:23                                 ` Eli Zaretskii
2017-04-17 18:55                                   ` Perry E. Metzger
2017-04-17 19:07                                     ` Noam Postavsky
2017-04-17 19:18                                       ` Perry E. Metzger
2017-05-10 17:59                                   ` Eli Zaretskii
2017-04-17 15:21                         ` Perry E. Metzger
2017-04-17 15:31                           ` Eli Zaretskii
2017-04-17 15:55                             ` Perry E. Metzger
2017-04-17 16:13                               ` Eli Zaretskii
2017-04-17  6:02                 ` Eli Zaretskii
2017-04-17 12:32                   ` Perry E. Metzger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170415215529.40ad1ef1@jabberwock.cb.piermont.com \
    --to=perry@piermont.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).