* Grid lines in background
@ 2011-06-20 12:44 William King
2011-06-20 18:27 ` Drew Adams
0 siblings, 1 reply; 3+ messages in thread
From: William King @ 2011-06-20 12:44 UTC (permalink / raw
To: help-gnu-emacs
I'm using voice recognition software (Dragon naturally speaking) in
emacs that allows me to specify a row and column to which I would like
the cursor moved. This works very well.
However, while it is visually easy specifying a line number, things are
awkward when specifying the column number because I can't tell exactly
which column I want to go to. I want a way to make this easier. My
preferred solution would be to have some kind of grid lines in the
background of all windows, for example for the shading of the background
to alternate every 10 columns, so that I can tell reasonably easily at a
glance that a particular character is in column x.
I can't work out a way of doing this. "column-number-mode" does not
provide what I need. I have looked at vline.el, but this seems only to
highlight the column that the cursor is in.
I would really appreciate any advice about how I might approach this
problem.
Many thanks.
Will King
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Grid lines in background
2011-06-20 12:44 Grid lines in background William King
@ 2011-06-20 18:27 ` Drew Adams
2011-06-21 17:37 ` Alp Aker
0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2011-06-20 18:27 UTC (permalink / raw
To: 'William King', help-gnu-emacs
> have some kind of grid lines in the background of all windows,
> for example for the shading of the background to alternate
> every 10 columns, so that I can tell reasonably easily at a
> glance that a particular character is in column x.
>
> I can't work out a way of doing this. "column-number-mode" does not
> provide what I need. I have looked at vline.el, but this
> seems only to highlight the column that the cursor is in.
>
> I would really appreciate any advice about how I might approach this
> problem.
Dunno whether this helps, but you might want to take a look at Alp Aker's code
for column highlighting:
http://www.emacswiki.org/emacs/FillColumnIndicator
I don't know whether you can use it to do what you want, but perhaps take a
look.
There are other column-highlighting libraries on the wiki as well, but perhaps
you have already tried them. Here is are two entry points, which mention some
of them:
http://www.emacswiki.org/emacs/HighlightCurrentColumn
http://www.emacswiki.org/emacs/EightyColumnRule
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Grid lines in background
2011-06-20 18:27 ` Drew Adams
@ 2011-06-21 17:37 ` Alp Aker
0 siblings, 0 replies; 3+ messages in thread
From: Alp Aker @ 2011-06-21 17:37 UTC (permalink / raw
To: help-gnu-emacs
Drew Adams <drew.adams <at> oracle.com> writes:
> Dunno whether this helps, but you might want to take a look at Alp Aker's
> code for column highlighting:
> http://www.emacswiki.org/emacs/FillColumnIndicator
Ironically, I just dropped support for the shading style of fill-column
highlighting. The older code is still on the page, though, so the OP can
take a look at it.
If he wants to take a stab at adapting it, I'd recommend a two-part strategy:
use font-lock to put shaded intervals on each line up to the end of the line,
then put a zero-length overlay before the newline character with a
before-string or an after-string that pads out the rest line of with however
many more intervals are necessary to complete that line of the grid. (You
wouldn't want to use overlays for everything, because that would quash any
background coloration done by font-lock. If you use font-lock for the first
part, you can arrange for the background shading to take lowest priority wrt
to other fontification.) You'll have to add some epicycles to the
arrangement if you want to avoid conflicts with whitespace-mode,
hl-line-mode, et similia.
Actually, now that I've thought about it should be pretty easy to implement,
so I might do so when I next have a chance.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-21 17:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20 12:44 Grid lines in background William King
2011-06-20 18:27 ` Drew Adams
2011-06-21 17:37 ` Alp Aker
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.