[MlMt] Let the Mail-preview show particular header-parts
On 8 May 2012, at 22:50, Seebs wrote: On 8 May 2012, at 15:43, Benny Kj?r Nielsen wrote: By default, it lacks some headers which should be displayed when available, so if you add some of them then you are welcome to send me the result (for example, Resent headers). Idle question: Does the format used for this file have expressiveness enough to allow things like please show me the second Received header? Sorry, no. I guess I shouldn't have used the word ?flexible? about the formatting :-) I'll keep it in mind for a future rewrite of the headers view (generating HTML for a Webview). Not sure yet how that is going to work with respect to format strings, but it is likely that I would allow (and use) an external script to generate what is displayed. -- Benny
[MlMt] Let the Mail-preview show particular header-parts
On 9 May 2012, at 9:06, Niels Kobsch?tzki wrote: I copied it to ~/Library/Application Support/MailMate/Resources/Layouts/headersFormatting.plist but no change in the longFormatting-part shows up when I modify it. Not the one snippet Bill sent me, nor any other changes. I tried for example to change the From: to Blubber: I didn't delete anything from that file, just modified it (wanted to see if it works before cleaning it up). I edited the file with MacVim, not with the Plist-editor (installing XCode just for that is a bit overkill). Any ideas why MailMate apparently doesn't use my headersFormatting.plist? 1. You must restart MailMate (I forgot to mention that). 2. Maybe you made a mistake when editing the file and it is no longer a valid property list (I'm afraid no error is sent to console in this case). For case number 2 you can use `plutil` to check the file. Just write the following in the Terminal: plutil headersFormatting.plist For me, it replies: headersFormatting.plist: OK -- Benny
[MlMt] Let the Mail-preview show particular header-parts
On 9 May 2012, at 9:24, Benny Kj?r Nielsen wrote: On 9 May 2012, at 9:06, Niels Kobsch?tzki wrote: I copied it to ~/Library/Application Support/MailMate/Resources/Layouts/headersFormatting.plist but no change in the longFormatting-part shows up when I modify it. Not the one snippet Bill sent me, nor any other changes. I tried for example to change the From: to Blubber: I didn't delete anything from that file, just modified it (wanted to see if it works before cleaning it up). I edited the file with MacVim, not with the Plist-editor (installing XCode just for that is a bit overkill). Any ideas why MailMate apparently doesn't use my headersFormatting.plist? 1. You must restart MailMate (I forgot to mention that). 2. Maybe you made a mistake when editing the file and it is no longer a valid property list (I'm afraid no error is sent to console in this case). For case number 2 you can use `plutil` to check the file. Just write the following in the Terminal: plutil headersFormatting.plist Thanks, didn't know that one. A , after the last } was missing as it seems (had other errors, fixed it otherwise and therefore it's a guess ;)). Niels
[MlMt] Let the Mail-preview show particular header-parts
On 9 May 2012, at 9:41, Benny Kj?r Nielsen wrote: On 9 May 2012, at 0:22, Bill Cole wrote: On 8 May 2012, at 16:44, Niels Kobsch?tzki wrote: Is there a way to show there to which imap-source a mail belongs? The Source Mailbox is available as a column in a mailbox message list: right click in the header strip of a mailbox pane to get the column selection menu. I'd like to see it in the preview-area though because there is not enough space for that when you have two mail-adresses like: firstname at longlastname.de and firstname at longlastname.net ;) Add this dictionary to the children array of the logFormatting dictionary in the headersFormatting.plist file: { formatString = ${#source}; prefix = { color = #77; fontStyle = bold; string = \tSource:\t; }; } You may also want to combine it with a hack which is used for displaying the source in the messages outline with the name of the source and without the INBOX prefix for certain types of IMAP servers. Something like this should work I believe: { prefix = { color = #77; fontStyle = bold; string = \tSource:\t; }; formatString = ${#source.path.noinbox} ? ; }, { // Hack (only works if used as a single key in a format-string). formatString = ${#source-name}; }, Thanks :) Niels
[MlMt] Let the Mail-preview show particular header-parts
On 9 May 2012, at 9:46, Niels Kobsch?tzki wrote: A , after the last } was missing as it seems (had other errors, fixed it otherwise and therefore it's a guess ;)). Editing plist-files is not a user-friendly task since it's easy to introduce a syntax error. An editor with syntax highlighting is highly recommended (TextMate is perfect for the job since it also clearly indicates when there is a missing comma or semi-colon. Maybe MacVim can be setup to do the same.). -- Benny
[MlMt] Let the Mail-preview show particular header-parts
On 8 May 2012, at 21:38, Niels Kobsch?tzki wrote: in the default setting the preview of a mail (i.e. in the widescreen-view that would be the third pane) the following header-parts are shown: From: Subject: Date: To: Is there a way to add a header-part like Delivered-to? Is there a way to show there to which imap-source a mail belongs? I know Bill already gave you answer, but here is a few more details. I have a long term plan to completely re-implement the headers view, but until then you can make your own formatting string for the view. It is not really mentioned in the manual except for the subsection on [layouts](http://manual.mailmate-app.com/customization#layouts). The file of interest is: MailMate.app/Contents/Resources/Layouts/headersFormatting.plist You should copy it to: ~/Library/Application Support/MailMate/Resources/Layouts/ You may only want to change the `longFormatting` value, so you can remove the other keys (and their values). MailMate merges the defaults with your file. That way it'll work as expected if I change the default `shortFormatting` value. I think you can use the existing content to add new headers. It may look a bit complicated, but that's just because it is flexible ;-) By default, it lacks some headers which should be displayed when available, so if you add some of them then you are welcome to send me the result (for example, Resent headers). -- Benny
[MlMt] Let the Mail-preview show particular header-parts
On 8 May 2012, at 22:37, Bill Cole wrote: On 8 May 2012, at 15:38, Niels Kobsch?tzki wrote: Hi, in the default setting the preview of a mail (i.e. in the widescreen-view that would be the third pane) the following header-parts are shown: From: Subject: Date: To: Is there a way to add a header-part like Delivered-to? Yes. It is not deeply documented, but as the manual (http://manual.mailmate-app.com/customization) says, if you have a file at ~/Library/Application Support/MailMate/Resources/Layouts/headersFormatting.plist it will be used instead of the default header layout, which is at /Applications/MailMate.app/Contents/Resources/Layouts/headersFormatting.plist. great :) Is there a way to show there to which imap-source a mail belongs? The Source Mailbox is available as a column in a mailbox message list: right click in the header strip of a mailbox pane to get the column selection menu. I'd like to see it in the preview-area though because there is not enough space for that when you have two mail-adresses like: firstname at longlastname.de and firstname at longlastname.net ;) Niels
[MlMt] Let the Mail-preview show particular header-parts
On 8 May 2012, at 15:43, Benny Kj?r Nielsen wrote: By default, it lacks some headers which should be displayed when available, so if you add some of them then you are welcome to send me the result (for example, Resent headers). Idle question: Does the format used for this file have expressiveness enough to allow things like please show me the second Received header? I ask because I am one fetchmail hop away from my real mail server, and displaying exactly one (relevant) received header would be super useful. -s
[MlMt] Let the Mail-preview show particular header-parts
On 8 May 2012, at 16:44, Niels Kobsch?tzki wrote: Is there a way to show there to which imap-source a mail belongs? The Source Mailbox is available as a column in a mailbox message list: right click in the header strip of a mailbox pane to get the column selection menu. I'd like to see it in the preview-area though because there is not enough space for that when you have two mail-adresses like: firstname at longlastname.de and firstname at longlastname.net ;) Add this dictionary to the children array of the logFormatting dictionary in the headersFormatting.plist file: { formatString = ${#source}; prefix = { color = #77; fontStyle = bold; string = \tSource:\t; }; } If you edit that file using the plist editor in the current XCode (which harmlessly converts the plist to XML form) you should be able to copy and paste this into the longFormatting:children array: ?xml version=1.0 encoding=UTF-8? !DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd; plist version=1.0 dict keyformatString/key string${#source}/string keyprefix/key dict keycolor/key string#77/string keyfontStyle/key stringbold/string keystring/key stringSource: /string /dict /dict /plist