* Re: keybindings again...
2017-06-30 5:10 ` Jean-Christophe Helary
@ 2017-06-30 5:27 ` Nicolas Goaziou
2017-06-30 7:23 ` Jean-Christophe Helary
2017-06-30 7:56 ` Jean-Christophe Helary
2017-06-30 5:33 ` Kaushal Modi
` (3 subsequent siblings)
4 siblings, 2 replies; 16+ messages in thread
From: Nicolas Goaziou @ 2017-06-30 5:27 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: Help Gnu Emacs mailing list, Org-mode
Hello,
Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes:
> It would be nice if the org manual mentioned that too, and give
> alternative keybindings for use in the terminal because that's
> extremely confusing.
It does: (info "(org) TTY keys").
See also `org-replace-disputed-keys'.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 5:27 ` Nicolas Goaziou
@ 2017-06-30 7:23 ` Jean-Christophe Helary
2017-06-30 22:08 ` Emanuel Berg
2017-06-30 7:56 ` Jean-Christophe Helary
1 sibling, 1 reply; 16+ messages in thread
From: Jean-Christophe Helary @ 2017-06-30 7:23 UTC (permalink / raw)
To: Org-mode, Help Gnu Emacs mailing list
> On Jun 30, 2017, at 14:27, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> It would be nice if the org manual mentioned that too, and give
>> alternative keybindings for use in the terminal because that's
>> extremely confusing.
>
> It does: (info "(org) TTY keys").
Thank you for the pointer. Although I don't think I ever used a teletypewriter in my life :) Maybe sometimes in the 21st century we'll have to think about a change in terminology...
I use the compact manual as a reference for my uses and I find it extremely useful for beginners. Would it be possible to insert a few line on that subject in there too? Something like "People who use org-mode in a tty terminal should refer to section 15.9 of the manual for alternative key bindings."
> See also `org-replace-disputed-keys'.
Thank you.
Jean-Christophe
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 7:23 ` Jean-Christophe Helary
@ 2017-06-30 22:08 ` Emanuel Berg
0 siblings, 0 replies; 16+ messages in thread
From: Emanuel Berg @ 2017-06-30 22:08 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: emacs-orgmode
Jean-Christophe Helary wrote:
> Thank you for the pointer. Although I don't
> think I ever used a teletypewriter in my life
> :) Maybe sometimes in the 21st century we'll
> have to think about a change in
> terminology...
In computers, but also in just any brand of
engineering (and other areas as well), there
are tons of cases when terminology is either
outdated or just plain wrong. When there is
a correct term, as in "chainwheel" or
"sprocket" as opposed to "cog" (which is
incorrect, as it isn't a cod), it is good to
know about the correct terms and use them
whenever, but it is equally necessary to know
about the incorrect term. You will find
respectable books when they refer to a sprocket
as a "cog" without blinking! And know what,
that book is healthy for you to
read nonetheless!
So in most cases it is better to use the
correct term in parallel and if the technically
incorrect one dies, good, if it survives, so
be it.
Another example: There were once a newsreader
called GNUS. When a new newsreader came, and
they thought of calling it "ding" as in "ding
is not GNUS". Clever, but it didn't take.
So now it is Gnus who isn't GNUS. But it is -
only better :)
As for the ttys they are also called "the
console" or "the Linux virtual terminals" (the
Linux VTs). All those are designations are fine
and at least "tty" and "console" are also part
of technology by now: e.g., I just mentioned
the file /etc/console-setup/remap.inc in
another post; as for "tty", do
$ ls /dev/ | grep tty
> I use the compact manual [...]
Bigger always better :)
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 5:27 ` Nicolas Goaziou
2017-06-30 7:23 ` Jean-Christophe Helary
@ 2017-06-30 7:56 ` Jean-Christophe Helary
2017-06-30 8:14 ` Nicolas Goaziou
1 sibling, 1 reply; 16+ messages in thread
From: Jean-Christophe Helary @ 2017-06-30 7:56 UTC (permalink / raw)
To: Org-mode
> On Jun 30, 2017, at 14:27, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
>> It would be nice if the org manual mentioned that too, and give
>> alternative keybindings for use in the terminal because that's
>> extremely confusing.
>
> It does: (info "(org) TTY keys").
The alternative to M-S-RET is C-c C-x M = C-c C-x S-m
Why set an alternative like this when ESC RET S-<right arrow> does exactly the same thing and is way shorter/more practical ?
> See also `org-replace-disputed-keys'.
After looking at the "big" manual, I found about speed keys which seem to be a much more pragmatic approach to sorting that gui/tty key issue in org-mode. But except for a small paragraph and a few items in the tty section I could not find any reference to them, and nothing at all in the compact manual.
So, I have a few suggestions to improve that part of the documentation:
1) add a list of preset keys in the manual
2) add a line about speed keys in the compact guide
That's something I could do if the idea is accepted.
Jean-Christophe
ps: section C3 of the manual has this line about Sacha Chua: "Sacha Chua suggested copying some linking code from Planner, and helped make Org pupular through her blog." It should be "popular" not "pupular".
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 7:56 ` Jean-Christophe Helary
@ 2017-06-30 8:14 ` Nicolas Goaziou
2017-06-30 8:40 ` Jean-Christophe Helary
0 siblings, 1 reply; 16+ messages in thread
From: Nicolas Goaziou @ 2017-06-30 8:14 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: Org-mode
Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes:
> The alternative to M-S-RET is C-c C-x M = C-c C-x S-m
>
> Why set an alternative like this when ESC RET S-<right arrow> does exactly the same thing and is way shorter/more practical ?
"practical" is in the eye of the beholder.
For example, I can type "C-c C-x M" without moving my hands out of the
home row. Both ESC and right arrow require me to quit that position.
I prefer the first one without an hesitation.
> After looking at the "big" manual, I found about speed keys which seem
> to be a much more pragmatic approach to sorting that gui/tty key issue
> in org-mode. But except for a small paragraph and a few items in the
> tty section I could not find any reference to them, and nothing at all
> in the compact manual.
>
> So, I have a few suggestions to improve that part of the documentation:
> 1) add a list of preset keys in the manual
> 2) add a line about speed keys in the compact guide
>
> That's something I could do if the idea is accepted.
Sure! Improvements to documentation are always welcome.
Thank you.
Regards,
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 8:14 ` Nicolas Goaziou
@ 2017-06-30 8:40 ` Jean-Christophe Helary
2017-06-30 9:56 ` Michael Ax
0 siblings, 1 reply; 16+ messages in thread
From: Jean-Christophe Helary @ 2017-06-30 8:40 UTC (permalink / raw)
To: Org-mode
> On Jun 30, 2017, at 17:14, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> So, I have a few suggestions to improve that part of the documentation:
>> 1) add a list of preset keys in the manual
>> 2) add a line about speed keys in the compact guide
>>
>> That's something I could do if the idea is accepted.
>
> Sure! Improvements to documentation are always welcome.
Ok, I'll put that on my todo list now that I have solved that shortcut issue... :)
Jean-Christophe
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 8:40 ` Jean-Christophe Helary
@ 2017-06-30 9:56 ` Michael Ax
0 siblings, 0 replies; 16+ messages in thread
From: Michael Ax @ 2017-06-30 9:56 UTC (permalink / raw)
To: Jean-Christophe Helary, Org-mode
[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]
Also $ xmodmap .. if you should see an empty row in the output,
and a whole bunch of things clustered on the last line, then ..
write an ~/.Xmodmap to free up caps-lock and to have it act as the
Hyper_L key.
two more lines move that modifier into the free row and you get an easy
to hit
<H-return> on activation via $ xmodmap ~/.Xmodmap
With a US keyboard you might need to create that file, otherwise just add:
clear Lock
keycode 66 = Hyper_L
remove mod4 = Hyper_L
add mod3 = Hyper_L
I never worked out how to do this in the terminal as emacs is unusable
in the
terminal on my debians (since i can remember; i use zile there
instead). one
could maybe make Hyper work outside X via /etc/console-setup/ [remap.inc]
p.s. C-x h is your friend. you can not bind H-S-n, but you can bind H-N
(for example)
$ xev also shows the limits of what you can and can't bind.
iac, Caps-lock Enter is refreshingly easy to hit. hope this helps!
Sure! Improvements to documentation are always welcome.
> Ok, I'll put that on my todo list now that I have solved that shortcut issue... :)
>
> Jean-Christophe
[-- Attachment #2: Type: text/html, Size: 1686 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 5:10 ` Jean-Christophe Helary
2017-06-30 5:27 ` Nicolas Goaziou
@ 2017-06-30 5:33 ` Kaushal Modi
2017-06-30 6:17 ` Eli Zaretskii
` (2 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: Kaushal Modi @ 2017-06-30 5:33 UTC (permalink / raw)
To: Jean-Christophe Helary, Help Gnu Emacs mailing list, Org-mode
On Fri, Jun 30, 2017 at 1:12 AM Jean-Christophe Helary <
jean.christophe.helary@gmail.com> wrote:
>
> Do you mean that Shift is not recognized as a modified key by the terminal
> ?
>
That's my understanding. Also, I rarely use emacs with -nw (as I would
otherwise miss PNG and PDF support), so I am not an expert on this subject.
But based on some reading, it has to do with the type of terminal emulator
you are using. This[1] might help.
> > If you do C-h c Esc+Shift+Return, Emacs will detect only Esc+Return. So
> you will see M-RET in the echo area.
> >
> > You probably just need to use some other binding.
>
> It would be nice if the org manual mentioned that too, and give
> alternative keybindings for use in the terminal because that's extremely
> confusing.
>
I cannot comment on that as this probably has to do with the terminal
emulator and not emacs. In any case, it might be better to submit an emacs
bug report (M-x report-emacs-bug) requesting this mention in the manual.
This node already mentions something on this topic:
(elisp) Other Char Bits
but just not using the "Ctrl + Shift + .." example.
[1]: https://emacs.stackexchange.com/a/13957/115
--
Kaushal Modi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 5:10 ` Jean-Christophe Helary
2017-06-30 5:27 ` Nicolas Goaziou
2017-06-30 5:33 ` Kaushal Modi
@ 2017-06-30 6:17 ` Eli Zaretskii
2017-06-30 7:28 ` Jean-Christophe Helary
2017-06-30 6:22 ` Yuri Khan
2017-06-30 21:55 ` Emanuel Berg
4 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2017-06-30 6:17 UTC (permalink / raw)
To: help-gnu-emacs, emacs-orgmode
> From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
> Date: Fri, 30 Jun 2017 14:10:50 +0900
>
> Do you mean that Shift is not recognized as a modified key by the terminal ?
No, that's not it. The problem is that on a TTY, the way Emacs reads
keyboard input returns only characters, it doesn't return function
keys. So Shift-a returns 'A', because the keyboard driver generates
an upper-case A when you type that. But there's no up-cased RET
character, so you get just RET.
Keys like F1 work on a TTY by emitting a sequence of characters,
usually starting with ESC, and Emacs binds that sequence in special
keymaps in a way that produces the symbol F1. But Shift-RET doesn't
produce any such sequence, so there's nothing Emacs can do in that
case.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 6:17 ` Eli Zaretskii
@ 2017-06-30 7:28 ` Jean-Christophe Helary
0 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe Helary @ 2017-06-30 7:28 UTC (permalink / raw)
To: Help Gnu Emacs mailing list, Org-mode
Eli and Yuri,
Thank you *so much* for the thorough explanations. Now I know.
After having finally understood how git was working I was going back to my list of things to do for/with emacs and got frustrated by that shortcut that kept not working...
Jean-Christophe
> On Jun 30, 2017, at 15:17, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
>> Do you mean that Shift is not recognized as a modified key by the terminal ?
>
> No, that's not it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 5:10 ` Jean-Christophe Helary
` (2 preceding siblings ...)
2017-06-30 6:17 ` Eli Zaretskii
@ 2017-06-30 6:22 ` Yuri Khan
2017-06-30 21:55 ` Emanuel Berg
4 siblings, 0 replies; 16+ messages in thread
From: Yuri Khan @ 2017-06-30 6:22 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: Help Gnu Emacs mailing list, Org-mode
On Fri, Jun 30, 2017 at 12:10 PM, Jean-Christophe Helary
<jean.christophe.helary@gmail.com> wrote:
>> I'm trying to assign M-S-RET to org-insert-todo-heading because for some reason it is not assigned by default: every time I hit ESC S-RET I get ESC RET only.
>>
>> It's the limitation of the terminal.
>
> Do you mean that Shift is not recognized as a modified key by the terminal ?
A brief recap of terminal limitations, from a guy who has never used a
real hardware terminal.
The protocol by which a terminal passes keystrokes to an application
is that of an ASCII character stream, with only minor extensions
(these days it’s a UTF-8-encoded character stream). It predates the
notion of keyboard as an interactive input device.
In that protocol, there are 32 control characters with codes 0 through
31 (decimal). They are associated with Ctrl+@, Ctrl+A, …, Ctrl+Z,
Ctrl+[, Ctrl+\, Ctrl+], Ctrl+^ and Ctrl+_, and terminals pass these
character codes when these key combinations are pressed, with or
without Shift. Also, there is the control character 127, sometimes
written as Ctrl+?.
Additionally, the most frequent of these control characters have been
given single keys. These are RET = Ctrl+M, TAB = Ctrl+I, ESC = Ctrl+[,
sometimes BS = Ctrl+H, and sometimes DEL = Ctrl+?.
It follows that many terminals emit identical character codes for C-m,
C-M, RET and S-RET; C-i, C-I, TAB and S-TAB; C-[, C-{, ESC and S-ESC;
and C-?, DEL and S-DEL; the application running on the other side
cannot distinguish them.
GUI systems, on the other hand, were developed after keyboards had
been available for many years. Thus, most of they do allow
applications to distinguish any keys with any modifiers.
Some GUI terminal emulators have taken advantage of their GUI nature,
and started passing distinct escape sequences for some key
combinations. For example, Xterm emits ESC [ Z when I press Shift+Tab.
Some GUI terminal emulators also let the user customize which
character sequences they send on which keys.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: keybindings again...
2017-06-30 5:10 ` Jean-Christophe Helary
` (3 preceding siblings ...)
2017-06-30 6:22 ` Yuri Khan
@ 2017-06-30 21:55 ` Emanuel Berg
2017-07-01 0:00 ` Emanuel Berg
4 siblings, 1 reply; 16+ messages in thread
From: Emanuel Berg @ 2017-06-30 21:55 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: emacs-orgmode
Jean-Christophe Helary wrote:
> Do you mean that Shift is not recognized as
> a modified key by the terminal ?
Of course it is...
M-S-RET can be done with the old workaround.
Full tutorial here [1].
But in essence, in
/etc/console-setup/remap.inc
put
# make M-S-RET work
alt shift keycode 28 = U+1000
Then invoke this function:
# first do 'sudo chmod +s /bin/loadkeys'
lkeys () {
loadkeys -q -c -s /etc/console-setup/remap.inc
}
Then in an Emacs init file:
;; M-S-RET
(define-key input-decode-map [?\u1000] [M-S-RET-a])
(global-set-key [M-S-RET-a] (lambda () (interactive) (message "M-S-RET")))
(You can't call it [M-S-RET] because then Emacs
tells you it doesn't work :))
> It would be nice if the org manual mentioned
> that too, and give alternative keybindings
> for use in the terminal because that's
> extremely confusing.
People typically don't use the terminal.
Only the bravest do it. So it is not an area
where people put their educational brains to
work. Actually it is the opposite. When they
propose making the ttys better they put the
suggestions down because they don't want people
to use it. It should only be there as a safe
bet when everything else fail.
But to the brave it doesn't matter because you
can put tmux on top of it (or screen, no
personal experience with that tho),
problem solved.
But there are use cases even for people who
aren't that brave as to use it every day, for
example when they ssh to some remote machine to
do edits there...
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 16+ messages in thread