From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Magnus Henoch Newsgroups: gmane.emacs.bugs Subject: bug#8055: Patch for handling Maildir flags in nnmaildir Date: Wed, 05 Sep 2012 19:12:38 +0100 Message-ID: References: <8762skm50w.fsf@gismo.pca.it> <87392weiek.fsf@gnus.org> <87wr08d3o7.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1346882647 4097 80.91.229.3 (5 Sep 2012 22:04:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2012 22:04:07 +0000 (UTC) Cc: 8055@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 06 00:04:05 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9Nhb-000781-JM for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2012 00:04:03 +0200 Original-Received: from localhost ([::1]:33598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9NhY-0004P8-Jt for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Sep 2012 18:04:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9NhV-0004Ob-Ug for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2012 18:03:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9NhS-0006af-6Y for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2012 18:03:57 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9NhS-0006aa-39 for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2012 18:03:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T9Nha-0006zd-2I; Wed, 05 Sep 2012 18:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Magnus Henoch Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 05 Sep 2012 22:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8055 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: fixed patch Original-Received: via spool by 8055-submit@debbugs.gnu.org id=B8055.134688263426868 (code B ref 8055); Wed, 05 Sep 2012 22:04:02 +0000 Original-Received: (at 8055) by debbugs.gnu.org; 5 Sep 2012 22:03:54 +0000 Original-Received: from localhost ([127.0.0.1]:41436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9NhR-0006zH-8j for submit@debbugs.gnu.org; Wed, 05 Sep 2012 18:03:54 -0400 Original-Received: from mail-wi0-f180.google.com ([209.85.212.180]:53363) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9NhL-0006z7-Om for 8055@debbugs.gnu.org; Wed, 05 Sep 2012 18:03:52 -0400 Original-Received: by wibhm6 with SMTP id hm6so618499wib.15 for <8055@debbugs.gnu.org>; Wed, 05 Sep 2012 15:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=94XiaBuFwjESwQ3Q9xMzf6PfmIp4EH6cKDhq1lA8kRM=; b=yqZF6EtLZ2jO0xWj1zUWqun7WGqgh19jxiZoQ8H9Nbvp/1FiZCkCw4C7RwGkmWhpAe jnq6TFeXAXf7z8wiKsufda2SrxmQcJXB9VvRQco7W7kBpenmHRMCYMdAtkwujQzqBx/B IaIWSF+ngnIM2SqSOLe1+iplgBHZOdrSNG7Tqfa0Me0bCj2QYOdyVGtG/9oY7+d1Mrkk 0pdsk+cFBxKWOdWx3DKa1rla8EpQg2KPDCiF0NSfSWFx2WbFeJsRNfvMBBlOjrhZENfv 5GFXPLfr4Q+wsUTORmO2Eopz88KA8iu3OXEpItm0QTXKBB/jGD++30JsSVN+5rEnOh6K qcKA== Original-Received: by 10.216.30.83 with SMTP id j61mr6471311wea.168.1346882618428; Wed, 05 Sep 2012 15:03:38 -0700 (PDT) Original-Received: from poki-sona.local (94-194-213-6.zone8.bethere.co.uk. [94.194.213.6]) by mx.google.com with ESMTPS id dw6sm820056wib.5.2012.09.05.15.03.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 15:03:37 -0700 (PDT) In-Reply-To: <87wr08d3o7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 05 Sep 2012 15:01:28 +0200") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (darwin) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63811 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Lars Ingebrigtsen writes: > >> Thanks; I've now applied this patch to Ma Gnus. > > Compilation gives this error, though: > > nnmaildir.el:130:1:Error: (nnmaildir--art-suffix article) is not a valid place expression Right, nnmaildir--article-set-flags needs to be defined below the nnmaildir--art defstruct. (Spending too much time inside emacs recompiling things incrementally can be a bad thing...) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=nnmaildir-fix.patch diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index caf2820..c5df510 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -127,16 +127,6 @@ SUFFIX should start with \":2,\"." (new-flags (concat (delq flag flags-as-list)))) (concat ":2," new-flags))) -(defun nnmaildir--article-set-flags (article new-suffix curdir) - (let* ((prefix (nnmaildir--art-prefix article)) - (suffix (nnmaildir--art-suffix article)) - (article-file (concat curdir prefix suffix)) - (new-name (concat curdir prefix new-suffix))) - (unless (file-exists-p article-file) - (error "Couldn't find article file %s" article-file)) - (rename-file article-file new-name 'replace) - (setf (nnmaildir--art-suffix article) new-suffix))) - (defvar nnmaildir-article-file-name nil "*The filename of the most recently requested article. This variable is set by nnmaildir-request-article.") @@ -212,6 +202,16 @@ by nnmaildir-request-article.") (gnm nil) ;; flag: split from mail-sources? (target-prefix nil :type string)) ;; symlink target prefix +(defun nnmaildir--article-set-flags (article new-suffix curdir) + (let* ((prefix (nnmaildir--art-prefix article)) + (suffix (nnmaildir--art-suffix article)) + (article-file (concat curdir prefix suffix)) + (new-name (concat curdir prefix new-suffix))) + (unless (file-exists-p article-file) + (error "Couldn't find article file %s" article-file)) + (rename-file article-file new-name 'replace) + (setf (nnmaildir--art-suffix article) new-suffix))) + (defun nnmaildir--expired-article (group article) (setf (nnmaildir--art-nov article) nil) (let ((flist (nnmaildir--grp-flist group)) --=-=-=--