From: Eli Zaretskii <eliz@gnu.org>
To: "Perry E. Metzger" <perry@piermont.com>
Cc: cpitclaudel@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Advice needed on modeline customization hack...
Date: Mon, 17 Apr 2017 09:00:24 +0300 [thread overview]
Message-ID: <83ziffefpj.fsf@gnu.org> (raw)
In-Reply-To: <20170416185740.7d848393@jabberwock.cb.piermont.com> (perry@piermont.com)
> Date: Sun, 16 Apr 2017 18:57:40 -0400
> From: "Perry E. Metzger" <perry@piermont.com>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
>
> Attached is an improved patch, including documentation changes.
Thanks. Allow me a few comments below.
> Comments solicited. I'm not fond of the name
> "column-number-mode-starts-from-zero" by the way.
How about column-number-indicator-zero-based instead?
> +@vindex column-number-mode-starts-from-zero
> + In Column Number mode, the displayed column number begins at zero at
> +the start of a line. If you would prefer for the displayed column
> +number to begin at one, you may set
> +@code{column-number-mode-starts-from-zero} to @code{nil}.
The first sentence is ambiguous with the current bidirectional
display, because "start of line" is ambiguous. I suggest to use the
wording with which we describe current-column:
... the displayed column number counts from 0 at the left margin of
the window.
I also think that using digits 0 and 1 is better than using the words,
but that's my personal preference, so if you feel strongly about using
words, I won't object.
Also, please leave 2 spaces between sentences, as we use the US
English conventions in our documentation.
> @item %c
> -The current column number of point.
> +The current column number of point, starting from zero.
> +
> +@item %C
> +The current column number of point, starting from one.
I think "zero-based" and "one-based" is better. Or maybe include a
more detailed description of how the column is counted.
Please also add a NEWS entry about this new option.
> diff --git a/lisp/simple.el b/lisp/simple.el
> index 5f70adedc4..821880b1f3 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -7198,6 +7198,10 @@ column-number-mode
> If called from Lisp, enable the mode if ARG is omitted or nil."
> :global t :group 'mode-line)
>
> +(defvar column-number-mode-starts-from-zero t
> + "When set to true, Column Number mode displays columns starting from zero.
> +Otherwise, displayed column numbers start from one.")
This should be a defcustom, not defvar. I think it's best to have it
in xdisp.c, where the feature is implemented, in which case you should
add the necessary stuff to cus-start.el to allow its customization by
Custom.
What about the required change to mode_line_update_needed?
next prev parent reply other threads:[~2017-04-17 6:00 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
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 [this message]
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=83ziffefpj.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=cpitclaudel@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=perry@piermont.com \
/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).