IMHO url-cookie.el shouldn't create any backup files when it is
periodically saving its cookies to disk. If enough backup versions
accumulate, it triggers the prompt for deleting excess backup files in
backup-buffer every url-cookie-save-interval seconds, which is quite
annoying.
Additionally, it is setting url-cookies-changed-since-last-save on the
first request, but not resetting the variable anywhere. I don't think
this is intentional.
In the suggested patch, I also switched the custom group of
url-cookie-save-interval, as it looks weird as a lone url-cookie
option in the parent group.
Thanks,
andreas
2006-07-04 Andreas Seltenreich <[EMAIL PROTECTED]>
* url-cookie.el (url-cookie-write-file): Avoid backup files, reset
url-cookies-changed-since-last-save.
(url-cookie-save-interval): Move to url-cookie custom group.
Index: lisp/url/url-cookie.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-cookie.el,v
retrieving revision 1.17
diff -c -p -r1.17 url-cookie.el
*** lisp/url/url-cookie.el 5 Jan 2006 22:10:47 -0000 1.17
--- lisp/url/url-cookie.el 7 Jul 2006 21:05:06 -0000
*************** telling Microsoft that."
*** 168,175 ****
(insert ")\n(setq url-cookie-secure-storage\n '")
(pp url-cookie-secure-storage (current-buffer))
(insert ")\n")
! (write-file fname)
! (kill-buffer (current-buffer))))))
(defun url-cookie-store (name value &optional expires domain localpart secure)
"Store a netscape-style cookie."
--- 168,177 ----
(insert ")\n(setq url-cookie-secure-storage\n '")
(pp url-cookie-secure-storage (current-buffer))
(insert ")\n")
! (let ((backup-inhibited t))
! (write-file fname))
! (kill-buffer (current-buffer))
! (setq url-cookies-changed-since-last-save nil)))))
(defun url-cookie-store (name value &optional expires domain localpart secure)
"Store a netscape-style cookie."
*************** to run the `url-cookie-setup-save-timer'
*** 453,459 ****
(if (bound-and-true-p url-setup-done)
(url-cookie-setup-save-timer)))
:type 'integer
! :group 'url)
(defun url-cookie-setup-save-timer ()
"Reset the cookie saver timer."
--- 455,461 ----
(if (bound-and-true-p url-setup-done)
(url-cookie-setup-save-timer)))
:type 'integer
! :group 'url-cookie)
(defun url-cookie-setup-save-timer ()
"Reset the cookie saver timer."
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug