all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [seltenreich@gmx.de: url-cookie.el generating excess backup files]
@ 2006-07-08 15:32 Richard Stallman
  2006-07-11 15:11 ` Fwd: url-cookie.el generating excess backup files Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Stallman @ 2006-07-08 15:32 UTC (permalink / raw)


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

------- Start of forwarded message -------
From: Andreas Seltenreich <seltenreich@gmx.de>
To: emacs-pretest-bug@gnu.org
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  <uwi7@rz.uni-karlsruhe.de>

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

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

* Re: Fwd: url-cookie.el generating excess backup files
  2006-07-08 15:32 [seltenreich@gmx.de: url-cookie.el generating excess backup files] Richard Stallman
@ 2006-07-11 15:11 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2006-07-11 15:11 UTC (permalink / raw)
  Cc: emacs-devel

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

I've installed a slight modification of it.
Thank you Andreas.  BTW, I believe you do not have signed papers and this is
your second (small) patch.  I think you should consider signing the legal
paperwork so we don't get into trouble next time you submit a patch.


        Stefan


> ------- Start of forwarded message -------
> From: Andreas Seltenreich <seltenreich@gmx.de>
> To: emacs-pretest-bug@gnu.org
> 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  <uwi7@rz.uni-karlsruhe.de>

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


> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

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

end of thread, other threads:[~2006-07-11 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-08 15:32 [seltenreich@gmx.de: url-cookie.el generating excess backup files] Richard Stallman
2006-07-11 15:11 ` Fwd: url-cookie.el generating excess backup files Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.