<div class="gmail_quote">On Fri Jan 09 2015 at 11:05:01 AM Johann Klähn <<a href="mailto:kljohann@gmail.com" target="_blank">kljohann@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Nevertheless the package on MELPA should be backwards compatible to in-the-wild clang versions, so it would have to contain some form of workaround for 3.4, or what do you think?</p></blockquote><div><br></div><div>So, as of r225516 we now support outputting a <cursor> element if the cursor was given on the command line.</div><div><br></div><div>What I don't understand yet is:</div><div>Why doesn't emacs correctly handle this by itself? Doesn't it update the cursor correctly when we insert / replace code?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">On Jan 9, 2015 10:49 AM, "Manuel Klimek" <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'll update the XML format to contain the cursor position...<br><br><div class="gmail_quote">On Fri Jan 09 2015 at 10:38:13 AM Daniel Jasper <<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The cursor being past the end of the file should not lead to an error!? Does this happen if the cursor is a the very end of the file? Should we special-case that? Alternatively, it might be easier to uses clang-format's -lines parameter instead of -offset/-length.</div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 9, 2015 at 9:44 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Note that the version deletes all content of a file in case of an error (for example, when the cursor is past the end of the file), so I wouldn't point melpa at it yet.<div>I'm working on an improved version.</div><div><div><br><div class="gmail_quote">On Thu Jan 08 2015 at 4:32:22 PM Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>+cfe-commits (please do not cut that out during code review, the list is the source of truth for code reviews)<br></div><div><br></div>Landed as r225447. Note that I'm planning to adapt it soon to not replace the whole buffer, but just apply the diffs (I'll cc' you on the patch for review, unless you object :)<div><br></div><div>Cheers & thx!</div><div></div><div>/Manuel</div><div><br><div><br><div class="gmail_quote">On Wed Jan 07 2015 at 6:06:08 PM Johann Klähn <<a href="mailto:kljohann@gmail.com" target="_blank">kljohann@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jan 7, 2015 at 5:14 PM, Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br>
> +If called interactively uses the region or the current buffer if there<br>
> +is no active region. If no style is given uses `clang-format-style'."<br>
><br>
> Doing full-buffer if nothing is selected is a usability problem if one works<br>
> in an existing codebase; if no region is selected, it should just use the<br>
> cursor position (which will get the current statement reflowed).<br>
> The idea is that the user can do clang-format-buffer if they insist.<br>
Excellent point.<br>
<br>
> +(put 'clang-format-executable 'risky-local-variable t)<br>
><br>
> Any reason not to use :risky in the defcustom?<br>
Oh, I thought I already did so. I must have accidently reverted that change.<br>
<br>
Thanks for your feedback, find attached an updated patch.<br>
</blockquote></div></div></div></blockquote></div>
</div></div><br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">______________________________<u></u>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div></div></blockquote></div>
</blockquote></div>
</blockquote></div>