From: Ivan Shmakov <ivan@siamics.net>
To: 19106@debbugs.gnu.org
Subject: bug#19106: M-x eww: use the current URI as the default; be bound to a key
Date: Wed, 19 Nov 2014 12:01:56 +0000 [thread overview]
Message-ID: <87r3wz5rgr.fsf@violet.siamics.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 841 bytes --]
Package: emacs
Severity: wishlist
The patch MIMEd makes ‘eww’ use the currently browsed URI as the
default while prompting. One of the consequences is that it’s
now possible for the user to use M-n (or <down>) to get one, and
feed it back to EWW after editing as necessary.
I also suggest to bind the ‘eww’ command to ‘G’ in eww-mode-map,
for both it’s a sane mnemonic (“Go to”), and also given that
this behavior is rather similar to the Lynx ECGOTO command,
bound to ‘G’ in its default keymap.
Also to note is that M-x eww currently does /not/ call
eww-save-history, and simply “forgets” the page currently
visited. I use a workaround for that, but have no sane fix to
suggest right now.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 931 bytes --]
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -159,9 +203,14 @@
;;;###autoload
(defun eww (url)
"Fetch URL and render the page.
If the input doesn't look like an URL or a domain name, the
word(s) will be searched for via `eww-search-prefix'."
- (interactive "sEnter URL or keywords: ")
+ (interactive
+ (let* ((uri (plist-get eww-data :url))
+ (prompt (concat "Enter URL or keywords"
+ (if uri (format " (default %s)" uri) "")
+ ": ")))
+ (list (read-string prompt nil nil uri))))
(setq url (string-trim url))
(cond ((string-match-p "\\`file:/" url))
;; Don't mangle file: URLs at all.
@@ -513,6 +568,7 @@ the like."
(suppress-keymap map)
(define-key map "q" 'quit-window)
(define-key map "g" 'eww-reload)
+ (define-key map "G" 'eww)
(define-key map [?\t] 'shr-next-link)
(define-key map [?\M-\t] 'shr-previous-link)
(define-key map [delete] 'scroll-down-command)
next reply other threads:[~2014-11-19 12:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-19 12:01 Ivan Shmakov [this message]
2014-11-19 12:17 ` bug#19106: M-x eww: use the current URI as the default; be bound to a key Tassilo Horn
2014-11-19 13:31 ` Ivan Shmakov
2014-11-19 14:37 ` Ivan Shmakov
2014-11-19 17:31 ` Lars Magne Ingebrigtsen
2014-11-19 20:07 ` Ivan Shmakov
2014-11-19 20:27 ` Lars Magne Ingebrigtsen
2014-11-19 20:40 ` Ivan Shmakov
2014-11-22 19:20 ` bug#19106: M-x eww: provide default URIs; " Ivan Shmakov
2014-11-23 15:55 ` Lars Magne Ingebrigtsen
2014-11-19 17:09 ` bug#19106: M-x eww: use the current URI as the default; " Mark Oteiza
2014-11-20 13:45 ` Ivan Shmakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r3wz5rgr.fsf@violet.siamics.net \
--to=ivan@siamics.net \
--cc=19106@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.