Not a perl question, but seeing as the monastery has many helpful monks, I can see why you asked.

I don't know the answer, but in short you need to find a way of signalling to an existing emacs process that it needs to load a new file. There is probably a command line option to emacs that tells it to look for an existing emacs process, and then use some sort of private IPC to get the existing process to load the file. The new emacs process will then quit. There might be an alternative binary for the purpose, as there is with GIMP under windows.

In short you need to read the docs, and use google.

Once you figure out the command line, it is a simple matter to invoke it from perl with system

As a side note, does anyone know how to achieve the same with Padre?


In reply to Re: perl interface to emacs by chrestomanci
in thread perl interface to emacs by brian42miller

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.