Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: passing data to stdin for build commands #1013

Open
mscdex opened this issue Apr 28, 2016 · 9 comments
Open

Feature request: passing data to stdin for build commands #1013

mscdex opened this issue Apr 28, 2016 · 9 comments

Comments

@mscdex
Copy link

mscdex commented Apr 28, 2016

It would be nice to be able to pass the current document, selected text, etc. to the stdin of a build command. This would be particularly useful for cases where you don't have a new file saved yet, but still want to lint the document (or part of it) for example.

@b4n
Copy link
Member

b4n commented Apr 28, 2016

What about a custom command for that purpose?

@elextr
Copy link
Member

elextr commented Apr 29, 2016

On 29 April 2016 at 06:02, Colomban Wendling notifications@github.com
wrote:

What about a custom command
https://geany.org/manual/index.html#sending-text-through-custom-commands
for that purpose?

​Is it safe to replace the file with the lint output?​


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1013 (comment)

@b4n
Copy link
Member

b4n commented Apr 29, 2016

Good point, it's not, yet one wants to see the output. So nevermind that suggestion, it wasn't worth anything.

@elextr
Copy link
Member

elextr commented Apr 29, 2016

This doesn't seem likely to have a significant use-case. In general lint should not be run without previously compiling the source successfully. An erroneous source file is likely to cause lint to emit many false messages. But generally compiling requires a file, since compilers use the extension to decide what to do.

@mscdex
Copy link
Author

mscdex commented Apr 29, 2016

@elextr I had something like JavaScript in mind actually. There have been times where I am working on something temporary, so there is no use saving to a temporary file, but I may still want to lint it to make sure there are no syntax or other errors.

@elextr
Copy link
Member

elextr commented Apr 29, 2016

Well I guess "somebody" will have to design how to configure build commands to send the file to stdin, and also actually implement the functionality.

@b4n
Copy link
Member

b4n commented Apr 29, 2016

No spoiler ahead, but a little time ago I was thinking of writing a all-purpose command spawner with all the missing features we currently have, including arbitrary placeholders, environment modifications, selectable stdin/stdout/stderr, etc. It should actually be fairly easy to implement the feature itself with the new spawn API we have, and it'd be a "mere matter" of writing a nice configurable UI for that. If I get time I'll try to work on that further.

@elextr
Copy link
Member

elextr commented Apr 29, 2016

@b4n don't forget to parse the output for file:line so its possible to jump to it by clicking on the output

@b4n
Copy link
Member

b4n commented Apr 29, 2016

a neat design for that would require being able to customize the available action, so have easy scriptability… we'll see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants