rudolfochrist / interleave

Emacs minor mode to interleave notes and text books
329 stars 18 forks source link

Horizontal split #32

Closed jmburgos closed 7 years ago

jmburgos commented 8 years ago

Would it be possible to add options a) to make the M-x interleave function do an horizontal window split, having the pdf document on top and the notes on the bottom, and b) to select the number of lines in the notes window? In this way we can maximize the width and height of the pdf window, allowing for easier reading.
Many thanks!

rudolfochrist commented 8 years ago

Hi there,

a) For a horizontal split you can start interleave with a prefix argument:

C-u M-x interleave RET

This feature is unfortunately undocumented. I will change that soon.

b) Do I understand you correctly that you want to set the number of lines on a per-document basis? Or do you want to set them steadily? Also, specifying the number of lines would only be sensible for horizontal splits. May I ask you what your exact use case is? I can imaging using it as a poor-man's presenter view with the slides on top of a small window for notes. Which would actually be quite nice 😉 .

jmburgos commented 8 years ago

Hi, The number of lines does should be a fixed amount. And yes, it makes sense only for horizontal splits. I am asking for this because I want to maximize the proportion of the screen used by the pdf window, so it is easier to read them on small screens (like my laptop). I found that I do not take very extensive notes. So with an horizontal split and a notes window of, say, 10 lines, I can get a very good view of the pdf and at the same time I have enough space to write on the notes window. But yes, a setting like this could be also used for presentations!

jmburgos commented 8 years ago

I got what I wanted by adding this to my .emacs file:

`(use-package interleave :defer t :bind ("M-i" . interleave-with-prefix-arg) ; Interleave with horizontal window

:config (defun interleave-with-prefix-arg () (interactive) (setq current-prefix-arg '(split-window-below)) (call-interactively 'interleave) (enlarge-window '20) ) )`

rudolfochrist commented 7 years ago

Resolved.

You can now configure the splitting and window enlargement:

(setq interleave-split-direction 'horizontal
      interleave-split-lines 20)

Or you can use the customize interface. Invoke interleave-mode as normal.