3

When in org-mode, running the export command will open a windows with all the export options. However, my mouse scroll behaves erratically and I am not able to scroll down or move at all, not even by clicking on the scroll bars. (The problem is recurrent in both Linux and OS X, using org-mode version 8.2.10-30-gca21b7-elp, and GNU Emacs 24.4.1.)

See screen capture here:

animated screencast

How can I fix this problem?

  • Are you using the same mouse or track pad in OSX & Linux? – Melioratus Jan 19 '15 at 5:39
  • 1
    For future visitors you should state which version of org-mode you are using. – Andrew Swann Jan 19 '15 at 10:40
  • 1
    @NVaughan - Without moving your mouse, what happens if you use SPC, DEL, C-n, and C-p? – Melioratus Jan 20 '15 at 3:34
  • @Melioratus - Those keys work fine. It's only with the mouse that I get the problem. – NVaughan Jan 20 '15 at 16:21
  • @Melioratus - I am using different mice and trackpads in those systems. – NVaughan Jan 20 '15 at 16:23
2
+25

When reading a export command org enters a modal state, where it basically takes over Emacs reading of input. It does this by continuesly reading an event and branching into it's corresponding sub-menu until a full export-command is determined.

The function it uses for this purpose is read-char-exclusive, which, as the name suggests, only reads characters and ignores any other events (like e.g. mouse events). These events are simply dropped, though they are still echoed in the mini-buffer (for some reason).

  • Indeed. read-char-exclusive is related to read-char because they both call read-filtered-event. Try scrolling the mouse wheel after doing M-: (read-char), read-filtered-event will throw an error. read-char-exclusive doesn't tell read-filtered-event to throw an error, it tells it to keep reading until it gets a valid input. Perhaps read-filtered-event should blank out the minibuffer if it gets a non-ascii character and error_nonascii is 0. – nanny Jan 22 '15 at 16:25
0

Simple solution:

If you notice the top of the export-key-hint window, you'll get the line of "Use SPC, DEL, C-n, or C-p to navigate.", so you can just use them to scroll up/down the window for hidden content.

Simple solution about splitting window:

(setq split-height-threshold nil)
(setq split-width-threshold 0)

When this happens, maximize the window(using Alt-F10 or other shortcut), and C-c C-e, it will open the key-options window side-by-side(horizontally), you'll see all the content of the window.


Or if you want to split the window side-by-side or up-down according to your screen, put this snippet into your .emacs or init.el:

;; Automatically split window horizontally(side-by-side) if current window is wide enough
(defun display-new-buffer (buffer force-other-window)
  "If BUFFER is visible, select it.

If it's not visible and there's only one window, split the current window
and select BUFFER in the new window.

If the current window (before the split) is more than 100 columns wide,
split horizontally(left/right), else split vertically(up/down).

If the current buffer contains more than one window, select BUFFER in the
least recently used window.

This function returns the window which holds BUFFER. FORCE-OTHER-WINDOW is ignored."
  (or (get-buffer-window buffer)
      (if (one-window-p)
          (let ((new-win
                 (if (> (window-width) 100)
                     (split-window-horizontally)
                   (split-window-vertically))))
            (set-window-buffer new-win buffer)
            new-win)
        (let ((new-win (get-lru-window)))
          (set-window-buffer new-win buffer)
          new-win))))
;; use display-buffer-alist instead of display-buffer-function if the following fails
(setq display-buffer-function 'display-new-buffer)

When this happens, maximize the window(using Alt-F10 or other shortcut), and C-c C-e, it will open the key-options window side-by-side(horizontally), you'll see all the content of the window. Adjust the 100 value in the snippet for your screen.

  • Thanks but it doesn't work. It helps me with the auto-splitting of the windows, but not with the annoying display of (useless) mouse information in the minibuffer. – NVaughan Jan 19 '15 at 1:56
  • @NVaughan Your problem is you cannot see the whole content of the key-hint window so you scroll the window with your mouse then you see messages in the minibuffer. Not the problem that you scroll the window with your mouse then you see the messages in the minibuffer. I'm solving your original problem. And you got keep in mind that Emacs doesn't support mouse/touchpad as well as modern software. – CodyChan Jan 19 '15 at 8:00
  • @NVaughan And it seems that you cannot resize THAT window using keyboard/mouse/touchpad, if you try any tool to resize it, messages will be shown in the minibuffer. So as far as I know the only way to work it around is using a big screen or using my solution. – CodyChan Jan 19 '15 at 8:07
  • @ CodyChan. First of all, thanks for your help and comments. However, none of your methods allow me to solve the main problem, which---as you point---is for me to see the remaining export options of the window. – NVaughan Jan 19 '15 at 16:57
  • @NVaughan Using my methods, I never worry about the other window(such as key-hint window in magit, org-mode etc.) too small that I cannot see the full content of the window. Side-by-side-windows is the best solution to your problem. – CodyChan Jan 20 '15 at 3:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.