Skip to content

Instantly share code, notes, and snippets.

@kiwanami
Created November 1, 2011 16:10
Show Gist options
  • Save kiwanami/1330958 to your computer and use it in GitHub Desktop.
Save kiwanami/1330958 to your computer and use it in GitHub Desktop.
e2wm-dp-two-popup.el for org-open-at-point
(defun e2wm:dp-two-popup (buf)
(e2wm:message "#DP TWO popup : %s" buf)
(let ((buf-name (buffer-name buf))
(is-right?
(eql (selected-window)
(wlf:get-window (e2wm:pst-get-wm) 'right))))
(cond
((memq this-command '(org-open-at-point org-open-at-mouse))
(cond
(current-prefix-arg
(e2wm:pst-buffer-set (if is-right? 'left 'right) buf))
(t
(e2wm:pst-buffer-set (if is-right? 'right 'left) buf)))
(e2wm:dp-two-update-history-list) t)
((e2wm:document-buffer-p buf)
(e2wm:pst-buffer-set 'right buf)
t)
((e2wm:history-recordable-p buf)
(e2wm:pst-show-history-main)
t)
(t
(e2wm:dp-two-popup-sub buf)
t))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment