emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: url-cookie.el generating excess backup files]


From: Richard Stallman
Subject: address@hidden: url-cookie.el generating excess backup files]
Date: Sat, 08 Jul 2006 11:32:01 -0400

Would someone who understands URL please figure out if this is
correct, and DTRT, then ack?

------- Start of forwarded message -------
From: Andreas Seltenreich <address@hidden>
To: address@hidden
Date: Fri, 07 Jul 2006 23:51:58 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: url-cookie.el generating excess backup files
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
        version=3.0.4

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  <address@hidden>

        * 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
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]