<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body><div style="font-family: sans-serif;"><div class="plaintext" style="white-space: normal;"><p dir="auto">I had this question, too. Thanks for the tutorial, Benny.</p>
</div><div id="D83BC94B-4BC0-4B4F-B900-88D09016AFDE"><body style="font-family: times; font-size: 125%;">   
        <div style="word-wrap:break-word;-webkit-nbsp-mode:space;line-break:after-white-space;"> 
                Respectfully, <br />
                        Henry Seiden <br />
                        <! -- Email address option -- > 
                        E: <a href= "mailto:inf@techworkspro.com"> Techworks Pro E-mail</a>  <br />
                        W: <a href= "http://techworkspro.com"> Techworks Pro Co. Home Page</a>
        <br /> <hr /> <br />
                </div>
                <div class="container" style="width:100%;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px;border-width:1px;border-style:solid;border-color:gray;line-height:150%;background-color:lightblue;" >
                <div class="header" style="padding-top:0.5em;padding-bottom:0.5em;padding-right:0.5em;padding-left:0.5em;color:white;background-color:gray;clear:left;" >
                        <h1 class="header" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;" >Techworks Pro Co.
                                        </h1>
                </div>
                <div class="left" style="float:left;width:210px;margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:1em;padding-bottom:1em;padding-right:1em;padding-left:1em;" >
                        <p>Founder, Henry Seiden info@techworkspro.com
                                        </p>
                </div>
                <div class="content" style="margin-left:230px;border-left-width:1px;border-left-style:solid;border-left-color:gray;padding-top:1em;padding-bottom:1em;padding-right:1em;padding-left:1em;overflow:hidden;" >
                 <img src="https://techworkspro.com/_includes/techworkspro_v3_200x53.png" width="300" alt="" />
                        </div>
                <div class="footer" style="padding-top:0.5em;padding-bottom:0.5em;padding-right:0.5em;padding-left:0.5em;color:white;background-color:gray;clear:left;" >© 2022 techworkspro.com
                                </div>
        </div>
</body>
</div>
<div class="plaintext" style="white-space: normal;"><p dir="auto">
<br>
On 16 Jul 2022, at 9:26, Benny Kjær Nielsen wrote:</p>
</div><blockquote class="embedded" style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #5855D5; color: #5855D5;"><div id="73447A6D-DDB4-47F4-AC7B-5E3F1E9AFC2C">

<div style="font-family: sans-serif;">
<div class="markdown" style="white-space: normal;">
<p dir="auto">On 16 Jul 2022, at 14:44, David Wainberg wrote:</p>
</div>
<div class="plaintext" style="white-space: normal;">
<blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;">
<p dir="auto">One thing I want to fix is the format of the information behind a counter dropdown. The documentation of the format syntax is pretty sparse - <a href="https://manual.mailmate-app.com/format_string_syntax.html" style="color: #777777;">https://manual.mailmate-app.com/format_string_syntax.html</a> - and I'm having trouble figuring it out.</p>
</blockquote>
</div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">Very understandable.</p>
</div>
<div class="plaintext" style="white-space: normal;">
<blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;">
<p dir="auto">Specifically, what I want to do at the moment is to shorten and fix the length of the subject display, since by default it is variable, and some email subjects are quite long. The size and positioning of the dropdown adjusts accordingly, which I find undesirable.</p>
</blockquote>
</div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">That could be something like this (using regular expressions):</p>
<pre style="margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw;"><code style="margin: 0 0; border-radius: 3px; background-color: #F7F7F7; padding: 0px;">${subject/(.{,10})(.+)?/$1(?2:…)/}
</code></pre>
<p dir="auto">That looks pretty menacing, but it's the same syntax as provided by some text editors when doing search/replace. The MailMate syntax is identical to the one used by TextMate. That means the documentation found <a href="https://macromates.com/manual/en/regular_expressions#conditional_insertions" style="color: #3983C4;">here</a> is also useful for MailMate (and the example is more advanced than the one provided here).</p>
<p dir="auto">To elaborate, this is the format string variant used above:</p>
<pre style="margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw;"><code style="margin: 0 0; border-radius: 3px; background-color: #F7F7F7; padding: 0px;">${«var»/«regexp»/«format»/«options»}
</code></pre>
<p dir="auto">The <code style="margin: 0 0; padding: 0 0.25em; border-radius: 3px; background-color: #F7F7F7;">var</code> is <code style="margin: 0 0; padding: 0 0.25em; border-radius: 3px; background-color: #F7F7F7;">subject</code>, but this could be any email header (or a subpart of a header).</p>
<p dir="auto">The <code style="margin: 0 0; padding: 0 0.25em; border-radius: 3px; background-color: #F7F7F7;">regexp</code> is:</p>
<pre style="margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw;"><code style="margin: 0 0; border-radius: 3px; background-color: #F7F7F7; padding: 0px;">(.{,10})(.+)?
</code></pre>
<p dir="auto">It matches 10 characters and then the rest in 2 different capture variables.</p>
<p dir="auto">The <code style="margin: 0 0; padding: 0 0.25em; border-radius: 3px; background-color: #F7F7F7;">format</code> used is then:</p>
<pre style="margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw;"><code style="margin: 0 0; border-radius: 3px; background-color: #F7F7F7; padding: 0px;">$1(?2:…)
</code></pre>
<p dir="auto">Which simply uses the (up to) 10 characters in the first capture and then adds the ellipsis if and only if the second capture contains anything.</p>
</div>
<div class="plaintext" style="white-space: normal;">
<blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;">
<p dir="auto">Even if that's not doable, I'd like to play with the format.</p>
<p dir="auto">I've searched the list and haven't found anything. Can anyone point me to more docs or examples I can crib from?</p>
</blockquote>
</div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">The above isn't much, but maybe it'll help a bit.</p>
<p dir="auto">--<br>
Benny</p>
</div>
</div></div></blockquote>
<div class="plaintext" style="white-space: normal;">
<blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #5855D5; color: #5855D5;"><p dir="auto">_______________________________________________
<br>
mailmate mailing list
<br>
mailmate@lists.freron.com
<br>
<a href="https://lists.freron.com/listinfo/mailmate">https://lists.freron.com/listinfo/mailmate</a></p>
</blockquote></div>

</div>
</body>

</html>