* Problems with M-<up> on Emacs 25.
@ 2016-04-17 9:57 Ian Barton
2016-04-17 23:51 ` Adam Porter
0 siblings, 1 reply; 3+ messages in thread
From: Ian Barton @ 2016-04-17 9:57 UTC (permalink / raw
To: emacs-orgmode
I think that this is an Emacs not org-mode problem, but maybe somebody
can throw some light on it.
On my computer running 24.5.1 M<up> works as expected. However, on
emacs 25.1.50.1 I get:
Debugger entered--Lisp error: (error "There is no other window")
scroll-other-window(-)
scroll-other-window-down(nil)
funcall-interactively(scroll-other-window-down nil)
call-interactively(scroll-other-window-down nil nil)
command-execute(scroll-other-window-down)
However, in my org buffer:
c-h w org-metaup
org-metaup is on <M-up>
which seems to indicate that the key is correctly bound.
If I start emacs with a minimal config that just has (require
org-mode), I still get the error.
I then tried the "If it doesn't work hit it with the biggest hammer
available" approach:
(require 'org)
(require 'ob-tangle)
(eval-after-load "org"
'(progn
(define-key org-mode-map (kbd "M-<down>") 'org-metadown)
(define-key org-mode-map (kbd "M-<up>") 'org-metaup)))
but emacs thinks that M-<up> is bound to scroll other window.
--
Best wishes,
Ian.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems with M-<up> on Emacs 25.
2016-04-17 9:57 Problems with M-<up> on Emacs 25 Ian Barton
@ 2016-04-17 23:51 ` Adam Porter
2016-04-18 3:14 ` Kaushal Modi
0 siblings, 1 reply; 3+ messages in thread
From: Adam Porter @ 2016-04-17 23:51 UTC (permalink / raw
To: emacs-orgmode
Ian Barton <lists@wilkesley.net> writes:
> c-h w org-metaup
> org-metaup is on <M-up>
>
> which seems to indicate that the key is correctly bound.
>
> (require 'org)
> (require 'ob-tangle)
> (eval-after-load "org"
> '(progn
> (define-key org-mode-map (kbd "M-<down>") 'org-metadown)
> (define-key org-mode-map (kbd "M-<up>") 'org-metaup)))
>
> but emacs thinks that M-<up> is bound to scroll other window.
This probably won't be much help, but occasionally I've noticed unusual
problems with keybindings in Emacs where a key seems to be bound to more
than one command. You might try checking "C-h k <M-up>" and see what it
says.
Also, try with "emacs -q" and "emacs -Q" and see if you can reproduce it
that way. That might help narrow it down.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems with M-<up> on Emacs 25.
2016-04-17 23:51 ` Adam Porter
@ 2016-04-18 3:14 ` Kaushal Modi
0 siblings, 0 replies; 3+ messages in thread
From: Kaushal Modi @ 2016-04-18 3:14 UTC (permalink / raw
To: Adam Porter, emacs-orgmode, lists
[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]
Hi Ian,
> On my computer running 24.5.1 M<up> works as expected. However, on emacs
25.1.50.1 I get ...
First of all, it is important to know in which major mode you are trying to
use the M-<up>/<down> bindings. They are undefined by defined and are
defined in org-mode-map.
It is also important to know in which minor/major mode maps you are binding
those in your config. I would guess that the problem you see does not occur
in an emacs -Q session?
It's also important to know that a key can be bound to different command in
different minor/major mode maps and in global maps.
Here's the priority:
1. Minor mode map (last enabled minor mode)
2. Major mode map (e.g. org-mode-map)
3. Global map
So even if M-<up> is bound to org-metaup in org-mode-map, if foo-mode-map
(some minor mode map) as that key bound to a function 'bar' and if foo-mode
is enabled in an org-mode buffer, M-<up> will now call 'bar' instead of
'org-metaup'. So it is important to understand the consequences when making
new bindings to minor mode maps (or understand the maps of the minor modes
you enable).
> but emacs thinks that M-<up> is bound to scroll other window.
Emacs does not bind M-<up> by default to anything. So my guess is that
somewhere in your config, you are binding that key to scroll other window.
(I myself have been guilty of stepping over org-mode-map bindings in the
past. Now I have learnt when to bind keys in global-map vs my own minor
mode map which I use when I want my bindings to override everything else).
--
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 2316 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-18 3:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-17 9:57 Problems with M-<up> on Emacs 25 Ian Barton
2016-04-17 23:51 ` Adam Porter
2016-04-18 3:14 ` Kaushal Modi
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.