unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19105: eww-save-history: use a customizable limit (eww-history-limit)
@ 2014-11-19 11:45 Ivan Shmakov
  2014-11-19 17:28 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Shmakov @ 2014-11-19 11:45 UTC (permalink / raw)
  To: 19105

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

Package:  emacs
Severity: wishlist

	The limit on the number of eww-history entries enforced by
	eww-save-history is currently hard-coded.  Instead, it should be
	customizable, with an option not to enforce any limit at all.

	Please thus consider the patch MIMEd.

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

--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -65,6 +65,12 @@
   :group 'eww
   :type 'string)
 
+(defcustom eww-history-limit 50
+  "Maximum number of entries to retain in the history."
+  :version "25.1"
+  :group 'eww
+  :type '(choice (const :tag "Unlimited" nil)
+                 integer))
 (defcustom eww-use-external-browser-for-content-type
   "\\`\\(video/\\|audio/\\|application/ogg\\)"
   "Always use external browser for specified content-type."
@@ -1452,7 +1511,8 @@ Differences in #targets are ignored."
   (setq eww-data (list :title ""))
   ;; Don't let the history grow infinitely.  We store quite a lot of
   ;; data per page.
-  (when-let (tail (nthcdr 50 eww-history))
+  (when-let (tail (and eww-history-limit
+		       (nthcdr eww-history-limit eww-history)))
     (setcdr tail nil)))
 
 (defun eww-list-histories ()

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-19 19:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-19 11:45 bug#19105: eww-save-history: use a customizable limit (eww-history-limit) Ivan Shmakov
2014-11-19 17:28 ` Lars Magne Ingebrigtsen
2014-11-19 19:02   ` Ivan Shmakov
2014-11-19 19:09     ` Lars Magne Ingebrigtsen
2014-11-19 19:12       ` Lars Magne Ingebrigtsen
2014-11-19 19:10     ` Lars Magne Ingebrigtsen
2014-11-19 19:37       ` Ivan Shmakov

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).