From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/69699 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: One more use for gnus-expert-user Date: Sat, 29 May 2010 09:40:53 +0300 Message-ID: <87wrunmcqy.fsf@mithlond.arda> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1275115361 23247 80.91.229.12 (29 May 2010 06:42:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 May 2010 06:42:41 +0000 (UTC) To: ding@gnus.org, emacs-devel@gnu.org Original-X-From: ding-owner+M18090@lists.math.uh.edu Sat May 29 08:42:40 2010 connect(): No such file or directory Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OIFkk-0005RR-94 for ding-account@gmane.org; Sat, 29 May 2010 08:42:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1OIFjT-0002mK-Mv; Sat, 29 May 2010 01:41:19 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1OIFjI-0002lu-MD for ding@lists.math.uh.edu; Sat, 29 May 2010 01:41:09 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1OIFjG-0001pJ-KR for ding@lists.math.uh.edu; Sat, 29 May 2010 01:41:07 -0500 Original-Received: from mta-out.inet.fi ([195.156.147.13] helo=jenni1.inet.fi) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1OIFjE-0002An-00 for ; Sat, 29 May 2010 08:41:04 +0200 Original-Received: from mithlond.arda (84.251.132.215) by jenni1.inet.fi (8.5.014) id 4B17DDDA06AEA53B; Sat, 29 May 2010 09:41:03 +0300 Original-Received: from dtw by mithlond.arda with local (Exim 4.69) (envelope-from ) id 1OIFj8-0001an-7f; Sat, 29 May 2010 09:40:58 +0300 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux) X-Spam-Score: -0.5 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:69699 gmane.emacs.devel:125334 Archived-At: 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---