<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Michael,<div class=""><br class=""></div><div class="">Thanks for this attempt. It does, though have two issues:</div><div class=""><br class=""></div><div class="">(1) It does NOT remove trailing spaces between the last ordinary character on a line and the end of the line;</div><div class=""><br class=""></div><div class="">(2) for each and every line in the block affected, it causes a little pop-up window showing the line, and one has to dismiss that pop-up window before it then automatically goes to the next line to process.</div><div class=""><br class=""></div><div class="">Below is the sample text on which I tried it. I selected the block of lines from the third to the next-to-last there and called the macro.</div><div class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{magenta}{rgb}{1.0, 0.0, 1.0}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{tangerine}{rgb}{0.95, 0.52, 0.0}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{ufogreen}{rgb}{0.24, 0.82, 0.44}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{platinum}{rgb}{0.9, 0.89, 0.89}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{amber}{rgb}{1.0, 0.75, 0.0}<span class="Apple-tab-span" style="white-space:pre">         </span></div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{atomictangerine}{rgb}{1.0, 0.6, 0.4}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{cyan}{rgb}{0.0, 1.0, 1.0}<span class="Apple-tab-span" style="white-space:pre">           </span></div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{lightcyan}{rgb}{0.88, 1.0, 1.0}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{lavendermagenta}{rgb}{0.93, 0.51, 0.93}<span class="Apple-tab-span" style="white-space:pre">          </span></div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{lavenderrose}{rgb}{0.98, 0.63, 0.89}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{MiddleBlue}{rgb}{0.67, 0.9, 0.93}<span class="Apple-tab-span" style="white-space:pre">           </span></div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{cream}{rgb}{1.0, 0.99, 0.82}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{brightgreen}{rgb}{0.4, 1.0, 0.0}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{lime(colorwheel)}{rgb}{0.75, 1.0, 0.0}<span class="Apple-tab-span" style="white-space:pre">    </span></div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{lime(web)(x11green)}{rgb}{0.0, 1.0, 0.0}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{mediumspringgreen}{rgb}{0.0, 0.98, 0.6}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{mintgreen}{rgb}{0.6, 1.0, 0.6}</div><div style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal;" class="">\definecolor{neongreen}{rgb}{0.22, 0.88, 0.08}</div><div class="">  <br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 18 May2020, at 12:58 AM, Michael Sharpe via MacOSX-TeX <<a href="mailto:macosx-tex@email.esm.psu.edu" class="">macosx-tex@email.esm.psu.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Murray,<div class=""><br class=""></div><div class="">My feed from this list is no longer reliable as I seem not to receive a number of messages that are referenced by later emails, so I'm not entirely sure that I'm understanding what it is you need. Nonetheless, here is a macro that solves what I think is the problem you are asking about. When you select text is the frontmost document and call this macro, it replaces all <whitespace}+<endofline> with "%"<endofline>.</div><div class=""><br class=""></div><div class="">The plist should be installed into the Macros Menu just like any other such plist, as documented in the TeXShop docs.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Michael</div><div class=""><br class=""></div><div class=""></div></div><span id="cid:E539B763-1B01-4028-8FA3-FE67101DBD00@hsd1.md.comcast.net"><commentEnds.plist></span><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On May 17, 2020, at 5:33 PM, Murray Eisenberg <<a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">On 17 May2020, at 3:53 PM, Herbert Schulz <<a href="mailto:herbs@wideopenwest.com" class="">herbs@wideopenwest.com</a>> wrote:<br class=""><div class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">On May 17, 2020, at 2:36 PM, Murray Eisenberg <<a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a>> wrote:<br class=""><br class="">It’s worth saying three things for this procedure:<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>(a) This method is possible only when using the OgreKit Find Panel.<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">     </span>(b) It does not work as I’d expect if there are trailing blanks in one of the block’s lines, as it leaves those unwanted blanks there.<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">      </span>(c) [of course] one also has to check the “Selection” option of the Scope section in the OgreKit Find Panel.<br class=""><br class="">** It would still be very nice to have a TeXShop menu items, or at least a macro, to do this operation.<br class=""><br class="">Compare, for example, BBEdit, where after selecting a block of lines, one uses the Text > Prefix/Suffix Lines menu item and then just enters the desired prefix or suffix in the resulting pop-up window.  (Albeit that suffers from the same trailing-blank issue.) I suspect other programmers’ text editors have similar built-in menu items or macros.<br class=""><br class=""><blockquote type="cite" class="">On 17 May2020, at 6:37 AM, Luis Sequeira <<a href="mailto:lfsequeira@gmail.com" class="">lfsequeira@gmail.com</a>> wrote:<br class=""><br class="">1) Select the block of text where you want to add the comment sign.<br class=""><br class="">2) Press Command-F to open the Find window<br class=""><br class="">3) Chech the box for "Regular Expressions"<br class=""> Make sure that you have selected Origin: "Top" and Scope: "Selection"<br class=""><br class=""> Type "$" (without quotes) in the search box<br class=""> Type "%" (without quotes) in the replace box<br class=""> Press Replace All<br class=""></blockquote><br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Howdy,</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">How I wish the Ogrekit find panel was fixed for Catalina, especially to get it to work properly in Dark Mode.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Take a look at the Cot Editor (available for free via the App Store). It has a beautiful regex ready Find Panel that works beautifully in Dark Mode. It would be wonderful is someone could get that to work in TeXShop. PS: the Cot Editor is Open Software written in Swift with freely available source code.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div></blockquote><blockquote type="cite" class=""><div class=""><a href="https://urldefense.com/v3/__https://email.esm.psu.edu/mailman/listinfo/macosx-tex__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ8Zax5i6w$" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">u/mailman/listinfo/macosx-tex</a></div></blockquote></div><div class=""><br class=""></div>Using the specified regexs in the OgreKit panel worked just fine.<div class=""><br class=""></div><div class="">Unfortunately, I never really learned regexs, so in any task requiring one I need explicit instructions on exactly what to do.<div class=""><br class=""></div><div class="">In TeXShop we already have a really easy-to-use menu item, plus associated keystroke shortcut, to comment a selected block of lines.</div><div class="">Given that defining multi-line commands is hardly unknown to TeXers, even non-experts like me, a corresponding menu command/shortcut to comment end of lines would be genuine convenience.</div><div class="">
---<br class="">Murray Eisenberg<span class="Apple-tab-span" style="white-space: pre;">                       </span><a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a><br class="">503 King Farm Blvd #101<span class="Apple-tab-span" style="white-space: pre;">     </span>Home (240)-246-7240<br class="">Rockville, MD 20850-6667<span class="Apple-tab-span" style="white-space: pre;">  </span>Mobile (413)-427-5334<br class=""><br class="">

</div>
<br class=""></div></div>----------- Please Consult the Following Before Posting -----------<br class="">TeX FAQ: <a href="https://urldefense.com/v3/__http://www.tex.ac.uk/faq__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ89r7SRf0$" class="">https://urldefense.com/v3/__http://www.tex.ac.uk/faq__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ89r7SRf0$</a> <br class="">List Reminders and Etiquette: <a href="https://urldefense.com/v3/__https://sites.esm.psu.edu/*gray/tex/__;fg!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ8QrtzZfE$" class="">https://urldefense.com/v3/__https://sites.esm.psu.edu/*gray/tex/__;fg!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ8QrtzZfE$</a> <br class="">List Archives: <a href="https://urldefense.com/v3/__http://dir.gmane.org/gmane.comp.tex.macosx__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ83gNi63c$" class="">https://urldefense.com/v3/__http://dir.gmane.org/gmane.comp.tex.macosx__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ83gNi63c$</a> <br class="">                <a href="https://urldefense.com/v3/__https://email.esm.psu.edu/pipermail/macosx-tex/__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ8oFDMyFs$" class="">https://urldefense.com/v3/__https://email.esm.psu.edu/pipermail/macosx-tex/__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ8oFDMyFs$</a> <br class="">TeX on Mac OS X Website: <a href="https://urldefense.com/v3/__http://mactex-wiki.tug.org/__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ8zot6LfE$" class="">https://urldefense.com/v3/__http://mactex-wiki.tug.org/__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ8zot6LfE$</a> <br class="">List Info: <a href="https://urldefense.com/v3/__https://email.esm.psu.edu/mailman/listinfo/macosx-tex__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ8Zax5i6w$" class="">https://urldefense.com/v3/__https://email.esm.psu.edu/mailman/listinfo/macosx-tex__;!!Mih3wA!TmYjcfVgC7XceqlH--ECBZew63EkibBgVRR-Wcusjpw2Qp7Gb2b66dZ8Zax5i6w$</a> <br class=""></div></blockquote></div><br class=""></div></div>----------- Please Consult the Following Before Posting -----------<br class="">TeX FAQ: <a href="http://www.tex.ac.uk/faq" class="">http://www.tex.ac.uk/faq</a><br class="">List Reminders and Etiquette: <a href="https://sites.esm.psu.edu/~gray/tex/" class="">https://sites.esm.psu.edu/~gray/tex/</a><br class="">List Archives: <a href="http://dir.gmane.org/gmane.comp.tex.macosx" class="">http://dir.gmane.org/gmane.comp.tex.macosx</a><br class="">                <a href="https://email.esm.psu.edu/pipermail/macosx-tex/" class="">https://email.esm.psu.edu/pipermail/macosx-tex/</a><br class="">TeX on Mac OS X Website: <a href="http://mactex-wiki.tug.org/" class="">http://mactex-wiki.tug.org/</a><br class="">List Info: <a href="https://email.esm.psu.edu/mailman/listinfo/macosx-tex" class="">https://email.esm.psu.edu/mailman/listinfo/macosx-tex</a><br class=""></div></blockquote></div><br class=""><div class="">
---<br class="">Murray Eisenberg<span class="Apple-tab-span" style="white-space: pre;">                       </span><a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a><br class="">503 King Farm Blvd #101<span class="Apple-tab-span" style="white-space: pre;">     </span>Home (240)-246-7240<br class="">Rockville, MD 20850-6667<span class="Apple-tab-span" style="white-space: pre;">  </span>Mobile (413)-427-5334<br class=""><br class="">

</div>
<br class=""></div></body></html>