+2013-06-24 Ivan Kanis <ivan@kanis.fr>
+
+ * net/eww.el (eww): Work more correctly for file: URLs.
+ (eww-detect-charset): Allow quoted charsets.
+ (eww-yank-page-url): New command and keystroke.
+
2013-06-24 Daiki Ueno <ueno@gnu.org>
* epg.el (epg-make-context): Check if PROTOCOL is valid; embed the
(> (length (split-string url "\\.")) 1))
(unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
(setq url (concat "http://" url)))
- (setq url (concat eww-search-prefix
- (replace-regexp-in-string " " "+" url))))
+ (unless (string-match-p "^file:" url)
+ (setq url (concat eww-search-prefix
+ (replace-regexp-in-string " " "+" url)))))
(url-retrieve url 'eww-render (list url)))
;;;###autoload
(pt (point)))
(or (and html-p
(re-search-forward
- "<meta[\t\n\r ]+[^>]*charset=\"?\\([^\t\n\r \"/>]+\\)" nil t)
+ "<meta[\t\n\r ]+[^>]*charset=\"?\\([^\t\n\r \"/>]+\\)[\\\"'.*]" nil t)
(goto-char pt)
(match-string 1))
(and (looking-at
(define-key map "u" 'eww-up-url)
(define-key map "t" 'eww-top-url)
(define-key map "w" 'eww-browse-with-external-browser)
+ (define-key map "y" 'eww-yank-page-url)
map))
(define-derived-mode eww-mode nil "eww"
(interactive)
(funcall eww-external-browser eww-current-url))
+(defun eww-yank-page-url ()
+ (interactive)
+ (message eww-current-url)
+ (kill-new eww-current-url))
(provide 'eww)
;;; eww.el ends here