Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.)
@ 2017-01-10 18:30 John Magolske
  2017-01-10 18:41 ` Teemu Likonen
  0 siblings, 1 reply; 8+ messages in thread
From: John Magolske @ 2017-01-10 18:30 UTC (permalink / raw)
  To: ding


Hello,

Reading a message in Gnus I see text displayed like

    \355 ... \351 ... \223quotes\224

instead of

    í ... é ... “quotes”

Pointing Mutt to the same maildir, the message displays properly.
Mutt's "show MIME attachments" shows two parts:

    [text/plain, quoted, windows-1252, 29K]
                 [text/plain, 7bit, us-ascii, 0.4K]

So in Gnus I select windows-1252 when doing:

    M-x gnus-article-view-part-as-charset

...and the message displays properly. Is there a way to have this happen
automatically, perhaps with some sort of hook?

Thanks for any tips,

John

-- 
John Magolske
http://b79.net/contact



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

* Re: gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.)
  2017-01-10 18:30 gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.) John Magolske
@ 2017-01-10 18:41 ` Teemu Likonen
  2017-01-10 23:14   ` Katsumi Yamaoka
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Teemu Likonen @ 2017-01-10 18:41 UTC (permalink / raw)
  To: John Magolske; +Cc: ding

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

John Magolske [2017-01-10 10:30:24-08] wrote:

> So in Gnus I select windows-1252 when doing:
>
>     M-x gnus-article-view-part-as-charset
>
> ...and the message displays properly. Is there a way to have this happen
> automatically, perhaps with some sort of hook?

I'd first try this:

    (setq gnus-default-charset 'windows-1252)

Documentation:

    Default charset assumed to be used when viewing non-ASCII
    characters. This variable is overridden on a group-to-group basis by
    the ‘gnus-group-charset-alist’ variable and is only used on groups
    not covered by that variable.

-- 
/// Teemu Likonen   - .-..   <https://keybase.io/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

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

* Re: gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.)
  2017-01-10 18:41 ` Teemu Likonen
@ 2017-01-10 23:14   ` Katsumi Yamaoka
  2017-01-11  0:39     ` John Magolske
  2017-01-10 23:28   ` John Magolske
  2017-01-18 23:18   ` John Magolske
  2 siblings, 1 reply; 8+ messages in thread
From: Katsumi Yamaoka @ 2017-01-10 23:14 UTC (permalink / raw)
  To: ding

On Tue, 10 Jan 2017 20:41:25 +0200, Teemu Likonen wrote:
> I'd first try this:
>     (setq gnus-default-charset 'windows-1252)

For a per group basis you can use `gnus-group-charset-alist' as
follows:

(add-to-list 'gnus-group-charset-alist
	     '("\\`nnml:foo\\.bar\\'" windows-1252))

or in the customization buffer:

[INS] [DEL] List:
            Group: \`nnml:foo\.bar\'
            Charset: windows-1252

This charset will be used if the header of an article, that is
stored in the nnml:foo.bar group, doesn't have the charset info.
It is of no effect for a part of a multipart article, though.

See also: `gnus-summary-show-article-charset-alist'
 -> (info "(gnus)Paging the Article")



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

* Re: gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.)
  2017-01-10 18:41 ` Teemu Likonen
  2017-01-10 23:14   ` Katsumi Yamaoka
@ 2017-01-10 23:28   ` John Magolske
  2017-01-18 23:18   ` John Magolske
  2 siblings, 0 replies; 8+ messages in thread
From: John Magolske @ 2017-01-10 23:28 UTC (permalink / raw)
  To: ding

Teemu Likonen <tlikonen@iki.fi> writes:
> John Magolske [2017-01-10 10:30:24-08] wrote:
>>     M-x gnus-article-view-part-as-charset
>>
>> ...and the message displays properly. Is there a way to have this
>> happen automatically, perhaps with some sort of hook?
>
> I'd first try this:
>
>     (setq gnus-default-charset 'windows-1252)

Thank, just tried that but there's no change -- still \223 \224 ...
also tried:

    (setq gnus-article-charset 'windows-1252)
    (setq gnus-newsgroup-charset 'windows-1252)
    (setq gnus-newsgroup-ephemeral-charset 'windows-1252)

as well as the command:

    M-x gnus-summary-show-article-from-menu-as-charset-windows-1252

All to no avail.

This is a two part message (I see "(two parts)" in the modeline) and
the content-type is shown in the header as:

Content-Type: multipart/mixed; boundary="===============2269483752806094185=="

Regards,

John

-- 
John Magolske
http://b79.net/contact



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

* Re: gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.)
  2017-01-10 23:14   ` Katsumi Yamaoka
@ 2017-01-11  0:39     ` John Magolske
  2017-01-11 10:49       ` Andreas Schwab
  0 siblings, 1 reply; 8+ messages in thread
From: John Magolske @ 2017-01-11  0:39 UTC (permalink / raw)
  To: ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:
> On Tue, 10 Jan 2017 20:41:25 +0200, Teemu Likonen wrote:
>> I'd first try this:
>>     (setq gnus-default-charset 'windows-1252)
>
> For a per group basis you can use `gnus-group-charset-alist' as
> follows:
>
> (add-to-list 'gnus-group-charset-alist
> 	     '("\\`nnml:foo\\.bar\\'" windows-1252))

Thanks, tried that by placing this in my config:

(add-to-list 'gnus-group-charset-alist
             '("\\`nnimap+imap-mail:nettime\\'" windows-1252))

C-h v gnus-group-charset-alist shows up like so:

Value:
(("\\`nnimap+imap-mail:nettime\\'" windows-1252)
 ("\\(^\\|:\\)hk\\>\\|\\(^\\|:\\)tw\\>\\|\\<big5\\>" cn-big5)
   ...

Still no change.

> See also: `gnus-summary-show-article-charset-alist'
>  -> (info "(gnus)Paging the Article")

Reading through this, tried C-u 0 g then selected windows-1252 to no
effect.

John

-- 
John Magolske
http://b79.net/contact



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

* Re: gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.)
  2017-01-11  0:39     ` John Magolske
@ 2017-01-11 10:49       ` Andreas Schwab
  2017-01-12  1:18         ` John Magolske
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2017-01-11 10:49 UTC (permalink / raw)
  To: John Magolske; +Cc: ding

On Jan 10 2017, John Magolske <listmail@b79.net> wrote:

> (add-to-list 'gnus-group-charset-alist
>              '("\\`nnimap+imap-mail:nettime\\'" windows-1252))

You need to quote `+' so that it matches itself.

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] 8+ messages in thread

* Re: gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.)
  2017-01-11 10:49       ` Andreas Schwab
@ 2017-01-12  1:18         ` John Magolske
  0 siblings, 0 replies; 8+ messages in thread
From: John Magolske @ 2017-01-12  1:18 UTC (permalink / raw)
  To: ding

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Jan 10 2017, John Magolske <listmail@b79.net> wrote:
>
>> (add-to-list 'gnus-group-charset-alist
>>              '("\\`nnimap+imap-mail:nettime\\'" windows-1252))
>
> You need to quote `+' so that it matches itself.

Would that need to be escaped like so :

    '("\\`nnimap\\+imap-mail:nettime\\'" windows-1252))

John

-- 
John Magolske
http://b79.net/contact



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

* Re: gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.)
  2017-01-10 18:41 ` Teemu Likonen
  2017-01-10 23:14   ` Katsumi Yamaoka
  2017-01-10 23:28   ` John Magolske
@ 2017-01-18 23:18   ` John Magolske
  2 siblings, 0 replies; 8+ messages in thread
From: John Magolske @ 2017-01-18 23:18 UTC (permalink / raw)
  To: ding

Teemu Likonen <tlikonen@iki.fi> writes:
> John Magolske [2017-01-10 10:30:24-08] wrote:
>> So in Gnus I select windows-1252 when doing:
>>
>>     M-x gnus-article-view-part-as-charset
>>
>> ...and the message displays properly. Is there a way to have this happen
>> automatically, perhaps with some sort of hook?
>
> I'd first try this:
>
>     (setq gnus-default-charset 'windows-1252)

So that setting by itself didn't work, but then I found the command
gnus-article-decode-mime-words would cause the message to display
properly. So now, with this in my gnus config file:

(setq gnus-default-charset 'windows-1252)
(add-hook 'gnus-summary-mode-hook
          (lambda ()
            (if (equal gnus-newsgroup-name "nnimap+imap-mail:nettime")
                (progn
                  (add-hook 'gnus-article-prepare-hook 'gnus-article-decode-mime-words))
              (progn
                (remove-hook 'gnus-article-prepare-hook 'gnus-article-decode-mime-words)))))

...everything displays properly for that mailing list without affecting
other lists/groups. There may be a more elegant/sensible solution
(a simple setting?) -- but this works for now.

Regards,

John

-- 
John Magolske
http://b79.net/contact



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

end of thread, other threads:[~2017-01-18 23:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-10 18:30 gnus-article-view-part-as-charset automatically? (display of \223 \224 \351 etc.) John Magolske
2017-01-10 18:41 ` Teemu Likonen
2017-01-10 23:14   ` Katsumi Yamaoka
2017-01-11  0:39     ` John Magolske
2017-01-11 10:49       ` Andreas Schwab
2017-01-12  1:18         ` John Magolske
2017-01-10 23:28   ` John Magolske
2017-01-18 23:18   ` John Magolske

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