From: Kevin W. <kw...@co...> - 2025-06-05 16:39:45
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><img width="1" height="1" src="https://fedbdhd.r.af.d.sendibt2.com/tr/op/WnBCGsVtXexyo_d6R8auIU2eLyouVlLI41kAbWV2AWuL40mZgR80DOQPWFpBoiYF19sz-O8ybrZowILT7Nhhj_QEdtW_z3ajoRBoku61AT6faWHFr6I521XRzzTKNSIDrLR6qy2pcr4rYJTrhd170yGIpofxZQAwNt9YVPfbULm9pY7COLl_42C_tGokugGkjPlKWDJT26fBJRAlYVN1OgqEvAD_RW8f" style="mso-hide:all"/><div dir="ltr"></div><div dir="ltr">I wish there were a tool that we could run files through that works standardize indentation according to the Tcl Engineering Manual. I am only willing to invest so much time in tidying up my code. </div><div dir="ltr"><br><blockquote type="cite">On Jun 5, 2025, at 12:28 PM, Marc Culler <cul...@gm...> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>Another issue that emerges when relying on emacs is that the files in the macosx directory are not actually C files (despite the .c extension). They are Objective C files. Emacs knows to use objc mode because the emacs <span style="font-family:monospace">Local Variables</span> comment specifies <span style="font-family:monospace">mode: objc</span><b>.</b> But the emacs indentation rules for Objective C are different from those for C, and they conflict with the Tcl guidelines. For example, emacs in objc mode thinks the following indentation is correct:</div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">v<b>oid<br>TkExampleFunction(<br> Tcl_Interp *interp,<br> Tk_Window tkwin)<br>{<br> return;<br>}<br></b></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">whereas Tcl expects:</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">v<b>oid<br>TkExampleFunction(<br> Tcl_Interp *interp,<br> Tk_Window tkwin)<br>{<br> return;</b></span><b><br>}</b></div><div><br></div><div>So I don't think that relying on emacs is the answer, not even during editing. Too bad that the real world is so complicated.</div><div><br></div><div>- Marc</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Jun 5, 2025 at 10:58 AM apnmbx-public--- via Tcl-Core <<a href="mailto:tcl...@li...">tcl...@li...</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg6435832809847493291"><div lang="EN-IN" style="overflow-wrap: break-word;"><div class="m_6435832809847493291WordSection1"><p class="MsoNormal"><span style="font-size:11pt">Using emacs (or VS or whatever), as I do, is fine when used during the actual editing. If it is set up to format the entire file on a save, then I’m afraid lines will bounce between spaces and tabs if two developers have different settings in that respect.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt">Anyways, I just wanted to bring attention to this issue as a request to all.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt">/Ashok<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p><div><div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(225,225,225) currentcolor currentcolor;padding:3pt 0in 0in"><p class="MsoNormal" style="margin-left:0.5in"><b><span lang="EN-US" style="font-size:11pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:"Calibri",sans-serif"> Kevin Walzer <<a href="mailto:kw...@54..." target="_blank">kw...@54...</a>> <br><b>Sent:</b> Wednesday, June 4, 2025 11:46 PM<br><b>To:</b> Marc Culler <<a href="mailto:cul...@gm..." target="_blank">cul...@gm...</a>><br><b>Cc:</b> <a href="mailto:apn...@ya..." target="_blank">apn...@ya...</a>; <a href="mailto:tcl...@li..." target="_blank">tcl...@li...</a><br><b>Subject:</b> Re: [TCLCORE] On editing whitespace<u></u><u></u></span></p></div></div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p><p class="MsoNormal" style="margin-left:0.5in"><span style="border:1pt solid windowtext;padding:0in"><div><~WRD0000.jpg></div></span><u></u><u></u></p><div><p class="MsoNormal" style="margin-left:0.5in">My practice is up run my edits through Emacs C indentation before committing. I plan to continue that. <u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:0.5in"><br><br><u></u><u></u></p><blockquote style="margin-top:5pt;margin-bottom:5pt"><p class="MsoNormal" style="margin-right:0in;margin-bottom:12pt;margin-left:0.5in">On Jun 4, 2025, at 12:41<span style="font-family:"Arial",sans-serif"> </span>PM, Marc Culler <<a href="mailto:cul...@gm..." target="_blank">cul...@gm...</a>> wrote:<u></u><u></u></p></blockquote></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div><p class="MsoNormal" style="margin-left:0.5in"><span style="font-family:"Tahoma",sans-serif"></span><u></u><u></u></p><div><div><p class="MsoNormal" style="margin-left:0.5in">Also, if there really is a need to mess with whitespace, it would be very helpful to produce a commit with *only* whitespace changes and to give it a helpful comment that includes words like "only changes whitespace".<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:0.5in">And, if it ever comes to a decision, I would also vote for spaces. They make life so much simpler when people mix ASCII art with internal code documentation (as in left justifying comments at a certain column.) We can easily afford the few extra bytes of storage.<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:0.5in">- Marc <u></u><u></u></p></div></div><p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p><div><div><p class="MsoNormal" style="margin-left:0.5in">On Wed, Jun 4, 2025 at 11:26<span style="font-family:"Arial",sans-serif"> </span>AM apnmbx-public--- via Tcl-Core <<a href="mailto:tcl...@li..." target="_blank">tcl...@li...</a>> wrote:<u></u><u></u></p></div><blockquote style="border-width:medium medium medium 1pt;border-style:none none none solid;border-color:currentcolor currentcolor currentcolor rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><div><p class="MsoNormal" style="margin-left:0.5in">On more than one occasion in the past couple of months, commits have been made that include copious changes of spaces to tabs. TIP 247, which presumably is the coding standard Tcl core follows, does not have any mandate to use tabs afaict. If that is the case, can we please desist from such changes? Without getting into a tabs vs spaces war (personally, I prefer spaces) can we just respect whatever exists as long as it meets the standard (indent of 4 etc.) It has practical implications in that, when reviewing diffs or merging, one has to go unnecessarily go through each diff to see what changed.<u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:0.5in">/Ashok<u></u><u></u></p></div></div><p class="MsoNormal" style="margin-left:0.5in">_______________________________________________<br>Tcl-Core mailing list<br><a href="mailto:Tcl...@li..." target="_blank">Tcl...@li...</a><br><a href="https://fedbdhd.r.af.d.sendibt2.com/tr/cl/NtlkBQINf1J-xE5B-4H7iBhinSxAVHYNnprusCRtEou20blFmcOO45bb--AFRMReVMsKtk954QGMkd2kL77J0ZXe9mI1GEQ07NFs0j38qEQGXQcMsy0VoeRbLXmXEr3-tQaqrpK8I3XqqXl7nKHG5XjpgFNLgLdgABHf5LpFRQwffzMnWxnu5n2hIxPxYNF_JSBktedmYz0f1WuvWGLvDobGaVp0ByjCFYp0pdHj1xO5Lwr5n4SiGW19fkzL04NOefkuEZKWTQI8Q6eKrkcZ3PrYO7wItcQOgQJiV3Ba3K8anh6SNyrj7aVl" target="_blank">https://lists.sourceforge.net/lists/listinfo/tcl-core</a><u></u><u></u></p></div></blockquote></div><p class="MsoNormal" style="margin-left:0.5in">_______________________________________________<br>Tcl-Core mailing list<br><a href="mailto:Tcl...@li..." target="_blank">Tcl...@li...</a><br><a href="https://fedbdhd.r.af.d.sendibt2.com/tr/cl/a4LH6FNZ2Pa0uZLDL1MR8wpNyu0DxyKfgRyg_VX2qHqdYhKiFtzeg6ucXx7fyW3ALBFUPMKIEavrync7x9-QBei3FFvWZHmqWE_VwaYnzTijmcU1a_hPkrxVG8UGgz50jFQ6sZ-ncfd1u79jE2mgRgrZ9x7vjP7FpSo_M52pAdJX4jnkx4NhewUTtHJ6WlU9npicJZdEdPnAJZwFd5ekEqLSOWNSAaYl7qb1K_ZABt6k7cf5lr9rSfL9PSXEgA3Yvtz_2k1X6ySFJIETvxuSoFi_TSjq48zmRnpwaWf86KjLbO8xxk2evq7rh00LeMWtIw" target="_blank">https://lists.sourceforge.net/lists/listinfo/tcl-core</a><u></u><u></u></p></div></blockquote></div></div>_______________________________________________<br> Tcl-Core mailing list<br> <a href="mailto:Tcl...@li..." target="_blank">Tcl...@li...</a><br> <a href="https://fedbdhd.r.af.d.sendibt2.com/tr/cl/rKGN81T2SADcaj9r9lOBjlJDQ82tKqos5Grr3bOoGVTdq6s-dnH_y_RgUX8W1QYITYYPqtbhhlLogbES9_LfGGHbc35_ZqMc2Ix3RpqNmbuZGgFSHj-Bz_-HPMGmgCUC4TH5sZ2jAbsepJqV3z3yp79gjdq9R8n2q9cyp7aUSpo6L95av6HEsSq48lKsLk2ShBFlDuOJpS6t4c4BTJaGyZIIdXZgYrDdsnULquJpgLoRldb62A_9oAp4GkWKcv3sNvo9A1wY4jUxxhfZ_a9SiE0tuqSi3eNTre4nq6UvnZh8tiHnMY4jd652NveDfEiEAQ" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/tcl-core</a><br> </div></blockquote></div> <span>_______________________________________________</span><br><span>Tcl-Core mailing list</span><br><span>Tcl...@li...</span><br><span>https://lists.sourceforge.net/lists/listinfo/tcl-core</span><br></div></blockquote></body></html> |