* bug#19253: M-x eww (G): does not add a eww-history entry
@ 2014-12-02 15:15 Ivan Shmakov
2014-12-07 20:14 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Shmakov @ 2014-12-02 15:15 UTC (permalink / raw)
To: 19253
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
Package: emacs
Severity: minor
Using eww.el as of 52fab40c1606 (2014-12-01 17:56:02Z), the
following sequence results in the “No eww-histories are defined”
error. And indeed, eww-history at this point is nil.
$ emacs -Q
M-x eww RET https://example.org/ RET
G https://example.net/ RET
H
Please consider the (first) patch MIMEd.
* net/eww.el (eww): Moved history recording here...
(eww-browse-url): ... from here.
One another suggestion is to use generate-new-buffer in
eww-browse-url, as per the second patch MIMEd.
* net/eww.el (eww-browse-url): Use generate-new-buffer (was:
iterating over possible buffer names.)
--
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: 995 bytes --]
--- a/lisp/net/eww.el 2014-12-01 17:56:02 +0000
+++ b/lisp/net/eww.el 2014-12-02 14:59:54 +0000
@@ -253,7 +253,10 @@ defun eww (url &optional no-save-history)
(setq url (concat url "/"))))
(setq url (concat eww-search-prefix
(replace-regexp-in-string " " "+" url))))))
- (unless (eq major-mode 'eww-mode)
+ (if (eq major-mode 'eww-mode)
+ (when (or (plist-get eww-data :url)
+ (plist-get eww-data :dom))
+ (eww-save-history))
(eww-setup-buffer)
(plist-put eww-data :url url)
(eww-update-header-line-format)
@@ -685,10 +688,7 @@ defun eww-browse-url (url &optional new-window)
(setq num (1+ num)
new-buffer (format "*eww*<%d>" num)))
(switch-to-buffer new-buffer))
- (eww-mode))
- ((and (equal major-mode 'eww-mode)
- (plist-get eww-data :url))
- (eww-save-history)))
+ (eww-mode)))
(eww url))
(defun eww-back-url ()
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: Type: text/diff, Size: 534 bytes --]
--- a/lisp/net/eww.el 2014-12-02 14:59:54 +0000
+++ b/lisp/net/eww.el 2014-12-02 15:02:33 +0000
@@ -682,12 +682,7 @@
;;;###autoload
(defun eww-browse-url (url &optional new-window)
(cond (new-window
- (let ((new-buffer "*eww*")
- (num 0))
- (while (get-buffer new-buffer)
- (setq num (1+ num)
- new-buffer (format "*eww*<%d>" num)))
- (switch-to-buffer new-buffer))
+ (switch-to-buffer (generate-new-buffer "*eww*"))
(eww-mode)))
(eww url))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-07 20:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 15:15 bug#19253: M-x eww (G): does not add a eww-history entry Ivan Shmakov
2014-12-07 20:14 ` Lars Magne Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).