* Terminal only emacs question
[not found] <20200924220106.way5eue2tmykuhgy.ref@Ergus>
@ 2020-09-24 22:01 ` Ergus
2020-09-24 22:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-25 1:22 ` Stefan Monnier
0 siblings, 2 replies; 9+ messages in thread
From: Ergus @ 2020-09-24 22:01 UTC (permalink / raw)
To: help-gnu-emacs
Hi emacs:
Whats the way to determine in the init file if a emacs is running under
a terminal emulator or the linux console?
I need this to condition the load of xterm-mouse-mode or
gpm-mouse-mode. I tried getenv but for some reason inside emacs it is
always "dumb".
Any idea?
Best,
Ergus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Terminal only emacs question
2020-09-24 22:01 ` Terminal only emacs question Ergus
@ 2020-09-24 22:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-24 22:14 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-25 1:22 ` Stefan Monnier
1 sibling, 1 reply; 9+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-09-24 22:10 UTC (permalink / raw)
To: help-gnu-emacs
Ergus wrote:
> Whats the way to determine in the init file if
> a emacs is running under a terminal emulator or the
> linux console?
Well, the Linux console, AKA the Linux VTs (virtual
terminals), is also a terminal emulator, "emulator"
and "virtual" here denotes the same thing, i.e.
that it isn't a physical terminal.
> I need this to condition the load of xterm-mouse-mode
> or gpm-mouse-mode. I tried getenv but for some reason
> inside emacs it is always "dumb".
OK, you tried `getenv', but with what?
> Any idea?
Check out the variable `window-system'...
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Terminal only emacs question
2020-09-24 22:01 ` Terminal only emacs question Ergus
2020-09-24 22:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2020-09-25 1:22 ` Stefan Monnier
2020-09-25 2:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-25 3:22 ` Ergus
1 sibling, 2 replies; 9+ messages in thread
From: Stefan Monnier @ 2020-09-25 1:22 UTC (permalink / raw)
To: help-gnu-emacs
> I tried getenv but for some reason inside emacs it is always "dumb".
I don't think that's right. Try it again, but this time, be careful to
call this `getenv` early (i.e. before the end of your `.emacs`).
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Terminal only emacs question
2020-09-25 1:22 ` Stefan Monnier
@ 2020-09-25 2:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-25 3:22 ` Ergus
1 sibling, 0 replies; 9+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-09-25 2:32 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Monnier wrote:
>> I tried getenv but for some reason inside emacs it
>> is always "dumb".
>
> I don't think that's right. Try it again, but this
> time, be careful to call this `getenv` early (i.e.
> before the end of your `.emacs`).
What does it mean to use `getenv'?
With TERM, i.e. (getenv "TERM") ?
If so, then: dumb
In the shell, using tmux: screen, both in the
Linux VTs and xterm.
In the Linux VTs, w/o tmux: linux
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Terminal only emacs question
2020-09-25 1:22 ` Stefan Monnier
2020-09-25 2:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2020-09-25 3:22 ` Ergus
1 sibling, 0 replies; 9+ messages in thread
From: Ergus @ 2020-09-25 3:22 UTC (permalink / raw)
To: Stefan Monnier; +Cc: help-gnu-emacs
On Thu, Sep 24, 2020 at 09:22:04PM -0400, Stefan Monnier wrote:
>> I tried getenv but for some reason inside emacs it is always "dumb".
>
>I don't think that's right. Try it again, but this time, be careful to
>call this `getenv` early (i.e. before the end of your `.emacs`).
>
>
> Stefan
>
You are right diring the init the "TERM" variable is different... I
could use that; thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-09-25 3:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200924220106.way5eue2tmykuhgy.ref@Ergus>
2020-09-24 22:01 ` Terminal only emacs question Ergus
2020-09-24 22:10 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-24 22:14 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-24 22:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-24 22:39 ` Ergus
2020-09-24 22:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-25 1:22 ` Stefan Monnier
2020-09-25 2:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-25 3:22 ` Ergus
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).