Re: Pipe buffer content thru program before save

Dale Anson <[email protected]>
Newsgroups gmane.editors.jedit.user
Message-ID <CAHrA0wB_+3+QjA1t86d6SgZozrc6T1civefx5=73b+H9xx7R8A@mail.gmail.com>
I think the Console plugin already has this functionality. If you open a
BeanShell in the Console plugin, you can do something like this:

runCommandToBuffer(view, "System", "your command");

This will run your command in the System shell in Console, and show the
output in a new buffer.

You could also write a "commando" xml file (see the Console plugin help
file for details) that would give you more control over what processing
happens and where the output goes.

Dale


On Sun, May 9, 2021 at 9:14 PM Eric Le Lay <[email protected]> wrote:

> Le Mon, 3 May 2021 22:13:58 +0200,
> Thomas Meyer <[email protected]> a écrit :
>
> > Hi,
> >
> > I wanted to pipe a buffer‘s content thru a program while saving.
> > This is what I did come up with. It was surpisingly hard to solve:
> > https://github.com/thomasmey/jedit-scripts/blob/master/bsh/save-thru.bsh
> >
> > I wonder if there would have been a more easy way to solve this
> > problem! What do you think?
> >
> > Mfg
> > Thomas
> >
> >
>
> Hi,
>
> the beauty plugin lets you define external beautifiers by subclassing
> OuterBeautifier to return the command-line (see [1]). Unfortunately
> it's very heavy to define a whole plugin just to provide the
> command-line to launch. Maybe extending Beauty to create
> OuterBeautifiers from the gui with a few placeholders could be useful
> to others?
>
> Cheers,
>
> [1] https://sourceforge.net/u/kerik-sf/jsbeautifierbeauty/ci/master/tree/
>
>
> --
> -----------------------------------------------
> jEdit Users' List
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jedit-users
>

-- 
-----------------------------------------------
jEdit Users' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.