unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Shmakov <ivan@siamics.net>
To: 19226@debbugs.gnu.org
Subject: bug#19226: eww.el desktop support fixes: autoload eww-mode, use inhibit-read-only
Date: Sat, 14 Feb 2015 20:50:41 +0000	[thread overview]
Message-ID: <87pp9c9pzy.fsf@violet.siamics.net> (raw)
In-Reply-To: <87bnnpne57.fsf_-_@violet.siamics.net> (Ivan Shmakov's message of "Sun, 30 Nov 2014 11:04:04 +0000")

[-- Attachment #1: Type: text/plain, Size: 863 bytes --]

	The discussion, as it seems, have lead us nowhere.

	Would there be any objections against me pushing the (updated)
	fix sometime within the next two days, /as well as/ a couple of
	unrelated minor changes (both MIMEd)?  (Somehow, I believe that
	the discussion over the possible desktop.el vs. special modes
	changes can safely be postponed until something specific is
	suggested.)

	TIA.

Fix eww.el desktop support.

* lisp/net/eww.el (eww-mode): Add autoload cookie.
(eww-restore-desktop): Use inhibit-read-only.

Fixes: debbugs:19226

Minor eww.el fixes.

* lisp/net/eww.el (eww-suggest-uris): Add autoload cookie, so that
add-hook works correctly even if the file is not yet loaded.
(eww-list-histories): Do not pad the rightmost (URIs) column.

-- 
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: 702 bytes --]

--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -686,6 +687,8 @@
     map)
   "Tool bar for `eww-mode'.")
 
+;; Autoload cookie needed by desktop.el.
+;;;###autoload
 (define-derived-mode eww-mode special-mode "eww"
   "Mode for browsing the web."
   (setq-local eww-data (list :title ""))
@@ -1877,8 +1880,9 @@ defun eww-restore-desktop (file-name buffer-name misc-data)
 	(case eww-restore-desktop
 	  ((t auto) (eww (plist-get eww-data :url)))
 	  ((zerop (buffer-size))
-	   (insert (substitute-command-keys
-		    eww-restore-reload-prompt))))))
+	   (let ((inhibit-read-only t))
+	     (insert (substitute-command-keys
+		      eww-restore-reload-prompt)))))))
     ;; .
     (current-buffer)))
 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: Type: text/diff, Size: 665 bytes --]

--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -60,6 +60,7 @@
   :group 'eww
   :type 'string)
 
+;;;###autoload
 (defcustom eww-suggest-uris
   '(eww-links-at-point
     url-get-url-at-point
@@ -1634,7 +1637,7 @@ defun eww-list-histories ()
 	(setq start (point))
 	(setq domain-length (max domain-length (length (plist-get history :url))))
 	(setq title-length (max title-length (length (plist-get history :title)))))
-      (setq format (format "%%-%ds %%-%ds" title-length domain-length)
+      (setq format (format "%%-%ds %%s" title-length)
 	    header-line-format
 	    (concat " " (format format "Title" "URL")))
       (dolist (history eww-history-trans)

  parent reply	other threads:[~2015-02-14 20:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-13 12:17 bug#18010: eww: desktop support Ivan Shmakov
2014-11-04 16:36 ` Ted Zlatanov
2014-11-10 21:24 ` Lars Magne Ingebrigtsen
2014-11-10 21:32   ` Glenn Morris
2014-11-10 21:36     ` Lars Magne Ingebrigtsen
2014-11-19 10:24       ` Ivan Shmakov
2014-11-19 17:23         ` Lars Magne Ingebrigtsen
2014-11-19 20:17           ` Ivan Shmakov
2014-11-23 15:10           ` Ivan Shmakov
2014-11-23 15:44             ` Lars Magne Ingebrigtsen
2014-11-30 11:04           ` bug#19226: eww.el desktop support fixes: autoload eww-mode, use inhibit-read-only Ivan Shmakov
2014-11-30 19:57             ` Glenn Morris
2014-11-30 20:15               ` Ivan Shmakov
2014-12-01  2:22                 ` Glenn Morris
2014-12-01  5:59                   ` Ivan Shmakov
2014-12-01 13:52                     ` Stefan Monnier
2014-12-07 18:56                       ` Ivan Shmakov
2014-12-08  2:54                         ` Stefan Monnier
2014-12-09 19:45                           ` Ivan Shmakov
2014-12-10  0:35                             ` Stefan Monnier
2015-02-14 20:50             ` Ivan Shmakov [this message]
2015-02-16 19:12               ` 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

  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=87pp9c9pzy.fsf@violet.siamics.net \
    --to=ivan@siamics.net \
    --cc=19226@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).