* tty blinking cursor
@ 2006-04-07 12:15 Bastien
2006-04-08 11:45 ` Alan Mackenzie
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Bastien @ 2006-04-07 12:15 UTC (permalink / raw)
Hi,
ASAIK, (blink-cursor-mode -1) has no effect in a tty.
But i'm using emacs in conjunction with screen in a tty and i'd like
to know if someone knows how to circumvent that particulary annoying
behavior of the cursor.
thanks,
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-07 12:15 tty blinking cursor Bastien
@ 2006-04-08 11:45 ` Alan Mackenzie
2006-04-08 13:53 ` Bastien
2006-04-08 12:23 ` Stefan Monnier
2006-04-08 17:16 ` Johan Bockgård
2 siblings, 1 reply; 12+ messages in thread
From: Alan Mackenzie @ 2006-04-08 11:45 UTC (permalink / raw)
Bastien <bastien@xxx.fr> wrote on Fri, 07 Apr 2006 14:15:01 +0200:
> Hi,
> ASAIK, (blink-cursor-mode -1) has no effect in a tty.
Specifically in a _Linux_ tty (which you're headers suggest you're
using), it won't have any effect.
> But i'm using emacs in conjunction with screen in a tty and i'd like to
> know if someone knows how to circumvent that particulary annoying
> behavior of the cursor.
I don't think this is possible within Emacs. You'll probably have to
hack Linux to fix this. I don't much like it either. :-(
> thanks,
> --
> Bastien
--
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-07 12:15 tty blinking cursor Bastien
2006-04-08 11:45 ` Alan Mackenzie
@ 2006-04-08 12:23 ` Stefan Monnier
2006-04-08 13:52 ` Bastien
2006-04-08 17:16 ` Johan Bockgård
2 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2006-04-08 12:23 UTC (permalink / raw)
> ASAIK, (blink-cursor-mode -1) has no effect in a tty.
In Emacs-CVS, there is a variable `visible-cursor' which may do the trick
(tho its precise meaning depends on the tty).
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-08 12:23 ` Stefan Monnier
@ 2006-04-08 13:52 ` Bastien
0 siblings, 0 replies; 12+ messages in thread
From: Bastien @ 2006-04-08 13:52 UTC (permalink / raw)
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> ASAIK, (blink-cursor-mode -1) has no effect in a tty.
>
> In Emacs-CVS, there is a variable `visible-cursor' which may do the trick
> (tho its precise meaning depends on the tty).
Thanks. Now i have a smaller (but still blinking) cursor. Anyway,
that's far better than the whole ugly blinking cursor!
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-08 11:45 ` Alan Mackenzie
@ 2006-04-08 13:53 ` Bastien
0 siblings, 0 replies; 12+ messages in thread
From: Bastien @ 2006-04-08 13:53 UTC (permalink / raw)
Alan Mackenzie <acm@muc.de> writes:
>> But i'm using emacs in conjunction with screen in a tty and i'd like to
>> know if someone knows how to circumvent that particulary annoying
>> behavior of the cursor.
>
> I don't think this is possible within Emacs. You'll probably have to
> hack Linux to fix this. I don't much like it either. :-(
I thought there might be a way to prevent the cursor from blinking
with the help of screen - but i can't find it in the documentation.
I'm now using Stefan's solution, which is quite okay.
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-07 12:15 tty blinking cursor Bastien
2006-04-08 11:45 ` Alan Mackenzie
2006-04-08 12:23 ` Stefan Monnier
@ 2006-04-08 17:16 ` Johan Bockgård
2006-04-08 17:48 ` Bastien
2 siblings, 1 reply; 12+ messages in thread
From: Johan Bockgård @ 2006-04-08 17:16 UTC (permalink / raw)
Bastien <bastien@xxx.fr> writes:
> ASAIK, (blink-cursor-mode -1) has no effect in a tty.
>
> But i'm using emacs in conjunction with screen in a tty and i'd like
> to know if someone knows how to circumvent that particulary annoying
> behavior of the cursor.
Do C-h C-e (`view-emacs-problems'), and search for "*** GNU/Linux:
Emacs on a tty switches the cursor to large blinking block."
Maybe you can use some of that information.
(Shouldn't `visible-cursor' be mentioned there?)
--
Johan Bockgård
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-08 17:16 ` Johan Bockgård
@ 2006-04-08 17:48 ` Bastien
2006-04-09 14:21 ` Colin S. Miller
2006-04-09 18:12 ` Floyd L. Davidson
0 siblings, 2 replies; 12+ messages in thread
From: Bastien @ 2006-04-08 17:48 UTC (permalink / raw)
bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
> Do C-h C-e (`view-emacs-problems'), and search for "*** GNU/Linux:
> Emacs on a tty switches the cursor to large blinking block."
>
> Maybe you can use some of that information.
I've followed this:
,----[ C-h C-e Emacs on a tty ]
| To this end, run "infocmp linux > linux-term", edit the file
| `linux-term' to make both the "cnorm" and "cvvis" capabilities send
| the sequence "\E[?25h\E[?17;0;64c", and then run "tic linux-term" to
| produce a modified terminfo entry.
`----
.. and it worked well, thank you very much!
I now have a static cursor. For some reasons that i don't understand,
this cursor is red, but it could be worse.
> (Shouldn't `visible-cursor' be mentioned there?)
Yes, since (setq visible-cursor nil) produces the same result as
the one expected when you follow this:
,----[ C-h C-e Emacs on a tty ]
| Alternatively, if you want a blinking underscore as your Emacs cursor,
| change the "cvvis" capability to send the "\E[?25h\E[?0c" command.
`----
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-08 17:48 ` Bastien
@ 2006-04-09 14:21 ` Colin S. Miller
2006-04-09 14:37 ` Bastien
2006-04-09 18:12 ` Floyd L. Davidson
1 sibling, 1 reply; 12+ messages in thread
From: Colin S. Miller @ 2006-04-09 14:21 UTC (permalink / raw)
Bastien wrote:
> bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
>
>
>>Do C-h C-e (`view-emacs-problems'), and search for "*** GNU/Linux:
>>Emacs on a tty switches the cursor to large blinking block."
>>
>>Maybe you can use some of that information.
>
>
> I've followed this:
>
> ,----[ C-h C-e Emacs on a tty ]
> | To this end, run "infocmp linux > linux-term", edit the file
> | `linux-term' to make both the "cnorm" and "cvvis" capabilities send
> | the sequence "\E[?25h\E[?17;0;64c", and then run "tic linux-term" to
> | produce a modified terminfo entry.
> `----
>
> .. and it worked well, thank you very much!
>
> I now have a static cursor. For some reasons that i don't understand,
> this cursor is red, but it could be worse.
>
>
Bastien,
In XEmacs, the config-face "text cursor" gives the colour to be used for the cursors.
I'm sure Emacs has a similar config option.
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-09 14:21 ` Colin S. Miller
@ 2006-04-09 14:37 ` Bastien
2006-04-09 16:06 ` Colin S. Miller
0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2006-04-09 14:37 UTC (permalink / raw)
"Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:
> In XEmacs, the config-face "text cursor" gives the colour to be used
> for the cursors. I'm sure Emacs has a similar config option.
I tried
(set-cursor-color COLOR)
but it has no effect in a tty.
Thanks anyway!
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-09 14:37 ` Bastien
@ 2006-04-09 16:06 ` Colin S. Miller
2006-04-09 16:11 ` Bastien
0 siblings, 1 reply; 12+ messages in thread
From: Colin S. Miller @ 2006-04-09 16:06 UTC (permalink / raw)
Bastien wrote:
> "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:
>
>
>>In XEmacs, the config-face "text cursor" gives the colour to be used
>>for the cursors. I'm sure Emacs has a similar config option.
>
>
> I tried
>
> (set-cursor-color COLOR)
>
> but it has no effect in a tty.
>
> Thanks anyway!
>
Bastien,
You're right, text-cursor doesn't seem affect tty's.
XEmacs seems to inherit the cursor colour from the shell.
If you use xterm as a terminal emulator, the '-cr <colour' option
will set the cursor's background colour.
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-09 16:06 ` Colin S. Miller
@ 2006-04-09 16:11 ` Bastien
0 siblings, 0 replies; 12+ messages in thread
From: Bastien @ 2006-04-09 16:11 UTC (permalink / raw)
"Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:
> If you use xterm as a terminal emulator, the '-cr <colour' option
> will set the cursor's background colour.
Thanks for the hint.
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: tty blinking cursor
2006-04-08 17:48 ` Bastien
2006-04-09 14:21 ` Colin S. Miller
@ 2006-04-09 18:12 ` Floyd L. Davidson
1 sibling, 0 replies; 12+ messages in thread
From: Floyd L. Davidson @ 2006-04-09 18:12 UTC (permalink / raw)
Bastien <bastien@xxx.fr> wrote:
>bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
>
>> Do C-h C-e (`view-emacs-problems'), and search for "*** GNU/Linux:
>> Emacs on a tty switches the cursor to large blinking block."
>>
>> Maybe you can use some of that information.
>
>I've followed this:
>
>,----[ C-h C-e Emacs on a tty ]
>| To this end, run "infocmp linux > linux-term", edit the file
>| `linux-term' to make both the "cnorm" and "cvvis" capabilities send
>| the sequence "\E[?25h\E[?17;0;64c", and then run "tic linux-term" to
>| produce a modified terminfo entry.
>`----
>
>.. and it worked well, thank you very much!
>
>I now have a static cursor. For some reasons that i don't understand,
>this cursor is red, but it could be worse.
>
>> (Shouldn't `visible-cursor' be mentioned there?)
>
>Yes, since (setq visible-cursor nil) produces the same result as
>the one expected when you follow this:
>
>,----[ C-h C-e Emacs on a tty ]
>| Alternatively, if you want a blinking underscore as your Emacs cursor,
>| change the "cvvis" capability to send the "\E[?25h\E[?0c" command.
>`----
The "\E[P1;P2;P3c" sequence is not described in the Linux
console_codes man page. It sets the cursor type, including
the use of a software cursor.
The use of the P2 and P3 parameters above (e.g., "\E[?17;0;64c")
is apparently triggering a software defined cursor. I looked at
the source code, but did not spend enough time to figure out
exactly what it is supposed to be doing. The code in the Linux
distribtuion is file .../drivers/char/vt.c, function
add_softcursor().
An easy way to experiment with it is this command line (note the
added semicolon, which is optional),
$ echo -e "\033[?2;8;32;c"
The first parameter is supposed to be one of the following (
as shown in the /usr/include/linux/console_struct.h header),
0 Don't change
1 No cursor
2 Underline
3 Lower third of the block
4 Lower half of the block
5 Two thirds of the block
6 Block cursor
However, setting P1 to greater than 15 causes a non-blinking
block (default) cursor, and setting P2 and P3 can vary the color
of that block. Here are two examples
echo -e "\033[?17;0;32;c"
echo -e "\033[?17;0;64;c"
or perhaps more useful,
echo -e "\033[?17;86;32;c"
Multiples of 16 change the color of the block, and intermediate
values change the foreground (text) color.
--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@apaflo.com
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-04-09 18:12 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-07 12:15 tty blinking cursor Bastien
2006-04-08 11:45 ` Alan Mackenzie
2006-04-08 13:53 ` Bastien
2006-04-08 12:23 ` Stefan Monnier
2006-04-08 13:52 ` Bastien
2006-04-08 17:16 ` Johan Bockgård
2006-04-08 17:48 ` Bastien
2006-04-09 14:21 ` Colin S. Miller
2006-04-09 14:37 ` Bastien
2006-04-09 16:06 ` Colin S. Miller
2006-04-09 16:11 ` Bastien
2006-04-09 18:12 ` Floyd L. Davidson
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).