<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 04/12/2014 19:00, Matthias Braun
      wrote:<br>
    </div>
    <blockquote
cite="mid:differential-rev-PHID-DREV-stw6pdrveafeuj4zptmo-req@reviews.llvm.org"
      type="cite">
      <pre wrap="">Hi chandlerc,

Most desktop environments let the users specify his preferred application per
file type. On mac/linux we can use open/xdg-open for that and should try this
first before starting a heuristic search for various programs.

I hope this is not going to be too much of a bikesched discussion, but I really
prefer it when I can configure the applications myself instead of having a
hardcoded default list, though after seeing r210148 which tries 'gv' before
'xdg-open' I wonder if there is a problem with that approach for some people?
Can you explain why you did this alp? Couldn't people just set their system to open all postscript files gv?</pre>
    </blockquote>
    <br>
    It's indeed a good idea to attempt 'xdg-open' before 'gv' on
    Unix/Linux. The only reason I didn't make it this way was in order
    to preserve identical functionality during the large refactoring
    from antiquated configure-time to runtime detection. In fact, having
    'xdg-open' and 'open' first has more or less always been the plan.<br>
    <br>
    Note that the code is already there so I don't think you need to
    duplicate it as you suggested in your patch. See the existing code:<br>
    <br>
    <code>  enum PSViewerKind { PSV_None, PSV_OSXOpen, PSV_XDGOpen,
      PSV_Ghostview };</code><code><br>
    </code><code>  PSViewerKind PSViewer = PSV_None;</code><code><br>
    </code><code>#ifdef __APPLE__</code><code><br>
    </code><code>  if (!PSViewer && S.TryFindProgram("open",
      ViewerPath))</code><code><br>
    </code><code>    PSViewer = PSV_OSXOpen;</code><code><br>
    </code><code>#endif</code><code><br>
    </code><code>  if (!PSViewer && S.TryFindProgram("gv",
      ViewerPath))</code><code><br>
    </code><code>    PSViewer = PSV_Ghostview;</code><code><br>
    </code><code>  if (!PSViewer && S.TryFindProgram("xdg-open",
      ViewerPath))</code><code><br>
    </code><code>    PSViewer = PSV_XDGOpen;</code><br>
    <br>
    Simply shifting the order of "gv" and "xdg-open" should be
    sufficient, and can be achieved by reverting r210148. I'd be in
    favour of doing that now that the refactor is complete -- Matthias,
    can you see if simply reverting that small commit achieves what you
    want?<br>
    <br>
    Alp.<br>
    <br>
    <br>
    <blockquote
cite="mid:differential-rev-PHID-DREV-stw6pdrveafeuj4zptmo-req@reviews.llvm.org"
      type="cite">
      <pre wrap="">

<a class="moz-txt-link-freetext" href="http://reviews.llvm.org/D6534">http://reviews.llvm.org/D6534</a>

Files:
  lib/Support/GraphWriter.cpp
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.nuanti.com">http://www.nuanti.com</a>
the browser experts
</pre>
  </body>
</html>