* Best terminal emulator for emacs?
@ 2018-09-04 0:12 Ergus
0 siblings, 0 replies; 4+ messages in thread
From: Ergus @ 2018-09-04 0:12 UTC (permalink / raw)
To: help-gnu-emacs
Hi:
I'm using emacs with a -nw option. After some time I have tried gnome-terminal, termite, guake, tilda and it looks to be almost fine with xterm after some configuration. I am using this options in the .Xdefaults:
-------------------
*eightBitInput: false
*eightBitOutput: true
*termName: xterm-color
*metaSendsEscape: true
*vt100.formatOtherKeys: 1
*ttyModes: erase ^?
*VT100*translations: #override \
!Ctrl <Key>BackSpace: string(0x7f) \n\
!<Key>BackSpace: string(0x7f) \n\
!~Alt Ctrl <Key>I: string("\033[A") \n\
Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
Ctrl Shift <Key>V: insert-selection(CLIPBOARD)
! Alt <Key>I: string("\033[1;5A") \n\
! Alt Ctrl <Key>I: string("\033[1;7A")
*backarrowKeyIsErase: true
*buffered: true
--------------------
With this I can even send C-? and C-: for example. But I still can't send C-Backspace or C-S-Backspace. Does anyone can give me a solution to this?? I am very tired to deal with this kind of issues for years. I can use any terminal emulator (available in linux) but not emacs in gui (it is a long story).
I accept any solution that includes modify the xterm config as needed, change the terminal itself for another one maybe more compatible, use the configuration of somebody else. It will be very useful if anyone tells me what's the better terminal emulator or configuration for using emacs, the more compatible (even if it needs some configuration).
Thanks in advance,
Ergus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Best terminal emulator for emacs?
[not found] <mailman.347.1536025189.1284.help-gnu-emacs@gnu.org>
@ 2018-09-04 13:51 ` Javier
2018-09-04 14:18 ` Yuri Khan
2018-09-10 9:33 ` Ergus
0 siblings, 2 replies; 4+ messages in thread
From: Javier @ 2018-09-04 13:51 UTC (permalink / raw)
To: help-gnu-emacs
Ergus <spacibba@aol.com> wrote:
> I can use any terminal emulator (available in linux) but not emacs
> in gui (it is a long story).
Firewall at $JOB? slow network? Sometimes even editing remote
files with tramp is not an option.
If the network is slow you may want to disable a few things in
recent versions of emacs. It becomes very annoying when copying text.
(when (and (not (display-graphic-p))
(>= emacs-major-version 25))
(setq select-enable-clipboard nil)
(setq x-select-enable-clipboard-manager nil)
(setq select-enable-primary t)
(setq mouse-drag-copy-region t))
> It will be very useful if anyone tells me what's the better terminal emulator
XTerm, but it doesn't pass some some key combinations as escape sequences
and you need to specify them explicitly in the translations resource.
Somebody should tell the XTerm maintainer to pass more key
combinations as escape sequences. Either that or including a
comprehensive sample of the 'xterm.vt100.translations' resource in the
emacs documentation.
Try this
xterm -xrm \
'xterm.vt100.translations: #override \n\
Ctrl ~Shift <Key>BackSpace: string(0x1b) string("C-BackSpace") \n \
Ctrl Shift <Key>BackSpace: string(0x1b) string("C-S-BackSpace")' \
-e emacs -nw --execute='
(progn (define-key function-key-map "\eC-BackSpace" [C-backspace])
(define-key function-key-map "\eC-S-BackSpace" [C-S-backspace]))'
C-h l (view lossage) will tell you if it works
ESC C - B a c k S p a c e [backward-kill-word]
ESC C - S - B a c k S p a c e [kill-whole-line]
Paste the snippets in ~/.Xdefaults and ~/.emacs. Remember to run
'xrdb -merge ~/.Xdefaults'
Be careful with the vt100.translations string. It is like a
programming language in itself. The order of lines sometimes changes
the result. Have a look at 'man xterm' and
/usr/share/emacs/*/lisp/term/xterm.el.gz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Best terminal emulator for emacs?
2018-09-04 13:51 ` Javier
@ 2018-09-04 14:18 ` Yuri Khan
2018-09-10 9:33 ` Ergus
1 sibling, 0 replies; 4+ messages in thread
From: Yuri Khan @ 2018-09-04 14:18 UTC (permalink / raw)
Cc: help-gnu-emacs
On Tue, Sep 4, 2018 at 8:55 PM Javier <invalid@invalid.invalid> wrote:
> Somebody should tell the XTerm maintainer to pass more key
> combinations as escape sequences. Either that or including a
> comprehensive sample of the 'xterm.vt100.translations' resource in the
> emacs documentation.
First, Somebody should design an unambiguous (as much as reasonably
possible) representation for all kinds of key combinations. Preferably
one that is a superset of the xterm terminfo entry and a subset of the
general ECMA-48 CSI (Control Sequence Introducer) syntax. Otherwise,
Somebody gets an Xterm that generates key sequences that applications
(except your customized Emacs) cannot interpret.
Somebody will also probably want to get support for this extended key
representation incorporated into screen and tmux.
> xterm -xrm \
> 'xterm.vt100.translations: #override \n\
> Ctrl ~Shift <Key>BackSpace: string(0x1b) string("C-BackSpace") \n \
> Ctrl Shift <Key>BackSpace: string(0x1b) string("C-S-BackSpace")' \
For example, this choice of key representations is very likely to
break the M-C (Alt+Shift+c) combination.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Best terminal emulator for emacs?
2018-09-04 13:51 ` Javier
2018-09-04 14:18 ` Yuri Khan
@ 2018-09-10 9:33 ` Ergus
1 sibling, 0 replies; 4+ messages in thread
From: Ergus @ 2018-09-10 9:33 UTC (permalink / raw)
To: help-gnu-emacs, Javier
Sorry for the delay. Thank you very much. I also wrote to the xterm maintainer but his recomendation was:
-----
You might be able to make it work by prefixing with "~Meta".
The xmodmap manual page explains how to assign a key (such as Alt to "Meta").
-----
So I am working with your recomendation until a better option or a fully compatible terminal emulator appears.
On 4 September 2018 15:51:27 CEST, Javier <invalid@invalid.invalid> wrote:
>Ergus <spacibba@aol.com> wrote:
>> I can use any terminal emulator (available in linux) but not emacs
>> in gui (it is a long story).
>
>Firewall at $JOB? slow network? Sometimes even editing remote
>files with tramp is not an option.
>
>If the network is slow you may want to disable a few things in
>recent versions of emacs. It becomes very annoying when copying text.
>
>(when (and (not (display-graphic-p))
> (>= emacs-major-version 25))
> (setq select-enable-clipboard nil)
> (setq x-select-enable-clipboard-manager nil)
> (setq select-enable-primary t)
> (setq mouse-drag-copy-region t))
>
>> It will be very useful if anyone tells me what's the better terminal
>emulator
>
>XTerm, but it doesn't pass some some key combinations as escape
>sequences
>and you need to specify them explicitly in the translations resource.
>
>Somebody should tell the XTerm maintainer to pass more key
>combinations as escape sequences. Either that or including a
>comprehensive sample of the 'xterm.vt100.translations' resource in the
>emacs documentation.
>
>Try this
>
>xterm -xrm \
> 'xterm.vt100.translations: #override \n\
> Ctrl ~Shift <Key>BackSpace: string(0x1b) string("C-BackSpace") \n \
> Ctrl Shift <Key>BackSpace: string(0x1b) string("C-S-BackSpace")' \
> -e emacs -nw --execute='
> (progn (define-key function-key-map "\eC-BackSpace" [C-backspace])
> (define-key function-key-map "\eC-S-BackSpace" [C-S-backspace]))'
>
>C-h l (view lossage) will tell you if it works
>
> ESC C - B a c k S p a c e [backward-kill-word]
> ESC C - S - B a c k S p a c e [kill-whole-line]
>
>Paste the snippets in ~/.Xdefaults and ~/.emacs. Remember to run
>'xrdb -merge ~/.Xdefaults'
>
>Be careful with the vt100.translations string. It is like a
>programming language in itself. The order of lines sometimes changes
>the result. Have a look at 'man xterm' and
>/usr/share/emacs/*/lisp/term/xterm.el.gz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-10 9:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-04 0:12 Best terminal emulator for emacs? Ergus
[not found] <mailman.347.1536025189.1284.help-gnu-emacs@gnu.org>
2018-09-04 13:51 ` Javier
2018-09-04 14:18 ` Yuri Khan
2018-09-10 9:33 ` Ergus
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.