From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/75544 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.gnus.general Subject: Multiple uploads with sieve-manage-mode (unexpected behavior) Date: Sun, 02 Jan 2011 22:22:23 -0500 Message-ID: <87fwtau0wg.fsf@maru.md5i.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294025006 6645 80.91.229.12 (3 Jan 2011 03:23:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 03:23:26 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23895@lists.math.uh.edu Mon Jan 03 04:23:22 2011 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 1PZb0z-0000KV-H8 for ding-account@gmane.org; Mon, 03 Jan 2011 04:23:21 +0100 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 1PZb0F-00010a-Oa; Sun, 02 Jan 2011 21:22:35 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PZb0E-00010O-83 for ding@lists.math.uh.edu; Sun, 02 Jan 2011 21:22:34 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PZb0C-0001SC-Bs for ding@lists.math.uh.edu; Sun, 02 Jan 2011 21:22:33 -0600 Original-Received: from md5i.com ([75.151.244.229] helo=maru.md5i.com) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PZb0B-0000Ym-8B for ding@gnus.org; Mon, 03 Jan 2011 04:22:31 +0100 Original-Received: from md5i by maru.md5i.com with local (Exim 4.72) (envelope-from ) id 1PZb03-0005XX-Oi for ding@gnus.org; Sun, 02 Jan 2011 22:22:23 -0500 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:75544 Archived-At: I have run into the following small niggling problem with sieve-manage-mode. If you select the active sieve script, edit it, and then upload it (with `C-c C-c'), everything works as expected. But let's say that we find we find a bug in our updated script. So, we go back to the sieve-manage buffer, and select the script again, edit the result, and then upload the fixed script with `C-c C-c' again. If you do this, you will find that the uploaded script will not be the active sieve script. Why? Actually, it took me longer than it should have to figure out what was happening here. Let's say, for sake of argument, that the name of the active sieve script is "sieve.siv". After the first upload, the "sieve.siv" buffer is buried. When you select the active script in the sieve manager again, the sieve-edit-script function uses generate-new-buffer to create the buffer name. In this case, since the original "sieve.siv" buffer was buried, it will create a new buffer called "sieve.siv<2>". When this gets uploaded (with `C-c C-c'), it gets added as a new script called "sieve.siv<2>", which is not active by default (because there is already an active script). Expected behavior would have been to replace the existing active "sieve.siv" script. Now, I am not certain what the appropriate remedy should be. One would be to re-use the original buffer with the same name (perhaps asking whether that is appropriate beforehand). Another would be to save the sieve script name in a buffer-local variable, and only use the buffer name if this variable is nil. No matter what solution is chosen, though, something should be modified, as the current behavior is unexpected, and it is not necessarily immediate obvious what is happening incorrectly. -- Michael Welsh Duggan (md5i@md5i.com)