all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 35507@debbugs.gnu.org, Andy Moreton <andrewjmoreton@gmail.com>
Subject: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from	Thunderbird
Date: Thu, 02 May 2019 17:10:40 +0100	[thread overview]
Message-ID: <8736lw25xb.fsf@tcd.ie> (raw)
In-Reply-To: <83ftpwq270.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 2 May 2019 18:57:23 +0300")

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

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andy Moreton <andrewjmoreton@gmail.com>
>> Date: Thu, 02 May 2019 16:43:31 +0100
>> 
>> > So yes, I think Noam is right, and 'undecided' is a better alternative here.
>> 
>> That is arguing for the existing code, which does not work correctly.
>
> No, the existing code simply uses the undecoded string.
>
> What I argue for is to do this:
>
> diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
> index 1e1d264b99..173ebfab48 100644
> --- a/lisp/gnus/mm-view.el
> +++ b/lisp/gnus/mm-view.el
> @@ -475,7 +475,7 @@ mm-display-inline-fontify
>  		    (charset
>  		     (mm-decode-string text charset))
>  		    (t
> -		     text)))
> +		     (mm-decode-string text 'undecided))))
>        (let ((font-lock-verbose nil)     ; font-lock is a bit too verbose.
>  	    (enable-local-variables nil))
>          ;; We used to set font-lock-mode-hook to nil to avoid enabling
>
>> I am disinclined to look any further at this, as nobody else appears to
>> be running the existing code before commenting, or testing the proposed
>> patch.
>
> Please don't be offended, there's no intent to offend you here.  Your
> efforts are greatly appreciated.  We are just discussing a small
> change to what you were proposing, see above.
>
> Or are you saying that using undecided as above doesn't do the job?
>
> (Sorry, I don't use Gnus, so to be able to reproduce the problem and
> test a proposed solution I need detailed instructions, I cannot easily
> do it myself without investing an inordinate amount of time.)

FWIW, I use Gnus, and your suggested change to mm-display-inline-fontify
fixes the inline display of the patch in the OP for me.  BTW, the last
two cond branches can be merged following your change:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mm-view.diff --]
[-- Type: text/x-diff, Size: 658 bytes --]

diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 1e1d264b99..849488293a 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -472,10 +472,8 @@ mm-display-inline-fontify
 		       (buffer-string)))
 		    (coding-system
 		     (decode-coding-string text coding-system))
-		    (charset
-		     (mm-decode-string text charset))
-		    (t
-		     text)))
+                    (t
+                     (mm-decode-string text (or charset 'undecided)))))
       (let ((font-lock-verbose nil)     ; font-lock is a bit too verbose.
 	    (enable-local-variables nil))
         ;; We used to set font-lock-mode-hook to nil to avoid enabling

[-- Attachment #3: Type: text/plain, Size: 20 bytes --]


Thanks,

-- 
Basil

  parent reply	other threads:[~2019-05-02 16:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30 19:20 bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Paul Eggert
2019-05-01  0:35 ` Andy Moreton
2019-05-01 15:22   ` Robert Pluim
2019-05-01 15:45     ` Andy Moreton
2019-05-01 16:42       ` Andy Moreton
2019-05-01 17:36         ` Eli Zaretskii
2019-05-01 23:54           ` Andy Moreton
2019-05-02  3:07           ` Noam Postavsky
2019-05-02  7:17             ` Andy Moreton
2019-05-02 11:04               ` Eli Zaretskii
2019-05-02 15:43                 ` Andy Moreton
2019-05-02 15:57                   ` Eli Zaretskii
2019-05-02 16:08                     ` Andy Moreton
2019-05-02 16:50                       ` Eli Zaretskii
2019-05-02 17:13                       ` Eric Abrahamsen
2019-05-02 17:45                         ` Andy Moreton
2019-05-02 16:10                     ` Basil L. Contovounesios [this message]
2019-05-02 16:50                       ` Eli Zaretskii
2019-05-02 17:20                         ` Eli Zaretskii
2019-05-03 13:55                           ` Basil L. Contovounesios
2019-05-02 16:29                     ` Robert Pluim
2019-05-02 16:53                       ` Eli Zaretskii
2019-05-02 12:01               ` Noam Postavsky
2019-05-02 15:40                 ` Eli Zaretskii
2019-05-03 14:02                   ` Basil L. Contovounesios
2019-05-03 15:14                     ` Eli Zaretskii
2019-05-03 15:20                       ` Basil L. Contovounesios
2019-05-01 17:34     ` Eli Zaretskii
2019-05-02  6:35       ` Robert Pluim
2019-05-01 17:33   ` Eli Zaretskii
2019-05-01 17:32 ` Eli Zaretskii
2019-05-01 18:26   ` Paul Eggert
2019-05-01 19:05     ` Eli Zaretskii
2019-05-01 19:47       ` Andreas Schwab
2019-05-01 19:57         ` Eli Zaretskii
2019-05-02 23:24 ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736lw25xb.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=35507@debbugs.gnu.org \
    --cc=andrewjmoreton@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.