[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [eev] Problem with M-k
From: |
Eduardo Ochs |
Subject: |
Re: [eev] Problem with M-k |
Date: |
Wed, 20 Nov 2013 04:00:24 -0200 |
On Tue, Nov 19, 2013 at 6:06 AM, Alan Schmitt
<address@hidden> wrote:
> Hi Eduardo,
>
> (I'm putting the mailing list in CC.)
>
> address@hidden writes:
>
>> Hi Alan,
>> could you please send to the mailing list an ascii art
>> drawing of your window setups for e-mail and agenda -
>> with the names of the buffers and major modes?
>
> These are usually fairly simple layout. For email, it's created
> automatically when viewing some mail using mu4e. It looks like this
> (with the names of the modes):
>
> |----------------------------------------|
> | mu4e-headers (about 10 line) |
> |----------------------------------------|
> | mu4e-view (rest of the vertical space) |
> | |
> |----------------------------------------|
>
> Even though it's a simple layout, I cannot simply C-x b to it, as there
> are two windows.
>
> For agenda, it's even simpler: it's a single window with the *Org
> Agenda* buffer. Sometimes, after a few hours, it becomes slightly more
> complex:
>
> |--------------+-----------------------|
> | *Org Agenda* | refile buffer 1 (Org) |
> | | --------------------- |
> | | refile buffer 2 (Org) |
> | | --------------------- |
> | | todo buffer (Org) |
> |--------------+-----------------------|
>
> The refile buffers and the org buffer are files on disk.
>
> Alan
Hi Alan, can you test this code?
It does much less than the ideal - ideally the defs for eejump-22
and eejump-33 below (meant to be invoked by M-2 M-2 M-j and
M-3 M-4 M-j) would do something smarter when some of their
buffers do not exist... but this is a prototype.
;; New window layouts:
;; ______________________
;; 1|3: | | |
;; mu4e: | | B |
;; _____________ | |___________|
;; | | | | |
;; | A (n lines) | | A | C |
;; |_____________| | |___________|
;; | | | | |
;; | B | | | D |
;; |_____________| |__________|___________|
;;
(defun ee-set-window-height (ht)
(window-resize nil (- ht (window-total-height))))
(defun find-wset-mu4e-a (n a b)
(find-wset "12__o_o" `(ee-set-window-height ,n) a b))
(defun find-wset-mu4e-b (n a b)
(find-wset "12__o_" `(ee-set-window-height ,n) a b))
(defun find-1|3a (a b c d) (find-wset "13_o22+_o_o_o" a b c d))
(defun find-1|3b (a b c d) (find-wset "13_o22+_o_o_oo" a b c d))
(defun find-1|3c (a b c d) (find-wset "13_o22+_o_o_ooo" a b c d))
(defun find-1|3d (a b c d) (find-wset "13_o22+_o_o_" a b c d))
;; Tests:
;; (find-wset-mu4e-a 10 nil nil)
;; (find-wset-mu4e-a 10 nil nil)
(defun eejump-22 ()
(find-wset-mu4e-a 10
'(find-ebuffer "mu4e-headers")
'(find-ebuffer "mu4e-view")))
(defun eejump-33 ()
(find-1|3a
'(find-ebuffer "*Org agenda*")
'(find-ebuffer "refile buffer 1")
'(find-ebuffer "refile buffer 2")
'(find-ebuffer "todo buffer")))
Cheers =),
Eduardo