From b6fefcb3a51562d2d2857ef3a296539ad32a9fcb Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 20 Jan 2015 14:29:50 +0100 Subject: Add elnode handler to get current conkeror URL By running this in elnode, one can then point their browser to the chosen port and server and they'll get 302-redirected to whichever URL conkeror is showing at that moment. --- emacs/.emacs.d/init.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'emacs/.emacs.d/init.el') diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index fb61db1..27a4162 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -654,6 +654,13 @@ For `python-mode' I prefer `python-imenu-create-flat-index'." (hide-entry)) (call-interactively func)))))) +(defun oni:current-conkeror-tab (httpcon) + "Demonstration function" + (elnode-http-start + httpcon 302 `("Content-Type" . "text/html") + (cons "Location" (shell-command-to-string "conkeror-eval"))) + (elnode-http-return httpcon)) + (let (setp) (defun oni:set-theme (frame) "Try to set the theme for the current (first) frame." -- cgit v1.2.3-54-g00ecf