all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* One more use for gnus-expert-user
@ 2010-05-29  6:40 Teemu Likonen
  2010-06-05  2:28 ` Ted Zlatanov
  0 siblings, 1 reply; 3+ messages in thread
From: Teemu Likonen @ 2010-05-29  6:40 UTC (permalink / raw)
  To: ding, emacs-devel

I'd like to suggest one more case where gnus-expert-user variable is
respected.

Details: Function gnus-agent-expire expires old articles from Gnus
agent's cache. When it founds directories (under ~/News/agent/) which
are no longer needed gnus-agent-expire (well, actually its helper
function) uses gnus-y-or-n-p function to ask whether the directory
should be deleted. User may want to unconditionally delete such
directories when she runs gnus-agent-expire automatically from some hook
(like gnus-exit-gnus-hook). The problem is that currently there is no
simple way to prevent the y-or-n question.

Currently I'm using a work-around with around-advice for gnus-y-or-n-p.
My advice, when activated, doesn't call the original gnus-y-or-n-p
function at all. It just unconditionally returns non-nil. I think that
this would be a good place to respect gnus-expert-user variable, though.

Here's a patch that implements my suggestion:

--8<---------------cut here---------------start------------->8---
diff --git i/lisp/gnus/gnus-agent.el w/lisp/gnus/gnus-agent.el
index f385c71..67af39b 100644
--- i/lisp/gnus/gnus-agent.el
+++ w/lisp/gnus/gnus-agent.el
@@ -3631,7 +3631,8 @@ articles in every agentized group? "))
  deleting them?")))
           (while to-remove
             (let ((dir (pop to-remove)))
-              (if (gnus-y-or-n-p (format "Delete %s? " dir))
+              (if (or gnus-expert-user
+		      (gnus-y-or-n-p (format "Delete %s? " dir)))
                   (let* (delete-recursive
 			 files f
                          (delete-recursive
--8<---------------cut here---------------end--------------->8---



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

end of thread, other threads:[~2010-06-05  4:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-29  6:40 One more use for gnus-expert-user Teemu Likonen
2010-06-05  2:28 ` Ted Zlatanov
2010-06-05  4:30   ` Teemu Likonen

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.