* emacs vs emacs -nw
@ 2017-05-29 13:57 Jean-Christophe Helary
2017-05-29 17:47 ` Eli Zaretskii
0 siblings, 1 reply; 15+ messages in thread
From: Jean-Christophe Helary @ 2017-05-29 13:57 UTC (permalink / raw)
To: emacs-devel
I'm running in the following issue:
emacs and emacs -nw seem to have different initialisation parameters that I can't seem to disable even when I run emacs -Q. I'd like to have hints for further investigation...
Practically speaking, emacs in a graphical frame seems to re-bind a number of org-mode keys while emacs -nw gets the expected bindings.
This happens *even* when I run emacs -Q vs emacs -Q -nw
Where is emacs getting that sort of binding information?
Jean-Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-29 13:57 emacs vs emacs -nw Jean-Christophe Helary
@ 2017-05-29 17:47 ` Eli Zaretskii
2017-05-29 23:09 ` Jean-Christophe Helary
0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2017-05-29 17:47 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: emacs-devel
> From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
> Date: Mon, 29 May 2017 22:57:52 +0900
>
> emacs and emacs -nw seem to have different initialisation parameters that I can't seem to disable even when I run emacs -Q. I'd like to have hints for further investigation...
>
> Practically speaking, emacs in a graphical frame seems to re-bind a number of org-mode keys while emacs -nw gets the expected bindings.
>
> This happens *even* when I run emacs -Q vs emacs -Q -nw
On what OS?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-29 17:47 ` Eli Zaretskii
@ 2017-05-29 23:09 ` Jean-Christophe Helary
2017-05-30 18:33 ` Alan Third
0 siblings, 1 reply; 15+ messages in thread
From: Jean-Christophe Helary @ 2017-05-29 23:09 UTC (permalink / raw)
To: emacs-devel
> On May 30, 2017, at 2:47, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> emacs and emacs -nw seem to have different initialisation parameters that I can't seem to disable even when I run emacs -Q. I'd like to have hints for further investigation...
>>
>> Practically speaking, emacs in a graphical frame seems to re-bind a number of org-mode keys while emacs -nw gets the expected bindings.
>>
>> This happens *even* when I run emacs -Q vs emacs -Q -nw
>
> On what OS?
macOS. I also get this behavior in Aquamacs.
Jean-Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-29 23:09 ` Jean-Christophe Helary
@ 2017-05-30 18:33 ` Alan Third
2017-05-30 22:34 ` Tim Cross
2017-05-30 22:36 ` Jean-Christophe Helary
0 siblings, 2 replies; 15+ messages in thread
From: Alan Third @ 2017-05-30 18:33 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: emacs-devel
On Tue, May 30, 2017 at 08:09:58AM +0900, Jean-Christophe Helary wrote:
>
> > On May 30, 2017, at 2:47, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> >> emacs and emacs -nw seem to have different initialisation
> >> parameters that I can't seem to disable even when I run emacs -Q.
> >> I'd like to have hints for further investigation...
> >>
> >> Practically speaking, emacs in a graphical frame seems to re-bind
> >> a number of org-mode keys while emacs -nw gets the expected
> >> bindings.
> >>
> >> This happens *even* when I run emacs -Q vs emacs -Q -nw
> >
> > On what OS?
>
> macOS. I also get this behavior in Aquamacs.
Check list/term/ns-win.el. It claims it’s loaded when Emacs detects
that NS windows are going to be used, in which case it might be the
source of your mystery rebindings.
--
Alan Third
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-30 18:33 ` Alan Third
@ 2017-05-30 22:34 ` Tim Cross
2017-05-30 22:36 ` Jean-Christophe Helary
1 sibling, 0 replies; 15+ messages in thread
From: Tim Cross @ 2017-05-30 22:34 UTC (permalink / raw)
To: Alan Third; +Cc: Jean-Christophe Helary, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]
While a long shot, also check that the GUI and terminal emacs are the same
version. I have seen a situation where emacs was installed from brew using
the cask (i.e. emacsforosx binary), which creates Emacs.app but does not
create a link for 'emacs'. As a result, when you run GUI via dock you get
latest Emacs.app version, but when you run from terminal, you get
/usr/bin/emacs (very old emacs 21 or 22, cna't remember). Unlikely, but
worth checking.
On 31 May 2017 at 04:33, Alan Third <alan@idiocy.org> wrote:
> On Tue, May 30, 2017 at 08:09:58AM +0900, Jean-Christophe Helary wrote:
> >
> > > On May 30, 2017, at 2:47, Eli Zaretskii <eliz@gnu.org> wrote:
> > >
> > >> emacs and emacs -nw seem to have different initialisation
> > >> parameters that I can't seem to disable even when I run emacs -Q.
> > >> I'd like to have hints for further investigation...
> > >>
> > >> Practically speaking, emacs in a graphical frame seems to re-bind
> > >> a number of org-mode keys while emacs -nw gets the expected
> > >> bindings.
> > >>
> > >> This happens *even* when I run emacs -Q vs emacs -Q -nw
> > >
> > > On what OS?
> >
> > macOS. I also get this behavior in Aquamacs.
>
> Check list/term/ns-win.el. It claims it’s loaded when Emacs detects
> that NS windows are going to be used, in which case it might be the
> source of your mystery rebindings.
> --
> Alan Third
>
>
--
regards,
Tim
--
Tim Cross
[-- Attachment #2: Type: text/html, Size: 2225 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-30 18:33 ` Alan Third
2017-05-30 22:34 ` Tim Cross
@ 2017-05-30 22:36 ` Jean-Christophe Helary
2017-05-31 8:31 ` Phil Sainty
1 sibling, 1 reply; 15+ messages in thread
From: Jean-Christophe Helary @ 2017-05-30 22:36 UTC (permalink / raw)
To: Alan Third; +Cc: emacs-devel
> On May 31, 2017, at 3:33, Alan Third <alan@idiocy.org> wrote:
>
> Check list/term/ns-win.el. It claims it’s loaded when Emacs detects
> that NS windows are going to be used, in which case it might be the
> source of your mystery rebindings.
I'll do, but the same issue with org-mode happens on an Xubuntu machine and on a GTKX/gnu linux machine as was reported on the help list.
Just to make sure info is not lost: emacs in terminal has all the default org-mode bindings and emacs GUI misses some (especially some linked to Meta that seems to not accept ESC anymore, I've not checked them all).
Jean-Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-30 22:36 ` Jean-Christophe Helary
@ 2017-05-31 8:31 ` Phil Sainty
2017-05-31 8:58 ` Jean-Christophe Helary
0 siblings, 1 reply; 15+ messages in thread
From: Phil Sainty @ 2017-05-31 8:31 UTC (permalink / raw)
To: emacs-devel@gnu.org
Jean-Christophe Helary wrote:
> Practically speaking, emacs in a graphical frame seems to re-bind
> a number of org-mode keys while emacs -nw gets the expected bindings.
> emacs in terminal has all the default org-mode bindings and emacs
> GUI misses some (especially some linked to Meta that seems to not
> accept ESC anymore, I've not checked them all).
Could you provide an example and/or a recipe to demonstrate the issue?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-31 8:31 ` Phil Sainty
@ 2017-05-31 8:58 ` Jean-Christophe Helary
2017-05-31 9:41 ` Yuri Khan
0 siblings, 1 reply; 15+ messages in thread
From: Jean-Christophe Helary @ 2017-05-31 8:58 UTC (permalink / raw)
To: emacs-devel@gnu.org
> On May 31, 2017, at 17:31, Phil Sainty <psainty@orcon.net.nz> wrote:
>
> Jean-Christophe Helary wrote:
>
>> Practically speaking, emacs in a graphical frame seems to re-bind
>> a number of org-mode keys while emacs -nw gets the expected bindings.
>
>> emacs in terminal has all the default org-mode bindings and emacs
>> GUI misses some (especially some linked to Meta that seems to not
>> accept ESC anymore, I've not checked them all).
>
> Could you provide an example and/or a recipe to demonstrate the issue?
• Open an org file with a few headers and different header levels.
• Select a lower level header
• Hit M-left
Expected result:
• the header is promoted
Result in GUI Emacs (Aquamacs too)
• The cursor jumps to the beginning of the previous word
Jean-Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-31 8:58 ` Jean-Christophe Helary
@ 2017-05-31 9:41 ` Yuri Khan
2017-05-31 10:04 ` Jean-Christophe Helary
[not found] ` <f073b2979fd243238ad49a59acc3fa4e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
0 siblings, 2 replies; 15+ messages in thread
From: Yuri Khan @ 2017-05-31 9:41 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: emacs-devel@gnu.org
On Wed, May 31, 2017 at 3:58 PM, Jean-Christophe Helary
<jean.christophe.helary@gmail.com> wrote:
>> Could you provide an example and/or a recipe to demonstrate the issue?
>
> • Open an org file with a few headers and different header levels.
> • Select a lower level header
> • Hit M-left
I believe this last step may be a bit unclear and misleading. Today,
Meta is not a real key. You only get it via emulation from ESC or a
modifier key, normally Alt on PCs. I don’t know the convention on Mac.
On X11/GNU/Linux, I get header promotion with Alt+Left but word
navigation on Esc Left.
> Expected result:
> • the header is promoted
>
> Result in GUI Emacs (Aquamacs too)
> • The cursor jumps to the beginning of the previous word
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-31 9:41 ` Yuri Khan
@ 2017-05-31 10:04 ` Jean-Christophe Helary
2017-05-31 10:41 ` Jean-Christophe Helary
[not found] ` <f073b2979fd243238ad49a59acc3fa4e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
1 sibling, 1 reply; 15+ messages in thread
From: Jean-Christophe Helary @ 2017-05-31 10:04 UTC (permalink / raw)
To: emacs-devel@gnu.org; +Cc: Org-mode
> On May 31, 2017, at 18:41, Yuri Khan <yuri.v.khan@gmail.com> wrote:
>
> On Wed, May 31, 2017 at 3:58 PM, Jean-Christophe Helary
> <jean.christophe.helary@gmail.com> wrote:
>
>>> Could you provide an example and/or a recipe to demonstrate the issue?
>>
>> • Open an org file with a few headers and different header levels.
>> • Select a lower level header
>> • Hit M-left
>
> I believe this last step may be a bit unclear and misleading. Today,
> Meta is not a real key. You only get it via emulation from ESC or a
> modifier key, normally Alt on PCs. I don’t know the convention on Mac.
Ooops, you're right. Indeed.
On my machine I *systematically* use ESC for META.
> On X11/GNU/Linux, I get header promotion with Alt+Left but word
> navigation on Esc Left.
Now that I think about it, I just tried this:
(setq ns-right-command-modifier 'meta)
And I get the expected behavior in GUI emacs. So it's really an issue about ESC that is not recognized in GUI mode for *some* bindings in org-mode.
Jean-Christophe
>
>> Expected result:
>> • the header is promoted
>>
>> Result in GUI Emacs (Aquamacs too)
>> • The cursor jumps to the beginning of the previous word
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-31 10:04 ` Jean-Christophe Helary
@ 2017-05-31 10:41 ` Jean-Christophe Helary
2017-05-31 11:05 ` Yuri Khan
2017-05-31 11:30 ` Eli Zaretskii
0 siblings, 2 replies; 15+ messages in thread
From: Jean-Christophe Helary @ 2017-05-31 10:41 UTC (permalink / raw)
To: emacs-devel@gnu.org; +Cc: Org-mode
> On May 31, 2017, at 19:04, Jean-Christophe Helary <jean.christophe.helary@gmail.com> wrote:
>> On X11/GNU/Linux, I get header promotion with Alt+Left but word
>> navigation on Esc Left.
>
> Now that I think about it, I just tried this:
>
> (setq ns-right-command-modifier 'meta)
>
> And I get the expected behavior in GUI emacs. So it's really an issue about ESC that is not recognized in GUI mode for *some* bindings in org-mode.
Ok, I just tried something else:
(setq ns-function-modifier 'meta) and what I get is *very* similar to the issue I have with ESC:
FN-x correctly "calls" M-x
FN-left in a level 2 header in org mode triggers beginning-of-buffer and *not* org-promote-header.
So the problem is not limited to ESC, and maybe not limited to org-mode.
Jean-Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
[not found] ` <f073b2979fd243238ad49a59acc3fa4e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-05-31 10:54 ` Eric S Fraga
0 siblings, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2017-05-31 10:54 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
On Wednesday, 31 May 2017 at 10:04, Jean-Christophe Helary wrote:
[...]
> And I get the expected behavior in GUI emacs. So it's really an issue
> about ESC that is not recognized in GUI mode for *some* bindings in
> org-mode.
I can actually confirm this on quite recent org (as well as 8.2.10 as
bundled with emacs 26.x) on Linux as well.
Comparing Alt-left with the ESC key followed by left arrow gives this
using C-h c:
: <M-left> runs the command org-metaleft
: ESC <left> (translated from <escape> <left>) runs the command backward-word
with emacs -Q in GUI mode. Have not tried terminal mode.
As Jean-Christophe has said, this seems to be independent of the window
manager. For completeness, I am using ratpoison.
--
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.6-425-gf4fca1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-31 10:41 ` Jean-Christophe Helary
@ 2017-05-31 11:05 ` Yuri Khan
2017-05-31 11:30 ` Eli Zaretskii
1 sibling, 0 replies; 15+ messages in thread
From: Yuri Khan @ 2017-05-31 11:05 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: Org-mode, emacs-devel@gnu.org
On Wed, May 31, 2017 at 5:41 PM, Jean-Christophe Helary
<jean.christophe.helary@gmail.com> wrote:
> FN-left in a level 2 header in org mode triggers beginning-of-buffer and *not* org-promote-header.
The Fn key is a whole different issue. It’s likely that your system is
reporting a Home key code when you press Fn+Left.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-31 10:41 ` Jean-Christophe Helary
2017-05-31 11:05 ` Yuri Khan
@ 2017-05-31 11:30 ` Eli Zaretskii
2017-05-31 11:38 ` Jean-Christophe Helary
1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2017-05-31 11:30 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: emacs-orgmode, emacs-devel
> From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
> Date: Wed, 31 May 2017 19:41:00 +0900
> Cc: Org-mode <emacs-orgmode@gnu.org>
>
> Ok, I just tried something else:
>
> (setq ns-function-modifier 'meta) and what I get is *very* similar to the issue I have with ESC:
>
> FN-x correctly "calls" M-x
> FN-left in a level 2 header in org mode triggers beginning-of-buffer and *not* org-promote-header.
>
> So the problem is not limited to ESC, and maybe not limited to org-mode.
AFAIR, the remapping of Meta-something to ESC-something happens
automatically only for characters, not for function keys. For
function keys, this remapping must be set somewhere, or it won't
happen. You can see in bindings.el how some of these remappings are
set up.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: emacs vs emacs -nw
2017-05-31 11:30 ` Eli Zaretskii
@ 2017-05-31 11:38 ` Jean-Christophe Helary
0 siblings, 0 replies; 15+ messages in thread
From: Jean-Christophe Helary @ 2017-05-31 11:38 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-orgmode, emacs-devel
> On May 31, 2017, at 20:30, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
>> Date: Wed, 31 May 2017 19:41:00 +0900
>> Cc: Org-mode <emacs-orgmode@gnu.org>
>>
>> Ok, I just tried something else:
>>
>> (setq ns-function-modifier 'meta) and what I get is *very* similar to the issue I have with ESC:
>>
>> FN-x correctly "calls" M-x
>> FN-left in a level 2 header in org mode triggers beginning-of-buffer and *not* org-promote-header.
>>
>> So the problem is not limited to ESC, and maybe not limited to org-mode.
>
> AFAIR, the remapping of Meta-something to ESC-something happens
> automatically only for characters, not for function keys. For
> function keys, this remapping must be set somewhere, or it won't
> happen. You can see in bindings.el how some of these remappings are
> set up.
Yes, I realized after Yuri's comment that the comparison with ESC was a bit far-fetched.
Jean-Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-05-31 11:38 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-29 13:57 emacs vs emacs -nw Jean-Christophe Helary
2017-05-29 17:47 ` Eli Zaretskii
2017-05-29 23:09 ` Jean-Christophe Helary
2017-05-30 18:33 ` Alan Third
2017-05-30 22:34 ` Tim Cross
2017-05-30 22:36 ` Jean-Christophe Helary
2017-05-31 8:31 ` Phil Sainty
2017-05-31 8:58 ` Jean-Christophe Helary
2017-05-31 9:41 ` Yuri Khan
2017-05-31 10:04 ` Jean-Christophe Helary
2017-05-31 10:41 ` Jean-Christophe Helary
2017-05-31 11:05 ` Yuri Khan
2017-05-31 11:30 ` Eli Zaretskii
2017-05-31 11:38 ` Jean-Christophe Helary
[not found] ` <f073b2979fd243238ad49a59acc3fa4e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-05-31 10:54 ` Eric S Fraga
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.