Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-shr-put-image: Wrong number of arguments
@ 2013-07-16 19:22 Peter Münster
  2013-07-16 23:36 ` Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Münster @ 2013-07-16 19:22 UTC (permalink / raw)
  To: ding

Hi,

I got a message, that could not be displayed. Instead, I got this
message:

gnus-shr-put-image: Wrong number of arguments: #[(data alt) " ƒ9ÃÄŏ‰ƒ6iÆVƒ!Ç\bÈ\"@ÉVƒ!ÊcˆË\b	†(Ì\"ˆÍ\b!ƒ6Î\bÃÏ#ˆ\b)‡	c‡" [image alt display-graphic-p nil (shr-rescale-image data) ((error)) 0 image-size t 400 ...] 5 ("/usr/share/emacs/24.2/lisp/gnus/shr.elc" . 13300)], 3

Here the message: http://pmrb.free.fr/tmp/shr-problem.txt

-- 
           Peter




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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-16 19:22 gnus-shr-put-image: Wrong number of arguments Peter Münster
@ 2013-07-16 23:36 ` Katsumi Yamaoka
  2013-07-17  2:42   ` Dave Goldberg
  2013-07-18 10:01   ` Peter Münster
  0 siblings, 2 replies; 14+ messages in thread
From: Katsumi Yamaoka @ 2013-07-16 23:36 UTC (permalink / raw)
  To: ding

Peter Münster wrote:
> User-Agent: Gnus/612.570008 (真 Gnus v0.8) Emacs/24.2 (gnu/linux)
                   ^^^^^^^^^^
There might be something bad in your Gnus installation. ;)

> I got a message, that could not be displayed. Instead, I got this
> message:

> gnus-shr-put-image: Wrong number of arguments: #[(data alt)
> ...binary... [image alt
> display-graphic-p nil (shr-rescale-image data) ((error)) 0 image-size
> t 400 ...] 5 ("/usr/share/emacs/24.2/lisp/gnus/shr.elc" . 13300)], 3

If that shr.elc is that of Emacs 24.2, it cannot be used with
the most recent 真 Gnus, since the arguments spec of
`gnus-shr-put-image' was changed afterward.  (Emacs 24.2 was
released at 2012-08-24.  The change in question was done at
2012-02-01 in 真 Gnus, but it was not merged to Emacs 24.2.)

Moreover, shr.el and also shr-color.el and eww.el was moved from
真 Gnus to the Emacs Bzr trunk (a.k.a. Emacs 24.3.50) at 2013-06-23.
So, if you wish to keep keeping track of 真 Gnus, the best way
will be to use the Emacs trunk.  I don't think we should have a
copy of those modules in 真 Gnus.

> Here the message: http://pmrb.free.fr/tmp/shr-problem.txt

No problem here.



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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-16 23:36 ` Katsumi Yamaoka
@ 2013-07-17  2:42   ` Dave Goldberg
  2013-07-17  4:48     ` Katsumi Yamaoka
  2013-07-18 10:01   ` Peter Münster
  1 sibling, 1 reply; 14+ messages in thread
From: Dave Goldberg @ 2013-07-17  2:42 UTC (permalink / raw)
  To: ding


> Moreover, shr.el and also shr-color.el and eww.el was moved from
> 真 Gnus to the Emacs Bzr trunk (a.k.a. Emacs 24.3.50) at 2013-06-23.
> So, if you wish to keep keeping track of 真 Gnus, the best way
> will be to use the Emacs trunk.  I don't think we should have a
> copy of those modules in 真 Gnus.

I've been managing to use the latest Gnus with whatever Emacs is bundled in my distro for years now.  Is that really no longer possible?

-- 
Dave Goldberg
david.goldberg6@verizon.net



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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-17  2:42   ` Dave Goldberg
@ 2013-07-17  4:48     ` Katsumi Yamaoka
  2013-07-18  3:46       ` Dave Goldberg
  2013-07-18 10:04       ` Peter Münster
  0 siblings, 2 replies; 14+ messages in thread
From: Katsumi Yamaoka @ 2013-07-17  4:48 UTC (permalink / raw)
  To: ding

Dave Goldberg wrote:
>> Moreover, shr.el and also shr-color.el and eww.el was moved from
>> 真 Gnus to the Emacs Bzr trunk (a.k.a. Emacs 24.3.50) at 2013-06-23.
>> So, if you wish to keep keeping track of 真 Gnus, the best way
>> will be to use the Emacs trunk.

I implicitly wrote in this

>> I don't think we should have a copy of those modules in 真 Gnus.

is that shr.el and friends should be free to using new features
of the bleeding edge Emacs, not be shackled by old Emacsen.

> I've been managing to use the latest Gnus with whatever Emacs is
> bundled in my distro for years now.  Is that really no longer
> possible?

It might be possible, however I guess it reaches impasse sooner
or later.  Because eww.el uses shr.el, and shr.el will probably
get to want to use Emacs's new features so as to improve eww.el.
Maybe no one can keep those modules to work with old Emacs 24s.
Another advantage that they are in the Emacs trunk is that there
are many developers than here, I think.

Oh, mm-text-html-renderer's default should not be `shr' now (in
at least 真 Gnus), isn't it?



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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-17  4:48     ` Katsumi Yamaoka
@ 2013-07-18  3:46       ` Dave Goldberg
  2013-07-18 10:04       ` Peter Münster
  1 sibling, 0 replies; 14+ messages in thread
From: Dave Goldberg @ 2013-07-18  3:46 UTC (permalink / raw)
  To: ding


> Oh, mm-text-html-renderer's default should not be `shr' now (in
> at least 真 Gnus), isn't it?

Doh!  I'd forgotten that was an option.  I've reset it to gnus-w3m and all is well again with the darned html emails I get at work.  Whether that should be the default (I think it was prior to shr, right?) I don't have a strong opinion.

Thanks,
-- 
Dave Goldberg
david.goldberg6@verizon.net



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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-16 23:36 ` Katsumi Yamaoka
  2013-07-17  2:42   ` Dave Goldberg
@ 2013-07-18 10:01   ` Peter Münster
  2013-07-18 11:03     ` Katsumi Yamaoka
  1 sibling, 1 reply; 14+ messages in thread
From: Peter Münster @ 2013-07-18 10:01 UTC (permalink / raw)
  To: ding

On Wed, Jul 17 2013, Katsumi Yamaoka wrote:

>> User-Agent: Gnus/612.570008 (真 Gnus v0.8) Emacs/24.2 (gnu/linux)
>                    ^^^^^^^^^^
> There might be something bad in your Gnus installation. ;)

Hi Katsumi,

Yes, but where could I find this bad something?
I used emacs-24.2 from my distribution (opensuse) and Gnus from git.


> So, if you wish to keep keeping track of 真 Gnus, the best way
> will be to use the Emacs trunk.

All right. Now I use emacs-trunk with latest Gnus from git.
Unfortunately the image-dired is broken now (navigation does not work in
thumbnail buffer). Is this a known issue, or should I post a bug report?

-- 
           Peter




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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-17  4:48     ` Katsumi Yamaoka
  2013-07-18  3:46       ` Dave Goldberg
@ 2013-07-18 10:04       ` Peter Münster
  2013-07-18 11:03         ` Katsumi Yamaoka
  1 sibling, 1 reply; 14+ messages in thread
From: Peter Münster @ 2013-07-18 10:04 UTC (permalink / raw)
  To: ding

On Wed, Jul 17 2013, Katsumi Yamaoka wrote:

> Oh, mm-text-html-renderer's default should not be `shr' now (in
> at least 真 Gnus), isn't it?

It is (at least on my system).

-- 
           Peter




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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-18 10:01   ` Peter Münster
@ 2013-07-18 11:03     ` Katsumi Yamaoka
  2013-07-18 11:49       ` Peter Münster
  0 siblings, 1 reply; 14+ messages in thread
From: Katsumi Yamaoka @ 2013-07-18 11:03 UTC (permalink / raw)
  To: ding

Peter Münster <pmlists@free.fr> wrote:
> On Wed, Jul 17 2013, Katsumi Yamaoka wrote:

>>> User-Agent: Gnus/612.570008 (真 Gnus v0.8) Emacs/24.2 (gnu/linux)
>>                    ^^^^^^^^^^
>> There might be something bad in your Gnus installation. ;)

> Hi Katsumi,

> Yes, but where could I find this bad something?
> I used emacs-24.2 from my distribution (opensuse) and Gnus from git.

Don't modify the value of `gnus-version', that is a constant, and
that is the cause of the funny number, I think.  Instead, I'm doing
this way:

(defadvice gnus-extended-version (after use-japanese-codename activate)
  "Use Japanese codename in `gnus-version'."
  (if (string-match "(\\(Ma\\) Gnus v[.0-9]+)" ad-return-value)
      (setq ad-return-value
	    (concat (substring ad-return-value 0 (match-beginning 1))
		    "真"
		    (substring ad-return-value (match-end 1))))))

Maybe there should be other ways, though.  As for Cygwin[1], I
need also to use the other workaround.

[1] (gnus-continuum-version gnus-version) -> 5.1299999999999999



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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-18 10:04       ` Peter Münster
@ 2013-07-18 11:03         ` Katsumi Yamaoka
  2013-07-18 11:30           ` Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Katsumi Yamaoka @ 2013-07-18 11:03 UTC (permalink / raw)
  To: ding

Peter Münster <pmlists@free.fr> wrote:
> On Wed, Jul 17 2013, Katsumi Yamaoka wrote:
>> Oh, mm-text-html-renderer's default should not be `shr' now (in
>> at least 真 Gnus), isn't it?

> It is (at least on my system).

Now I have another idea to make the current Ma Gnus work with old
shr.el's.



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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-18 11:03         ` Katsumi Yamaoka
@ 2013-07-18 11:30           ` Katsumi Yamaoka
  2013-07-19 11:25             ` Dave Goldberg
  0 siblings, 1 reply; 14+ messages in thread
From: Katsumi Yamaoka @ 2013-07-18 11:30 UTC (permalink / raw)
  To: ding

Katsumi Yamaoka wrote:
> Peter Münster <pmlists@free.fr> wrote:
>> On Wed, Jul 17 2013, Katsumi Yamaoka wrote:
>>> Oh, mm-text-html-renderer's default should not be `shr' now (in
>>> at least 真 Gnus), isn't it?

>> It is (at least on my system).

> Now I have another idea to make the current Ma Gnus work with old
> shr.el's.

Done.



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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-18 11:03     ` Katsumi Yamaoka
@ 2013-07-18 11:49       ` Peter Münster
  2013-07-19  9:11         ` Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Münster @ 2013-07-18 11:49 UTC (permalink / raw)
  To: ding

On Thu, Jul 18 2013, Katsumi Yamaoka wrote:

> Don't modify the value of `gnus-version', that is a constant, and
> that is the cause of the funny number, I think.

Indeed!


> Instead, I'm doing this way:
>
> (defadvice gnus-extended-version (after use-japanese-codename activate)
>   "Use Japanese codename in `gnus-version'."
>   (if (string-match "(\\(Ma\\) Gnus v[.0-9]+)" ad-return-value)
>       (setq ad-return-value
> 	    (concat (substring ad-return-value 0 (match-beginning 1))
> 		    "真"
> 		    (substring ad-return-value (match-end 1))))))

Thanks, I copy it to my gnus.el. IMO, this is the right thing to do,
because of http://article.gmane.org/gmane.emacs.gnus.announce/63
([...] which will be called "真 Gnus" [...])

(`gnus-extended-version', what a heavy function, just to get a version
number...)

-- 
           Peter




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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-18 11:49       ` Peter Münster
@ 2013-07-19  9:11         ` Katsumi Yamaoka
  2013-07-19 14:16           ` Andreas Schwab
  0 siblings, 1 reply; 14+ messages in thread
From: Katsumi Yamaoka @ 2013-07-19  9:11 UTC (permalink / raw)
  To: ding

Peter Münster <pmlists@free.fr> wrote:
> On Thu, Jul 18 2013, Katsumi Yamaoka wrote:
>> Instead, I'm doing this way:
>>
>> (defadvice gnus-extended-version (after use-japanese-codename activate)
>>   "Use Japanese codename in `gnus-version'."
>>   (if (string-match "(\\(Ma\\) Gnus v[.0-9]+)" ad-return-value)
>>       (setq ad-return-value
>> 	    (concat (substring ad-return-value 0 (match-beginning 1))
>> 		    "真"
>> 		    (substring ad-return-value (match-end 1))))))

> Thanks, I copy it to my gnus.el. IMO, this is the right thing to do,
> because of http://article.gmane.org/gmane.emacs.gnus.announce/63
> ([...] which will be called "真 Gnus" [...])

In addition, you'd better add this snippet:

(eval-after-load "rfc2047"
  '(add-to-list 'rfc2047-header-encoding-alist
		'("User-Agent" . address-mime)))

This makes an encoded User-Agent header conform to RFC2616, I think.
I say I think the later of these two examples will be better:

User-Agent: Gnus/5.130008 =?utf-8?Q?=28=E7=9C=9F?= Gnus v0.8) Emacs/24.3.50

User-Agent: Gnus/5.130008 (=?utf-8?Q?=E7=9C=9F?= Gnus v0.8) Emacs/24.3.50



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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-18 11:30           ` Katsumi Yamaoka
@ 2013-07-19 11:25             ` Dave Goldberg
  0 siblings, 0 replies; 14+ messages in thread
From: Dave Goldberg @ 2013-07-19 11:25 UTC (permalink / raw)
  To: ding


> Katsumi Yamaoka wrote:
>> Peter Münster <pmlists@free.fr> wrote:
>>> On Wed, Jul 17 2013, Katsumi Yamaoka wrote:
>>>> Oh, mm-text-html-renderer's default should not be `shr' now (in
>>>> at least 真 Gnus), isn't it?

>>> It is (at least on my system).

>> Now I have another idea to make the current Ma Gnus work with old
>> shr.el's.

> Done.

Confirm it works.  Thanks!

-- 
Dave Goldberg
david.goldberg6@verizon.net



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

* Re: gnus-shr-put-image: Wrong number of arguments
  2013-07-19  9:11         ` Katsumi Yamaoka
@ 2013-07-19 14:16           ` Andreas Schwab
  0 siblings, 0 replies; 14+ messages in thread
From: Andreas Schwab @ 2013-07-19 14:16 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> I say I think the later of these two examples will be better:
>
> User-Agent: Gnus/5.130008 =?utf-8?Q?=28=E7=9C=9F?= Gnus v0.8) Emacs/24.3.50
>
> User-Agent: Gnus/5.130008 (=?utf-8?Q?=E7=9C=9F?= Gnus v0.8) Emacs/24.3.50

The first would be a violation of the comment syntax.  The delimiters of
a comment are only recognized as literals, the encoded-word is part of
the ctext between them (see rfc2047, section 5, rule (2)).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

end of thread, other threads:[~2013-07-19 14:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-16 19:22 gnus-shr-put-image: Wrong number of arguments Peter Münster
2013-07-16 23:36 ` Katsumi Yamaoka
2013-07-17  2:42   ` Dave Goldberg
2013-07-17  4:48     ` Katsumi Yamaoka
2013-07-18  3:46       ` Dave Goldberg
2013-07-18 10:04       ` Peter Münster
2013-07-18 11:03         ` Katsumi Yamaoka
2013-07-18 11:30           ` Katsumi Yamaoka
2013-07-19 11:25             ` Dave Goldberg
2013-07-18 10:01   ` Peter Münster
2013-07-18 11:03     ` Katsumi Yamaoka
2013-07-18 11:49       ` Peter Münster
2013-07-19  9:11         ` Katsumi Yamaoka
2013-07-19 14:16           ` Andreas Schwab

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