Now showing
Emacs: commands in popup frames with 'emacsclient'
About this film
In this 15-minute video I show the custom code I have to run any Emacs command in a popup frame. The advantage of this is that I do not need to be in Emacs already. The examples I show cover org-capture and my tmr package. This is the code I used in the video. Remember to assign the emacsclient calls to a system-level key binding. ;;;; Run commands in a popup frame (defun prot-window-delete-popup-frame (&rest _) "Kill selected selected frame if it has parameter `prot-window-popup-frame'. Use this function via a hook." (when (frame-parameter nil 'prot-window-popup-frame) (delete-frame))) (defmacro prot-window-define-with-popup-frame (command) "Define interactive function which calls COMMAND in a new frame. Make the new frame have the `prot-window-popup-frame' parameter." `(defun ,(intern (format "prot-window-popup-%s" command)) () ,(format "Run `%s' in a popup frame with `prot-window-popup-frame' parameter. Also see `prot-window-delete-popup-frame'." command) (interactive) (let ((frame (make-frame '((prot-window-popup-frame . t))))) (select-frame frame) (switch-to-buffer " prot-window-hidden-buffer-for-popup-frame") (condition-case nil (call-interactively ',command) ((quit error use…
Directors & creators
Protesilaos Stavrou
More from this pool