unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Shmakov <ivan@siamics.net>
To: 19105@debbugs.gnu.org
Subject: bug#19105: eww-save-history: use a customizable limit (eww-history-limit)
Date: Wed, 19 Nov 2014 11:45:37 +0000	[thread overview]
Message-ID: <87vbmb5s7y.fsf@violet.siamics.net> (raw)

[-- 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 ()

             reply	other threads:[~2014-11-19 11:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 11:45 Ivan Shmakov [this message]
2014-11-19 17:28 ` bug#19105: eww-save-history: use a customizable limit (eww-history-limit) 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

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