Gnus development mailing list
 help / color / mirror / Atom feed
* nndrafts folder doesn't display the Drafts menu
@ 2009-01-05 11:58 Steinar Bang
  2009-01-05 12:36 ` Steinar Bang
  0 siblings, 1 reply; 11+ messages in thread
From: Steinar Bang @ 2009-01-05 11:58 UTC (permalink / raw)
  To: ding

Platform: Intel Core 2 Duo T9300, Windows Vista Enterprise,
	  GNU Emacs 22.3.1 (i386-mingw-nt6.0.6001) of 2008-09-06 on SOFT-MJASON,
	  CVS Gnus (updated December 27 2008)

When I enter the nndrafts:drafts folder I don't have the drafts commands
available, nor the the drafts menu.

The folder has the following in its group parameters
 ((gnus-dummy
   (gnus-draft-mode)))

I'll try deleting the folder, restart Gnus and see if the recreated
folder works.




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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-05 11:58 nndrafts folder doesn't display the Drafts menu Steinar Bang
@ 2009-01-05 12:36 ` Steinar Bang
  2009-01-05 19:23   ` Steinar Bang
  0 siblings, 1 reply; 11+ messages in thread
From: Steinar Bang @ 2009-01-05 12:36 UTC (permalink / raw)
  To: ding

>>>>> Steinar Bang <sb@dod.no>:

> I'll try deleting the folder, restart Gnus and see if the recreated
> folder works.

I killed the folder, exited gnus and restarted gnus.  The group
parameters of the recreated nndrafts:drafts folder looked identical, and
when entering the group, I did not have the drafts command available,
nor a Drafts menu.

I'll try updating from CVS.




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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-05 12:36 ` Steinar Bang
@ 2009-01-05 19:23   ` Steinar Bang
  2009-01-05 20:28     ` Dave Goldberg
  0 siblings, 1 reply; 11+ messages in thread
From: Steinar Bang @ 2009-01-05 19:23 UTC (permalink / raw)
  To: ding

>>>>> Steinar Bang <sb@dod.no>:

> I killed the folder, exited gnus and restarted gnus.  The group
> parameters of the recreated nndraft:drafts folder looked identical, and
> when entering the group, I did not have the drafts command available,
> nor a Drafts menu.

> I'll try updating from CVS.

Updated and rebuilt with
	make.bat "C:\Program Files\emacs-22.3\bin"

No difference.  nndraft:drafts still behaves as a normal folder.




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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-05 19:23   ` Steinar Bang
@ 2009-01-05 20:28     ` Dave Goldberg
  2009-01-05 20:51       ` Steinar Bang
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Goldberg @ 2009-01-05 20:28 UTC (permalink / raw)
  To: ding

This happened to me once a long time ago (very likely in Oort).  As I
recall it, I just deleted the drafts folder completely and ran
(gnus-start-draft-setup) by hand and somehow things got fixed.

-- 
Dave Goldberg
david.goldberg6@verizon.net



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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-05 20:28     ` Dave Goldberg
@ 2009-01-05 20:51       ` Steinar Bang
  2009-01-05 22:54         ` Dave Goldberg
  0 siblings, 1 reply; 11+ messages in thread
From: Steinar Bang @ 2009-01-05 20:51 UTC (permalink / raw)
  To: ding

>>>>> Dave Goldberg <david.goldberg6@verizon.net>:

> This happened to me once a long time ago (very likely in Oort).  As I
> recall it, I just deleted the drafts folder completely and ran
> (gnus-start-draft-setup) by hand and somehow things got fixed.

How completely did you delete it?  Did you remove the folder and file on
disk as well?

I did a `C-k' on the folder, saved the .newsrc.eld file, and then
evaluated (gnus-start-draft-setup) in the *scratch* buffer, and that
didn't fix things.

Thanx!


- Steinar




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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-05 20:51       ` Steinar Bang
@ 2009-01-05 22:54         ` Dave Goldberg
  2009-01-06  6:28           ` Katsumi Yamaoka
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Goldberg @ 2009-01-05 22:54 UTC (permalink / raw)
  To: ding

>>>>> On Mon, 05 Jan 2009 21:51:04 +0100, Steinar Bang <sb@dod.no> said:

>>>>> Dave Goldberg <david.goldberg6@verizon.net>:
>> This happened to me once a long time ago (very likely in Oort).  As I
>> recall it, I just deleted the drafts folder completely and ran
>> (gnus-start-draft-setup) by hand and somehow things got fixed.

> How completely did you delete it?  Did you remove the folder and file on
> disk as well?

> I did a `C-k' on the folder, saved the .newsrc.eld file, and then
> evaluated (gnus-start-draft-setup) in the *scratch* buffer, and that
> didn't fix things.

It's been a long time, but I'm pretty sure I did a G-DEL to get rid of
it and I think that removes it from disk as well.

-- 
Dave Goldberg
david.goldberg6@verizon.net



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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-05 22:54         ` Dave Goldberg
@ 2009-01-06  6:28           ` Katsumi Yamaoka
  2009-01-06  6:46             ` Katsumi Yamaoka
  2009-01-06  6:49             ` Steinar Bang
  0 siblings, 2 replies; 11+ messages in thread
From: Katsumi Yamaoka @ 2009-01-06  6:28 UTC (permalink / raw)
  To: David Engster; +Cc: Steinar Bang, ding

>>>>> Dave Goldberg <david.goldberg6@verizon.net>:
>>> This happened to me once a long time ago (very likely in Oort).  As I
>>> recall it, I just deleted the drafts folder completely and ran
>>> (gnus-start-draft-setup) by hand and somehow things got fixed.

>>>>> On Mon, 05 Jan 2009 21:51:04 +0100, Steinar Bang <sb@dod.no> said:
>> I did a `C-k' on the folder, saved the .newsrc.eld file, and then
>> evaluated (gnus-start-draft-setup) in the *scratch* buffer, and that
>> didn't fix things.

Ouch!  The culprits are me and David, sorry.  A workaround that
enables the minor mode `gnus-draft-mode' again is to put this form
in the ~/.gnus.el file:

(defvar gnus-dummy nil)

The symbol `gnus-dummy' is set in the draft group as a group
parameter as follows:

(gnus-dummy . ((gnus-draft-mode)))

It means setting the result of evaluating the `(gnus-draft-mode)'
form to the variable `gnus-dummy'.  In that case, what we want is
to evaluate the form, not the result.  However, now parameter's
operands got to not be evaluated if the parameters are not bound
variables because of the following change:

2008-12-24  David Engster  <dengste@eml.cc>

	* gnus-sum.el (gnus-summary-set-local-parameters): Don't bind
	parameters that haven't existed as variables as buffer-local variables.

See also the thread:
http://news.gmane.org/group/gmane.emacs.gnus.general/thread=67886

This also breaks similar usages of group parameters like the one
mentioned in the Gnus Info:

,---- (info "(gnus)Group Parameters")
| This can also be used as a group-specific hook function.  If you
| want to hear a beep when you enter a group, you could put
| something like `(dummy-variable (ding))' in the parameters of that
| group.  `dummy-variable' will be set to the (meaningless) result
| of the `(ding)' form.
`----

David, do you have an idea to fix this?



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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-06  6:28           ` Katsumi Yamaoka
@ 2009-01-06  6:46             ` Katsumi Yamaoka
  2009-01-06 12:56               ` David Engster
  2009-01-06  6:49             ` Steinar Bang
  1 sibling, 1 reply; 11+ messages in thread
From: Katsumi Yamaoka @ 2009-01-06  6:46 UTC (permalink / raw)
  To: David Engster; +Cc: Steinar Bang, ding

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

>>>>> Katsumi Yamaoka wrote:
> David, do you have an idea to fix this?

How about this one (evaluate parameter's operands but don't set
variables)?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1307 bytes --]

--- gnus-sum.el~	2008-12-25 02:41:43 +0000
+++ gnus-sum.el	2009-01-06 06:42:33 +0000
@@ -3831,18 +3831,18 @@
       (and (consp elem)			; Has to be a cons.
 	   (consp (cdr elem))		; The cdr has to be a list.
 	   (symbolp (car elem))		; Has to be a symbol in there.
-
-	   ;; Variables like `gnus-show-threads' that are globally bound,
-	   ;; if used as group parameters, need to get to be buffer-local,
-	   ;; whereas just parameters like `gcc-self', `timestamp', etc.
-	   ;; should not be bound as variables.
-	   (boundp (car elem))		; Has to be already bound
-
 	   (not (memq (car elem) vars))
-	   (ignore-errors		; So we set it.
+	   (ignore-errors
 	     (push (car elem) vars)
-	     (make-local-variable (car elem))
-	     (set (car elem) (eval (nth 1 elem))))))))
+	     ;; Variables like `gnus-show-threads' that are globally
+	     ;; bound, if used as group parameters, need to get to be
+	     ;; buffer-local, whereas just parameters like `gcc-self',
+	     ;; `timestamp', etc. should not be bound as variables.
+	     (if (boundp (car elem))
+		 (progn
+		   (make-local-variable (car elem))
+		   (set (car elem) (eval (nth 1 elem))))
+	       (eval (nth 1 elem))))))))
 
 (defun gnus-summary-read-group (group &optional show-all no-article
 				      kill-buffer no-display backward

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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-06  6:28           ` Katsumi Yamaoka
  2009-01-06  6:46             ` Katsumi Yamaoka
@ 2009-01-06  6:49             ` Steinar Bang
  1 sibling, 0 replies; 11+ messages in thread
From: Steinar Bang @ 2009-01-06  6:49 UTC (permalink / raw)
  To: ding

>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:
> Ouch!  The culprits are me and David, sorry.  A workaround that
> enables the minor mode `gnus-draft-mode' again is to put this form
> in the ~/.gnus.el file:

> (defvar gnus-dummy nil)

Ok.  Thanx!  I evaluated this in *scratch* and entered the
nndraft:drafts folder, and now the Drafts menu was present and `D e'
took me (and the article) to the *mail* buffer.

I'll put the workaround in ~/.gnus.el for now.

(saves me the debugging I had planned to do to see what actually
happens...:-) )




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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-06  6:46             ` Katsumi Yamaoka
@ 2009-01-06 12:56               ` David Engster
  2009-01-06 22:11                 ` Katsumi Yamaoka
  0 siblings, 1 reply; 11+ messages in thread
From: David Engster @ 2009-01-06 12:56 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: Steinar Bang, ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>>>>> Katsumi Yamaoka wrote:
>> David, do you have an idea to fix this?
>
> How about this one (evaluate parameter's operands but don't set
> variables)?
[...]
> +	     (if (boundp (car elem))
> +		 (progn
> +		   (make-local-variable (car elem))
> +		   (set (car elem) (eval (nth 1 elem))))
> +	       (eval (nth 1 elem))))))))

Looks good and works for me.

I didn't realize that one could use group parameters as group-specific
hooks...

Regards,
David





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

* Re: nndrafts folder doesn't display the Drafts menu
  2009-01-06 12:56               ` David Engster
@ 2009-01-06 22:11                 ` Katsumi Yamaoka
  0 siblings, 0 replies; 11+ messages in thread
From: Katsumi Yamaoka @ 2009-01-06 22:11 UTC (permalink / raw)
  To: ding

>>>>> David Engster wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> +	     (if (boundp (car elem))
>> +		 (progn
>> +		   (make-local-variable (car elem))
>> +		   (set (car elem) (eval (nth 1 elem))))
>> +	       (eval (nth 1 elem))))))))

> Looks good and works for me.

Installed.  I also added a note to (info "(gnus)Group Parameters").

> I didn't realize that one could use group parameters as group-specific
> hooks...

I overlooked it too.



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

end of thread, other threads:[~2009-01-06 22:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-05 11:58 nndrafts folder doesn't display the Drafts menu Steinar Bang
2009-01-05 12:36 ` Steinar Bang
2009-01-05 19:23   ` Steinar Bang
2009-01-05 20:28     ` Dave Goldberg
2009-01-05 20:51       ` Steinar Bang
2009-01-05 22:54         ` Dave Goldberg
2009-01-06  6:28           ` Katsumi Yamaoka
2009-01-06  6:46             ` Katsumi Yamaoka
2009-01-06 12:56               ` David Engster
2009-01-06 22:11                 ` Katsumi Yamaoka
2009-01-06  6:49             ` Steinar Bang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).