[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: insert w3m-current-url into minibuffer
- From: Naohiro Aota <naota@xxxxxxxxx>
- Date: Thu, 18 Aug 2011 19:37:56 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11624
- References: <8762lve711.fsf@xxxxxxxxxxx>
(B> How can we modify http://paste.lisp.org/display/38031 to instead insert
(B> w3m-current-url if not nil? Looks tough. OK true, just do a "c ....
(B> C-y", the same number of keystrokes as ".... C-c C-f", but not as intuitive.
(BI think writing from scratch is much easier... like this?
(B(define-key minibuffer-local-completion-map "\C-c\C-f" 'minibuffer-ins-w3m-url)
(B(defun minibuffer-ins-w3m-url (arg)
(B (interactive "P")
(B (let ((url (catch 'url
(B (dolist (b (cdr (buffer-list)))
(B (with-current-buffer b
(B (when w3m-current-url
(B (throw 'url w3m-current-url))))
(B (if url
(B (insert url)