Gnus development mailing list
 help / color / mirror / Atom feed
* Malformed MIME quoted-printable message
@ 1996-11-17  3:05 Steven L Baur
  1996-11-17 10:59 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Steven L Baur @ 1996-11-17  3:05 UTC (permalink / raw)


I've started seeing these messages with regularity since upgrading to
Red Gnus v0.63/tm-7.94 this afternoon.

They're a message from Gnus, but why is Gnus decoding QP when that is
tm's job?
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.
"Bill Clinton is a bore.  He doesn't have a creative bone in his
body."  -- David Brinkley


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

* Re: Malformed MIME quoted-printable message
  1996-11-17  3:05 Malformed MIME quoted-printable message Steven L Baur
@ 1996-11-17 10:59 ` Lars Magne Ingebrigtsen
  1996-11-17 19:44   ` Steven L Baur
                     ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-11-17 10:59 UTC (permalink / raw)


Steven L Baur <steve@miranova.com> writes:

> I've started seeing these messages with regularity since upgrading to
> Red Gnus v0.63/tm-7.94 this afternoon.
> 
> They're a message from Gnus, but why is Gnus decoding QP when that is
> tm's job?

I've included `gnus-article-de-quoted-unreadable' in
`gnus-article-display-hook' by default.  If you're using tm, you
should probably take that function out of the hook.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


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

* Re: Malformed MIME quoted-printable message
  1996-11-17 10:59 ` Lars Magne Ingebrigtsen
@ 1996-11-17 19:44   ` Steven L Baur
  1996-11-17 20:04     ` Lars Magne Ingebrigtsen
  1996-11-17 20:16     ` Per Abrahamsen
  1996-11-17 19:48   ` Hrvoje Niksic
  1996-11-18  7:16   ` 守岡 知彦 / MORIOKA Tomohiko
  2 siblings, 2 replies; 13+ messages in thread
From: Steven L Baur @ 1996-11-17 19:44 UTC (permalink / raw)


>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:

Lars> Steven L Baur <steve@miranova.com> writes:

sb> ... why is Gnus decoding QP when that is tm's job?

Lars> I've included `gnus-article-de-quoted-unreadable' in
Lars> `gnus-article-display-hook' by default.  If you're using tm, you
Lars> should probably take that function out of the hook.

I see.  QP sucks so badly that it's not an unreasonable default
either.

Let's see.  `gnus-article-display-hook' is defcustomed, so it probably
shouldn't be autoloaded.  Since defcustom erases previous hooks with a
setq if customized[1], mime-setup.el can't do anything reasonable
since it typically loads before gnus is activated (which activates
custom).  gnus-setup.el can't do anything reasonable since if it's
used, it loads first as well.

Maybe it's time to revisit Barry Warsaw's Emacs mail and news client
hook standards.

[1]
I would consider this a bug.  Initialized hook variables should
*never* be erased by a setq.
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.
"Bill Clinton is a bore.  He doesn't have a creative bone in his
body."  -- David Brinkley


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

* Re: Malformed MIME quoted-printable message
  1996-11-17 10:59 ` Lars Magne Ingebrigtsen
  1996-11-17 19:44   ` Steven L Baur
@ 1996-11-17 19:48   ` Hrvoje Niksic
  1996-11-18  7:20     ` Steinar Bang
  1996-11-18  7:16   ` 守岡 知彦 / MORIOKA Tomohiko
  2 siblings, 1 reply; 13+ messages in thread
From: Hrvoje Niksic @ 1996-11-17 19:48 UTC (permalink / raw)
  Cc: ding

Lars Magne Ingebrigtsen (larsi@ifi.uio.no) wrote:
> I've included `gnus-article-de-quoted-unreadable' in
> `gnus-article-display-hook' by default.  If you're using tm, you
> should probably take that function out of the hook.

Or tm should do it by itself.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
`VI' - An editor used by those heretics that don't subscribe to
       the Emacs religion.


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

* Re: Malformed MIME quoted-printable message
  1996-11-17 19:44   ` Steven L Baur
@ 1996-11-17 20:04     ` Lars Magne Ingebrigtsen
  1996-11-17 20:16     ` Per Abrahamsen
  1 sibling, 0 replies; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-11-17 20:04 UTC (permalink / raw)


Steven L Baur <steve@miranova.com> writes:

> Let's see.  `gnus-article-display-hook' is defcustomed, so it probably
> shouldn't be autoloaded.  Since defcustom erases previous hooks with a
> setq if customized[1], mime-setup.el can't do anything reasonable
> since it typically loads before gnus is activated (which activates
> custom).

Uhm...  Doesn't defcustom behave like defvar, more or less?  If the
hook is set to something, defcustom doesn't change that?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


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

* Re: Malformed MIME quoted-printable message
  1996-11-17 19:44   ` Steven L Baur
  1996-11-17 20:04     ` Lars Magne Ingebrigtsen
@ 1996-11-17 20:16     ` Per Abrahamsen
  1996-11-17 21:33       ` Steven L Baur
  1 sibling, 1 reply; 13+ messages in thread
From: Per Abrahamsen @ 1996-11-17 20:16 UTC (permalink / raw)


Steven L Baur <steve@miranova.com> writes:

> Since defcustom erases previous hooks with a setq [ ... ]

No it does not.  The code in question for defcustom is

  (unless (default-boundp symbol)
    (set-default symbol (if (get symbol 'saved-value)
			    (eval (car (get symbol 'saved-value)))
			  (eval value))))

The problem is the opposite, a call to add-hook prior to the _defcustom_
will prevent either the factory or saved value from taking effect.
Initializing a hook with _defvar_ has the same problem.  

The alternative, to call _add-hook_ instead of initializing, has the
problem that it becomes more difficult for the user to remove
functions from the hook. 

The only solution I can think of requires changing _remove-hook_ for
uninitialized variables, so it records that the member should not be
added at initialization.


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

* Re: Malformed MIME quoted-printable message
  1996-11-17 20:16     ` Per Abrahamsen
@ 1996-11-17 21:33       ` Steven L Baur
  1996-11-19  9:37         ` Wesley.Hardaker
  0 siblings, 1 reply; 13+ messages in thread
From: Steven L Baur @ 1996-11-17 21:33 UTC (permalink / raw)


>>>>> "Per" == Per Abrahamsen <abraham@dina.kvl.dk> writes:

Per> Steven L Baur <steve@miranova.com> writes:
sb> Since defcustom erases previous hooks with a setq [ ... ]

(I mistaken qualified this with `when customized')

Per> No it does not.  The code in question for defcustom is

Per>   (unless (default-boundp symbol)
Per>     (set-default symbol (if (get symbol 'saved-value)
Per> 			    (eval (car (get symbol 'saved-value)))
Per> 			  (eval value))))

Per> The problem is the opposite, a call to add-hook prior to the
Per> _defcustom_ will prevent either the factory or saved value from
                                                    ^^^^^ ^^^^^
Per> taking effect.

O.K.  That was the part I missed.  It's still a problem, it's just a
different problem.

Per> Initializing a hook with _defvar_ has the same problem.  

Agreed.

Per> The alternative, to call _add-hook_ instead of initializing, has
Per> the problem that it becomes more difficult for the user to remove
Per> functions from the hook.

True.  It is also not always a benefit doing this staticly.  What if I
wanted to run tm with Gnus with XEmacs, but wanted to run Gnus-only
when running GNU Emacs.

Per> The only solution I can think of requires changing _remove-hook_
Per> for uninitialized variables, so it records that the member should
Per> not be added at initialization.

I suppose you could add a property list of symbols that add-hook won't
add in the future?

Another thing that might make sense is to treat hook variables
specially.  This is already somewhat of a botch in emacs, since defvar
and worse defconst *are* unkind to hooks.  

Would syntax like

(defhook some-random-hook
	 :add 'hook-func-1
	 :add 'hook-func-2
	 :remove 'hook-func-3
  "`some-random-hook' initialization for package X.")

be good, or be braindamaged?
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.
"Bill Clinton is a bore.  He doesn't have a creative bone in his
body."  -- David Brinkley


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

* Re: Malformed MIME quoted-printable message
  1996-11-17 10:59 ` Lars Magne Ingebrigtsen
  1996-11-17 19:44   ` Steven L Baur
  1996-11-17 19:48   ` Hrvoje Niksic
@ 1996-11-18  7:16   ` 守岡 知彦 / MORIOKA Tomohiko
  1996-11-18 17:48     ` Lars Magne Ingebrigtsen
  2 siblings, 1 reply; 13+ messages in thread
From: 守岡 知彦 / MORIOKA Tomohiko @ 1996-11-18  7:16 UTC (permalink / raw)


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

>>>>> In <m2k9rlasy2.fsf@proletcult.ifi.uio.no> 
>>>>>	Lars Magne Ingebrigtsen <larsi@ifi.uio.no> wrote:

Lars> Steven L Baur <steve@miranova.com> writes:

Lars> > I've started seeing these messages with regularity since
Lars> > upgrading to Red Gnus v0.63/tm-7.94 this afternoon.

Lars> > They're a message from Gnus, but why is Gnus decoding QP when
Lars> > that is tm's job?

Lars> I've included `gnus-article-de-quoted-unreadable' in
Lars> `gnus-article-display-hook' by default.  If you're using tm, you
Lars> should probably take that function out of the hook.

  I think `gnus-show-mime-method' is better for the pseudo MIME
feature.

  In addition, why isn't `gnus-decode-rfc1522' set to
`gnus-decode-encoded-word-method'?  This hook is for RFC 1522
encoded-word.

  Regards,
-- 
----------------------------------------------------------------------
Morioka Tomohiko <morioka@jaist.ac.jp>
(`Morioka' is my family name, `Tomohiko' is my personal name.)
--- I protest Chinese nuclear testing --------------------------------
----------------- and virtual testing of United States and France. ---
# PGP public key: http://www-ks.jaist.ac.jp/~morioka/tomohiko/pgp.key

[-- Attachment #2: Type: application/pgp-signature, Size: 346 bytes --]

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

* Re: Malformed MIME quoted-printable message
  1996-11-17 19:48   ` Hrvoje Niksic
@ 1996-11-18  7:20     ` Steinar Bang
  1996-11-18 17:02       ` 守岡 知彦 / MORIOKA Tomohiko
  0 siblings, 1 reply; 13+ messages in thread
From: Steinar Bang @ 1996-11-18  7:20 UTC (permalink / raw)


>>>>> Hrvoje Niksic <hniksic@srce.hr>:

> Lars Magne Ingebrigtsen (larsi@ifi.uio.no) wrote:
>> I've included `gnus-article-de-quoted-unreadable' in
>> `gnus-article-display-hook' by default.  If you're using tm, you
>> should probably take that function out of the hook.

> Or tm should do it by itself.

Sounds like a better idea.  Who makes a patch to the latest tm, and
send it to <URL:mailto:bug-tm-en@chamonix.jaist.ac.jp>?


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

* Re: Malformed MIME quoted-printable message
  1996-11-18  7:20     ` Steinar Bang
@ 1996-11-18 17:02       ` 守岡 知彦 / MORIOKA Tomohiko
  0 siblings, 0 replies; 13+ messages in thread
From: 守岡 知彦 / MORIOKA Tomohiko @ 1996-11-18 17:02 UTC (permalink / raw)


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

>>>>> In <whpw1blvhk.fsf@norne.metis.no> 
>>>>>	Steinar Bang <sb@metis.no> wrote:

Steinar> >>>>> Hrvoje Niksic <hniksic@srce.hr>:

Steinar> > Lars Magne Ingebrigtsen (larsi@ifi.uio.no) wrote:
Steinar> >> I've included `gnus-article-de-quoted-unreadable' in
Steinar> >> `gnus-article-display-hook' by default.  If you're using
Steinar> >> tm, you should probably take that function out of the
Steinar> >> hook.

Steinar> > Or tm should do it by itself.

Steinar> Sounds like a better idea.  Who makes a patch to the latest
Steinar> tm, and send it to
Steinar> <URL:mailto:bug-tm-en@chamonix.jaist.ac.jp>?

  I don't want to modify gnus-mime for this case.

  I think `gnus-article-display-hook' is not suitable for
`gnus-article-de-quoted-unreadable'.

  Such pseudo MIME feature is used when real MIME feature is not
available or don't want to do MIME processing.  So I propose new
method called when `gnus-show-mime' is nil.

  Current MIME processing code of `gnus-article-prepare' is following:

		;; Decode MIME message.
		(when gnus-show-mime
		  (if (or (not gnus-strict-mime)
			  (gnus-fetch-field "Mime-Version"))
		      (funcall gnus-show-mime-method)
		    (funcall gnus-decode-encoded-word-method)))
		;; Perform the article display hooks.
		(run-hooks 'gnus-article-display-hook))

I propose to modify to following:

		;; Decode MIME message.
		(if gnus-show-mime
		    (if (or (not gnus-strict-mime)
			    (gnus-fetch-field "Mime-Version"))
			(funcall gnus-show-mime-method)
		      (funcall gnus-decode-encoded-word-method))
		  (funcall gnus-show-traditional-method)
		  )
		;; Perform the article display hooks.
		(run-hooks 'gnus-article-display-hook))

And set `gnus-article-de-quoted-unreadable' to
`gnus-show-traditional-method'.

  Thanks,
-- 
----------------------------------------------------------------------
Morioka Tomohiko <morioka@jaist.ac.jp>
(`Morioka' is my family name, `Tomohiko' is my personal name.)
--- I protest Chinese nuclear testing --------------------------------
----------------- and virtual testing of United States and France. ---
# PGP public key: http://www-ks.jaist.ac.jp/~morioka/tomohiko/pgp.key

[-- Attachment #2: Type: application/pgp-signature, Size: 346 bytes --]

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

* Re: Malformed MIME quoted-printable message
  1996-11-18  7:16   ` 守岡 知彦 / MORIOKA Tomohiko
@ 1996-11-18 17:48     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-11-18 17:48 UTC (permalink / raw)


morioka@jaist.ac.jp (=?ISO-2022-JP?B?GyRCPGkyLBsoQiAbJEJDTkknGyhC?= / MORIOKA Tomohiko) writes:

>   I think `gnus-show-mime-method' is better for the pseudo MIME
> feature.
> 
>   In addition, why isn't `gnus-decode-rfc1522' set to
> `gnus-decode-encoded-word-method'?  This hook is for RFC 1522
> encoded-word.

Good idea.  I'll have Gnus 0.64 do that instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


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

* Re: Malformed MIME quoted-printable message
  1996-11-17 21:33       ` Steven L Baur
@ 1996-11-19  9:37         ` Wesley.Hardaker
  1996-11-19 15:45           ` Per Abrahamsen
  0 siblings, 1 reply; 13+ messages in thread
From: Wesley.Hardaker @ 1996-11-19  9:37 UTC (permalink / raw)


Steven L Baur <steve@miranova.com> writes:

> Would syntax like
> 
> (defhook some-random-hook
> 	 :add 'hook-func-1
> 	 :add 'hook-func-2
> 	 :remove 'hook-func-3
>   "`some-random-hook' initialization for package X.")
> 
> be good, or be braindamaged?

I actually like this.  My reasoning is that as is, if new hooks get
added to the factor setting (ie, Lars implements a new function and
adds it to the list of functions on a hook), a user that has
customized that hook will not get the new feature function
automatically added, whereas with only using add/remove-hook he would.
I was actually going to suggest (and then laugh at the changing API
causing people problems) that customize should store a list of
add/remove calls instead of a list of functions...

However, the above suggestion would probably solve that problem.  I've
also had similar problems with things like face lists.  For instance:
I've wanted to adopt the gnus default for fontifying the summary
buffer, but add one face to the list, namely, putting the line in blue
if the score was greater than say 200...  However, doing this by
modifying the default was difficult (I actually did it sometime in
sgnus, but under rgnus it broke so I'm no longer modifying the default
regexp list and saving my own again).

Um... I just had a cup of potent coffee and have not really studied the
customize stuff all that much...  Therefore, all the above is either
quite possibly unintelligible (and unspellingchecked) as well as quite
possibly incorrect in assumptions and furthermore full of endless
run-ons...

Sorry,
Wes


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

* Re: Malformed MIME quoted-printable message
  1996-11-19  9:37         ` Wesley.Hardaker
@ 1996-11-19 15:45           ` Per Abrahamsen
  0 siblings, 0 replies; 13+ messages in thread
From: Per Abrahamsen @ 1996-11-19 15:45 UTC (permalink / raw)



Wesley.Hardaker@sphys.unil.ch writes:

> I was actually going to suggest (and then laugh at the changing API
> causing people problems) that customize should store a list of
> add/remove calls instead of a list of functions...

Yes, I want to do something like this, but a bit more general.  For
example, you would probably doesn't want customize `auto-mode-alist'
using the current method, i.e. saving a copy of the list.  

Something similar is true for customizing keymaps.  I'd like to come
up with a way to specify modifications to complex structures, instead
of just saving the entire structure.  It is not simple to come up with
a good API though, and the UI problems are even worse.  Suggestions
are welcome. 

I don't think it will cause any compatibility problems though.


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

end of thread, other threads:[~1996-11-19 15:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-17  3:05 Malformed MIME quoted-printable message Steven L Baur
1996-11-17 10:59 ` Lars Magne Ingebrigtsen
1996-11-17 19:44   ` Steven L Baur
1996-11-17 20:04     ` Lars Magne Ingebrigtsen
1996-11-17 20:16     ` Per Abrahamsen
1996-11-17 21:33       ` Steven L Baur
1996-11-19  9:37         ` Wesley.Hardaker
1996-11-19 15:45           ` Per Abrahamsen
1996-11-17 19:48   ` Hrvoje Niksic
1996-11-18  7:20     ` Steinar Bang
1996-11-18 17:02       ` 守岡 知彦 / MORIOKA Tomohiko
1996-11-18  7:16   ` 守岡 知彦 / MORIOKA Tomohiko
1996-11-18 17:48     ` Lars Magne Ingebrigtsen

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).