emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: mode line: 1) indicate region size, if active; 2) highlight column #


From: Drew Adams
Subject: RE: mode line: 1) indicate region size, if active; 2) highlight column # if > limit
Date: Fri, 22 Jun 2007 16:13:57 -0700

I don't recall a decision on this. Was there one? The thread seems to have
petered out with no conclusion, unless I missed something.

Reminder: there are two suggested changes: (1) highlight the column number,
(2) indicate the region size. The two are unrelated, but both are here:
http://www.emacswiki.org/cgi-bin/wiki/modeline-posn.el.

I think too that I neglected to point out that the region size indication
(e.g. "30 chars") takes the place in the mode-line of the absolute buffer
size indication (e.g. "of 5.9 k") when the region is active. It does not
replace the relative buffer size indication (e.g. "22%"). It is generally
the same size as the text it replaces.



> From: Drew Adams Sent: Wednesday, June 06, 2007 10:36 AM
> I made this suggestion last September (subject:
> `size-indication-mode' tweak), to which Richard replied "It might
> be a good idea, but let's not think about it now."
>
> How about now? See attached image.
>
> 1. The size indicated is the region size when the region is active.
>
> 2. This size indicator gets the region face, to show this (green,
> in image).
>
> 3. The line and column indicator is highlighted (red, in image)
> when the cursor passes a user-defined limit. (This version still
> uses the (line#,column#) format.)
>
>
> > Sent: Thursday, September 14
> > After the release:
> > How about considering this minor tweak to `size-indication-mode'?
> > The doc string would also need to be updated accordingly.
> >
> > The idea is this: Whenever the region is active in transient-mark
> > mode, the size indication shows the size of the region, not the
> > size of the buffer.
> >
> > The implementation change is trivial - just use this for the
> > `size-indication-mode' part of `mode-line-position':
> >
> > (size-indication-mode
> >  (8 ,(propertize
> >       (if (and transient-mark-mode mark-active)
> >           (format " %d chars" (abs (- (mark t) (point))))
> >         " of %I")
> >       'face (and transient-mark-mode mark-active 'region)
> >       'help-echo help-echo)))
> >
> > where help-echo is bound as usual.
> >
> > FYI - This library does that, as well as highlighting the column
> > number when
> > the current column is greater than a given limit (option):
> > (http://www.emacswiki.org/cgi-bin/wiki/modeline-posn.el)

Attachment: modeline-posn.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]