-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message with inline ICS #1625
Comments
Same with the latest Mu version (commit efd6710). |
The problem is with (let ((charset (make-symbol "charset")))
`(let ((,charset (cdr (assoc 'charset (mm-handle-type ,handle))))) and this returns an invalid charset. |
Any idea how to fix this? |
On 25 March 2020 at 07:47 CET, Dirk-Jan C. Binnema ***@***.***> wrote:
Any idea how to fix this?
I'll try to find some time to investigate in the coming days. I see two possibilities: one could try to add the charset information to the handle (we try to determine it in `mu4e~view-gnus`) or we could advise the function (using `mu4e~view-rendering` to only trigger it for mu4e).
|
Temporary fix (a better solution must be found to use the charset in (define-advice gnus-icalendar-event-from-handle
(:filter-args (handle-attendee) fix-missing-charset)
"Fix mu not passing the charset."
(let* ((handle (car handle-attendee))
(attendee (cdr handle-attendee))
(buf (mm-handle-buffer handle))
(ty (mm-handle-type handle))
(rest (cddr handle)))
;; Put the fallback at the end:
(setq ty (append ty '((charset . "utf-8"))))
(setq handle (cons buf (cons ty rest)))
(list handle attendee))) |
Ah, thanks. But should the advise perhaps have a guard so it only works when used in mu4e? Otherwise it could affect people trying to use the 'real' gnus after this is defined. Or? |
I filed a bug against Emacs. The following variant only apply the customization inside mu: (define-advice gnus-icalendar-event-from-handle
(:filter-args (handle-attendee) fix-missing-charset)
"Fix mu not passing the charset."
(if (boundp 'mu4e~view-rendering)
(let* ((handle (car handle-attendee))
(attendee (cdr handle-attendee))
(buf (mm-handle-buffer handle))
(ty (mm-handle-type handle))
(rest (cddr handle)))
;; Put the fallback at the end:
(setq ty (append ty '((charset . "utf-8"))))
(setq handle (cons buf (cons ty rest)))
(list handle attendee))
handle-attendee)) |
Ah, thanks again. But shouldn't the check be wether we're currently in an mu4e buffer? Otherwise the advise would still kick in if you use gnus after mu4e? |
One should replace |
Ah, thanks. Do you want to make a PR, or do you think we can do this post-1.4? |
I'll try to make a PR later today — it will not affect many people but it is annoying when this bug is triggered. |
Expected or desired behavior
View the message
Actual behavior
The attached message (composed with Mu4e) triggers an error when displaying it with the Gnus mode (not the original one).
(I can send privately the original message which also starts the debugger when “Enter Debugger on Error” is set.)
Versions of mu, mu4e/emacs, operating system etc.
Emacs 26.3
Mu: commit 441f005
The text was updated successfully, but these errors were encountered: