<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    There is a new version of the string_io module that handles the new
    io_request format (a unicode atom was added sometime).<br>
    With this I think bepp (the formatter) now works.<br>
    <br>
    Note: to use bepp with '<', call stdin/0.<br>
    <br>
    <br>
    bengt<br>
    <br>
    <div class="moz-cite-prefix">On 05/24/2016 09:35 PM, Mark
      Bucciarelli wrote:<br>
    </div>
    <blockquote
cite="mid:CAFqAhKp0DKqjfH+7UC1Wz-40Ne4UdQX_eopmTu8PiBTc99zSzQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>I didn't look at that as I didn't find it before.</div>
        <div><br>
        </div>
        <div>I tried it, but only got comments out.  Maybe I'm not using
          it right?</div>
        <div><br>
        </div>
        <div>
          <p class="">~/src/erlang_stdin_formatter/src<span class="">$
              cat erlfmt </span></p>
          <p class="">#!/usr/bin/env escript</p>
          <p class="">main([]) -></p>
          <p class=""><span class=""> </span>bepp:main([prog]).</p>
          <p class="">~/src/erlang_stdin_formatter/src<span class="">$
              ./erlfmt < a_program.erl</span></p>
          <p class=""><span class=""><br>
            </span></p>
          <p class=""><span class="">Thanks,</span></p>
          <p class=""><span class=""><br>
            </span></p>
          <p class=""><span class="">Mark</span></p>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Mon, May 23, 2016 at 1:24 AM,
              Bengt Kleberg <span dir="ltr"><<a
                  moz-do-not-send="true"
                  href="mailto:bengt.kleberg@ericsson.com"
                  target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:bengt.kleberg@ericsson.com">bengt.kleberg@ericsson.com</a></a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
                <div text="#000000" bgcolor="#FFFFFF"> Greetings,<br>
                  <br>
                  If you looked at <a moz-do-not-send="true"
                    href="https://github.com/ebengt/erlang_stdin_formatter"
                    target="_blank">https://github.com/ebengt/erlang_stdin_formatter</a>
                  I would be interested in suggestions as to where it
                  was not sufficient.<span class=""><font
                      color="#888888"><br>
                      <br>
                      <br>
                      Bengt</font></span>
                  <div>
                    <div class="h5"><br>
                      <br>
                      <div>On 05/23/2016 03:11 AM, Mark Bucciarelli
                        wrote:<br>
                      </div>
                      <blockquote type="cite">
                        <div dir="ltr">Thanks for the suggestions!
                          <div><br>
                          </div>
                          <div>I took a look at each, but none of the
                            three options really gave me what I wanted. 
                            So I ended up wrapping erl_tidy in a way
                            that gives me what I want:</div>
                          <div><br>
                          </div>
                          <div>:%!erlfmt</div>
                          <div><br>
                          </div>
                          <div>Here's the source, such as it is: <a
                              moz-do-not-send="true"
                              href="https://github.com/mbucc/erlfmt"
                              target="_blank"><a class="moz-txt-link-freetext" href="https://github.com/mbucc/erlfmt">https://github.com/mbucc/erlfmt</a></a>.</div>
                          <div><br>
                          </div>
                          <div>It was able to format 1,794 out of 1,795
                            source files under /usr/local/Cellar/erlang/<a
                              moz-do-not-send="true"
                              href="http://18.2.1." target="_blank">18.2.1.</a>
                             It failed to format
                            lib/erlang/lib/wx-1.6/src/gen/gl.erl, which
                            is 971KB in size.</div>
                          <div><br>
                          </div>
                          <div>Mark</div>
                        </div>
                        <div class="gmail_extra"><br>
                          <div class="gmail_quote">On Thu, Apr 28, 2016
                            at 3:09 AM, Roger Lipscombe <span dir="ltr"><<a
                                moz-do-not-send="true"
                                href="mailto:roger@differentpla.net"
                                target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:roger@differentpla.net">roger@differentpla.net</a></a>></span>
                            wrote:<br>
                            <blockquote class="gmail_quote"
                              style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I
                              use vimerl (<a moz-do-not-send="true"
                                href="https://github.com/jimenezrick/vimerl"
                                rel="noreferrer" target="_blank">https://github.com/jimenezrick/vimerl</a>),

                              which has an<br>
                              escript included:<br>
                              <a moz-do-not-send="true"
href="https://github.com/jimenezrick/vimerl/blob/master/indent/erlang_indent.erl"
                                rel="noreferrer" target="_blank">https://github.com/jimenezrick/vimerl/blob/master/indent/erlang_indent.erl</a><br>
                              <br>
                              I *believe* that it's equivalent to Emacs
                              erlang-mode, but I don't<br>
                              have Emacs installed :-P<br>
                              <div>
                                <div><br>
                                  On 28 April 2016 at 07:24, Pierre
                                  Fenoll <<a moz-do-not-send="true"
                                    href="mailto:pierrefenoll@gmail.com"
                                    target="_blank">pierrefenoll@gmail.com</a>>

                                  wrote:<br>
                                  > I made <a moz-do-not-send="true"
href="https://github.com/fenollp/erlang-formatter" rel="noreferrer"
                                    target="_blank">https://github.com/fenollp/erlang-formatter</a>
                                  though it depends on<br>
                                  > OTP's Emacs erlang-mode.<br>
                                  ><br>
                                  > erlang-mode has been the de facto
                                  authority in terms of linting.<br>
                                  > However it has some issues, like
                                  when indenting typed record
                                  definitions.<br>
                                  ><br>
                                  > Dropping the dependency on Emacs
                                  would be great but again, which dev/CI<br>
                                  > machine doesn't have Emacs?<br>
                                  ><br>
                                  > On 28 Apr 2016, at 00:46, Tristan
                                  Sloughter <<a
                                    moz-do-not-send="true"
                                    href="mailto:t@crashfast.com"
                                    target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:t@crashfast.com">t@crashfast.com</a></a>>

                                  wrote:<br>
                                  ><br>
                                  > Short answer: No.<br>
                                  ><br>
                                  > Long answer: No, but I'd love for
                                  someone with the time to clean up<br>
                                  > <a moz-do-not-send="true"
                                    href="https://github.com/tsloughter/erl_tidy"
                                    rel="noreferrer" target="_blank">https://github.com/tsloughter/erl_tidy</a>
                                  which is a rebar3 plugin named `fmt`<br>
                                  > around erl_tidy. the erl_tidy
                                  code has issues with type specs and
                                  other<br>
                                  > newer syntax and will currently
                                  just dump out the AST for those. These
                                  fixes<br>
                                  > would then, of course, need to be
                                  submitted upstream to OTP, but this
                                  plugin<br>
                                  > provides a testing ground and
                                  hopefully motivation to someone out
                                  there :)<br>
                                  ><br>
                                  > --<br>
                                  > Tristan Sloughter<br>
                                  > <a moz-do-not-send="true"
                                    href="mailto:t@crashfast.com"
                                    target="_blank">t@crashfast.com</a><br>
                                  ><br>
                                  ><br>
                                  ><br>
                                  > On Wed, Apr 27, 2016, at 05:37
                                  PM, Mark Bucciarelli wrote:<br>
                                  ><br>
                                  > Hi,<br>
                                  ><br>
                                  > I'm wondering if anyone here uses
                                  or knows of a utility like gofmt for<br>
                                  > Erlang.  If you're not familiar
                                  with gofmt, it simply reads source
                                  code on<br>
                                  > stdin and writes formatted source
                                  code to stdout.<br>
                                  ><br>
                                  > I looked at erl_tidy but cannot
                                  see how to make it read stdin.<br>
                                  ><br>
                                  > Thanks,<br>
                                  ><br>
                                  > Mark<br>
                                  >
                                  _______________________________________________<br>
                                  > erlang-questions mailing list<br>
                                  > <a moz-do-not-send="true"
                                    href="mailto:erlang-questions@erlang.org"
                                    target="_blank">erlang-questions@erlang.org</a><br>
                                  > <a moz-do-not-send="true"
                                    href="http://erlang.org/mailman/listinfo/erlang-questions"
                                    rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
                                  ><br>
                                  ><br>
                                  ><br>
                                  >
                                  _______________________________________________<br>
                                  > erlang-questions mailing list<br>
                                  > <a moz-do-not-send="true"
                                    href="mailto:erlang-questions@erlang.org"
                                    target="_blank">erlang-questions@erlang.org</a><br>
                                  > <a moz-do-not-send="true"
                                    href="http://erlang.org/mailman/listinfo/erlang-questions"
                                    rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
                                  ><br>
                                  ><br>
                                  >
                                  _______________________________________________<br>
                                  > erlang-questions mailing list<br>
                                  > <a moz-do-not-send="true"
                                    href="mailto:erlang-questions@erlang.org"
                                    target="_blank">erlang-questions@erlang.org</a><br>
                                  > <a moz-do-not-send="true"
                                    href="http://erlang.org/mailman/listinfo/erlang-questions"
                                    rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
                                  ><br>
_______________________________________________<br>
                                  erlang-questions mailing list<br>
                                  <a moz-do-not-send="true"
                                    href="mailto:erlang-questions@erlang.org"
                                    target="_blank">erlang-questions@erlang.org</a><br>
                                  <a moz-do-not-send="true"
                                    href="http://erlang.org/mailman/listinfo/erlang-questions"
                                    rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
                                </div>
                              </div>
                            </blockquote>
                          </div>
                          <br>
                        </div>
                        <br>
                        <fieldset></fieldset>
                        <br>
                        <pre>_______________________________________________
erlang-questions mailing list
<a moz-do-not-send="true" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a moz-do-not-send="true" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
                      </blockquote>
                      <br>
                    </div>
                  </div>
                </div>
                <br>
                _______________________________________________<br>
                erlang-questions mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
                <a moz-do-not-send="true"
                  href="http://erlang.org/mailman/listinfo/erlang-questions"
                  rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
                <br>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>