Re: What TERM fixes Emacs?

2020-02-29 Thread Stuart Henderson
On 2020-02-27, Stuart Longland  wrote:
> On 26/2/20 9:46 pm, Marc Espie wrote:
>> (these days, new OS versions will all use the same termcap source, so you're
>> probably safe on anything released over the past 5 years)

People with a need to connect to older OS (from the text console rather
than X) probably have enough grey in their beards to cope anyway ;)
The problem is more that some OS default to installing a cut-down set of
terminfo files rather than the whole thing. (e.g. for rhel7 you need to
install the ncurses-term package - no idea about rhel8 - looks like debian
is ok). 

> Just thinking… a suitable work-around for such OSes would be to set the
> following in ~/.ssh/config:
>
> Host my.old.host
>  SetEnv TERM=vt220

Or just connect from inside tmux, which uses "screen" variants by default
that are widely supported. (And of course this does not affect X).

> Note I haven't tested this to see if it works, just read `man
> ssh_config`.  Obviously this doesn't help with other use cases like
> `telnet`.  For those, one could do `TERM=vt100 telnet foo.example.com 1234`.
>
> If newer OSes already understand TERM=pccon, perhaps in the medium term
> it might be worth reviewing this default setting.

I think keeping it at vt220 now causes more problems that would be fixed
by moving to pccon, than would be caused by changing to pccon.




Re: What TERM fixes Emacs?

2020-02-28 Thread Nam Nguyen
On 2020-02-25, Raymond, David wrote:
> Maybe there is some mechanism for setting the alt key to meta
> in emacs on consoles, but I use X11 so I haven't needed to pursue
> this.

matthieu@ pointed out how to use the alt key in console emacs.
Source: https://marc.info/?l=openbsd-misc=91345235818444=2

(set-input-mode t nil t)

Thanks sthen@ for the pccon hint. emacs looks better in console now.



Re: What TERM fixes Emacs?

2020-02-27 Thread Stuart Longland
On 26/2/20 9:46 pm, Marc Espie wrote:
> (these days, new OS versions will all use the same termcap source, so you're
> probably safe on anything released over the past 5 years)

Just thinking… a suitable work-around for such OSes would be to set the
following in ~/.ssh/config:

Host my.old.host
 SetEnv TERM=vt220

Note I haven't tested this to see if it works, just read `man
ssh_config`.  Obviously this doesn't help with other use cases like
`telnet`.  For those, one could do `TERM=vt100 telnet foo.example.com 1234`.

If newer OSes already understand TERM=pccon, perhaps in the medium term
it might be worth reviewing this default setting.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: What TERM fixes Emacs?

2020-02-27 Thread Stuart Longland
On 25/2/20 5:09 pm, Maurice McCarthy wrote:
> On 25/02/2020, Emilia  wrote:
>> It is impossible to use Emacs on OpenBSD Terminal (no X).
>>
> 
> OpenBSD does not do non-X versions of ported software so even if you
> dont use X as such it still needs to be in the base install.
> 
> HTH
> (I've had my backside reamed over this more than once!)
> 

I find OpenBSD without X installed works well enough.  If you're
sticking to largely base applications and GUI-less ports, you can get
away without X installed.

Not sure if it's possible for the selected package sets to install a
"virtual" package in the pkg_* tools' database that the packages can
depend on; so pkg_add squawks if you try to install a GUI application
without the relevant base package.

That said, there's only so much free time someone can devote to testing
such a set-up, so the current arrangement of "sure, omit X but
dependencies on it are your problem" is workable.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: What TERM fixes Emacs?

2020-02-26 Thread Marc Espie
On Mon, Feb 24, 2020 at 09:35:21PM -0800, Emilia wrote:
>  
> 
> It is impossible to use Emacs on OpenBSD Terminal (no X). 
> 
> Look at this screenshots: 
> 
> On Linux / macOs -- this same version of Emacs and org-mode would
> display this file with colors etc. 

As stuart said, pccon is the best fit.

For a more elaborate answer: choosing a default TERM value for the console
is complicated.   The main issue being that a lot of the time, you will
ssh into another machine that probably doesn't run the same operating system,
and thus doesn't necessarily have the same termcap database.

So, the default choice in OpenBSD is to have a default value that's very
safe (vt220 have been around forever) so that you can login about anywhere.

... whereas pccon is way more recent and specific, and thus will probably
hose you when you try to login on some old machines.

(these days, new OS versions will all use the same termcap source, so you're
probably safe on anything released over the past 5 years)



Re: What TERM fixes Emacs?

2020-02-25 Thread Raymond, David
On my X1 Carbon running openbsd 6.6, the console works fine with the
non-X version of emacs except that the meta key is not set.  One can
emulate the meta key by typing escape followed by x, but this is a
pain.  Maybe there is some mechanism for setting the alt key to meta
in emacs on consoles, but I use X11 so I haven't needed to pursue
this.

Same story on the virtual console window on a vga monitor attached to
a desktop with 6.6.

Dave Raymond

PS - You might take a look at this comment for freebsd:

https://forums.freebsd.org/threads/alt-as-meta-key-in-emacs-within-virtual-console.40275/

On 2/24/20, Emilia  wrote:
> It is impossible to use Emacs on OpenBSD Terminal (no X).
>
> Look at this screenshots:
>
> On Linux / macOs -- this same version of Emacs and org-mode would
> display this file with colors etc.
>
> OpenBSD can't even show the mode line.
>
> How do I fix this?
>
> Em


-- 
David J. Raymond
david.raym...@nmt.edu
http://physics.nmt.edu/~raymond



Re: What TERM fixes Emacs?

2020-02-25 Thread Chris Cappuccio
Emilia [emi...@sonic.net] wrote:
> Stuart, 
> 
> Apologies for breaking netiquette w/ sending images.
> 
> Could you please point me to what "pccon" is?  I found references to
> pccon in pcvt - but it is unclear to me how I can use pcvt either. 
> 

export TERM=pccon perhaps?



Re: What TERM fixes Emacs?

2020-02-25 Thread Stuart Henderson
On 2020/02/25 07:19, Emilia wrote:
> Stuart,
> 
> Apologies for breaking netiquette w/ sending images.
> 
>  
> 
> Could you please point me to what "pccon" is?  I found references to pccon in 
> pcvt - but it is
> unclear to me how I can use pcvt either.
> 
> 
> Thank you!

pccon is the termcap(5) entry that best matches the console used by
OpenBSD on PCs, there are a few variants (see /etc/termcap) but just plain
"pccon" is usually fine.

You can set it in the shell environment (export TERM=pccon) then run emacs,
which is good for a quick test, if that generally provides better results
you can modify /etc/ttys (change the "vt220" entries to "pccon", then
reboot or send init(8) a signal to reload it - "man init", see the
"Line status (on, off, [...]" paragraph).




Re: What TERM fixes Emacs?

2020-02-25 Thread Emilia
Stuart, 

Apologies for breaking netiquette w/ sending images.

Could you please point me to what "pccon" is?  I found references to
pccon in pcvt - but it is unclear to me how I can use pcvt either. 

Thank you! 

On 2020-02-24 23:16, Stuart Henderson wrote:

> On 2020-02-25, Emilia  wrote: 
> 
>> It is impossible to use Emacs on OpenBSD Terminal (no X). 
>> 
>> Look at this screenshots: 
>> 
>> On Linux / macOs -- this same version of Emacs and org-mode would
>> display this file with colors etc. 
>> 
>> OpenBSD can't even show the mode line. 
>> 
>> How do I fix this?
> 
> Try pccon.
> 
>> --=_f69ee5e0e3f3ba5b74bb1250e9e8a612
>> Content-ID: <15826084275e54b02bbe0d7530097...@sonic.net>
>> Content-Disposition: inline;
>> filename=c-3.gif;
>> size=67545
>> Content-Transfer-Encoding: base64
>> Content-Type: image/gif;
>> name=c-3.gif
>> 
>> R0lGODlhkwEuAfcAAAQBAA0DAQkEDBMEARoGARwJAhYJCQoGHAkGGBcLGhsS
>> GSQLASkOASQIAywSAigUCDcZAygSHSYOGj0hBgYFIwkGIgsJJAwLLAgGKxMN
> ..
> 
> Please don't send image attachments to the OpenBSD lists (and in general
> most techmical mailing lists)


Re: What TERM fixes Emacs?

2020-02-24 Thread Stuart Henderson
On 2020-02-25, Emilia  wrote:
> It is impossible to use Emacs on OpenBSD Terminal (no X). 
>
> Look at this screenshots: 
>
> On Linux / macOs -- this same version of Emacs and org-mode would
> display this file with colors etc. 
>
> OpenBSD can't even show the mode line. 
>
> How do I fix this? 

Try pccon.

> --=_f69ee5e0e3f3ba5b74bb1250e9e8a612
> Content-ID: <15826084275e54b02bbe0d7530097...@sonic.net>
> Content-Disposition: inline;
>  filename=c-3.gif;
>  size=67545
> Content-Transfer-Encoding: base64
> Content-Type: image/gif;
>  name=c-3.gif
>
> R0lGODlhkwEuAfcAAAQBAA0DAQkEDBMEARoGARwJAhYJCQoGHAkGGBcLGhsS
> GSQLASkOASQIAywSAigUCDcZAygSHSYOGj0hBgYFIwkGIgsJJAwLLAgGKxMN
..

Please don't send image attachments to the OpenBSD lists (and in general
most techmical mailing lists) 




Re: What TERM fixes Emacs?

2020-02-24 Thread Maurice McCarthy
On 25/02/2020, Emilia  wrote:
> It is impossible to use Emacs on OpenBSD Terminal (no X).
>

OpenBSD does not do non-X versions of ported software so even if you
dont use X as such it still needs to be in the base install.

HTH
(I've had my backside reamed over this more than once!)



What TERM fixes Emacs?

2020-02-24 Thread Emilia
It is impossible to use Emacs on OpenBSD Terminal (no X). 

Look at this screenshots: 

On Linux / macOs -- this same version of Emacs and org-mode would
display this file with colors etc. 

OpenBSD can't even show the mode line. 

How do I fix this? 

Em