unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* mu4e: A new field added to message view is not shown
       [not found] ` <edcb4fe3-a01a-45fa-9f71-bcd67b5ce622@7d.nz>
@ 2024-07-15 19:48   ` Sébastien Gendre
  2024-07-16  4:57     ` Tassilo Horn
  0 siblings, 1 reply; 2+ messages in thread
From: Sébastien Gendre @ 2024-07-15 19:48 UTC (permalink / raw)
  To: Emacs text editor help

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


Hello,

I meet a problem with mu4e. I wanted to send my e-mail to the mu4e
mailing list, but I didn't success to subscribe to. I hope I can ask
for help here.

I have defined a custom field that show the E-mail user agent. And I
have added it to the message view. But when I show a message, my field
is nowhere.

Here is my code:


    ;; Add an e-mail custom header that give the correspondant user agent, at the end
    (add-to-list 'mu4e-header-info-custom
                 '(:user-agent .
                               ( :name "User agent"
                                 :shortname "UsrAgnt"
                                 :help "E-mail client used by correspondant"
                                 :function (lambda (msg)
                                             (or (mu4e-fetch-field msg "User-Agent") ""))))
                 t)

    ;; Add the new :user-agent field into the message view, at the end
    (add-to-list 'mu4e-view-fields :user-agent t)


I have tested the code `(mu4e-fetch-field (mu4e-message-at-point)
"User-Agent")` with `eval-expression` (M-:), and I get the User agent of
the message.

I also seen that in the variable `mu4e-view-fields`, I have ":tags" but
I don't see any "Tags:" field in a message view.


Best regards

-------
Gendre Sébastien

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

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

* Re: mu4e: A new field added to message view is not shown
  2024-07-15 19:48   ` mu4e: A new field added to message view is not shown Sébastien Gendre
@ 2024-07-16  4:57     ` Tassilo Horn
  0 siblings, 0 replies; 2+ messages in thread
From: Tassilo Horn @ 2024-07-16  4:57 UTC (permalink / raw)
  To: Sébastien Gendre; +Cc: Emacs text editor help

Sébastien Gendre <seb@k-7.ch> writes:

Hi Sébastien,

> I have defined a custom field that show the E-mail user agent. And I
> have added it to the message view. But when I show a message, my field
> is nowhere.

Since mu4e-view-mode derives from gnus-article-mode nowadays, you can
use

    ;; Show User-Agent header by default.
    (setq gnus-visible-headers (concat gnus-visible-headers
                                       "\\|^User-Agent:"))

HTH,
  Tassilo



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

end of thread, other threads:[~2024-07-16  4:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87zfqjsb9o.fsf@k-7.ch>
     [not found] ` <edcb4fe3-a01a-45fa-9f71-bcd67b5ce622@7d.nz>
2024-07-15 19:48   ` mu4e: A new field added to message view is not shown Sébastien Gendre
2024-07-16  4:57     ` Tassilo Horn

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 read-only IMAP folder(s) and NNTP newsgroup(s).