From: Ivan Shmakov <ivan@siamics.net>
To: 19253@debbugs.gnu.org
Subject: bug#19253: M-x eww (G): does not add a eww-history entry
Date: Tue, 02 Dec 2014 15:15:49 +0000 [thread overview]
Message-ID: <87lhmqozfe.fsf@violet.siamics.net> (raw)
[-- 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))
next reply other threads:[~2014-12-02 15:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 15:15 Ivan Shmakov [this message]
2014-12-07 20:14 ` bug#19253: M-x eww (G): does not add a eww-history entry Lars Magne Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lhmqozfe.fsf@violet.siamics.net \
--to=ivan@siamics.net \
--cc=19253@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 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).