[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: insert w3m-current-url into minibuffer
- From: jidanni@xxxxxxxxxxx
- Date: Fri, 19 Aug 2011 19:21:06 +0800
- X-ml-name: emacs-w3m
- X-mail-count: 11625
- References: <87fwkzattn.fsf@xxxxxxxxx>
OK thanks! This is what I ended up putting in .emacs-w3m. It seems to work OK.
(defun minibuffer-ins-w3m-url (arg)
(interactive "P")
(let ((url (catch 'url
(dolist (b (cdr (buffer-list)))
(with-current-buffer b
(when w3m-current-url
(throw 'url w3m-current-url))))
nil)))
(if url
(insert url)
(beep))))
(define-key minibuffer-local-map "\C-c\C-u"
'minibuffer-ins-w3m-url)
(define-key minibuffer-local-ns-map "\C-c\C-u"
'minibuffer-ins-w3m-url)
(define-key minibuffer-local-completion-map "\C-c\C-u"
'minibuffer-ins-w3m-url)
(define-key minibuffer-local-must-match-map "\C-c\C-u"
'minibuffer-ins-w3m-url)