unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* emacs vs emacs -nw
@ 2017-05-29 13:57 Jean-Christophe Helary
  2017-05-29 17:47 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ 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] 14+ 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; 14+ 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] 14+ 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; 14+ 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] 14+ 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; 14+ 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] 14+ 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; 14+ 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] 14+ 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; 14+ 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] 14+ 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; 14+ 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] 14+ 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; 14+ 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] 14+ 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
  0 siblings, 1 reply; 14+ 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] 14+ 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
  0 siblings, 1 reply; 14+ 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] 14+ 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; 14+ 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] 14+ 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; 14+ 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] 14+ 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; 14+ 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] 14+ 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; 14+ 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] 14+ messages in thread

end of thread, other threads:[~2017-05-31 11:38 UTC | newest]

Thread overview: 14+ 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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).