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

No option to turn off directory printing #2422

Open
awsdert opened this issue Jan 18, 2020 · 14 comments
Open

No option to turn off directory printing #2422

awsdert opened this issue Jan 18, 2020 · 14 comments

Comments

@awsdert
Copy link

awsdert commented Jan 18, 2020

There should never have been a need to automatically print the directory in the 1st place, if peops want that they should have to add it to the command manually, every time I copy my build output I have to remove the directory manually and I should not need to do so in the 1st place

@elextr
Copy link
Member

elextr commented Jan 18, 2020

Its not clear what you are talking about. What do you mean by "print the directory"? You need to be clearer for someone to be able to help you.

@codebrainz
Copy link
Member

codebrainz commented Jan 18, 2020

I'm reading WAY between the lines here, since it's not really clear what you mean...

If you're talking about when you run build commands which execute GNU Make and you see messages like "Entering directory /foo/bar" and "Leaving directory /foo/bar" in the build output, that is something GNU Make does on its own, and can be disabled by passing the --no-print-directory option to the make build command you have configured.

If that's not what you're talking about, then as @elextr suggested, you should clarify what you mean.

@awsdert
Copy link
Author

awsdert commented Jan 18, 2020

At work so can't do screenshot but no that is not what I mean, I already added that flag to make in build commands list and the directory is still printed by geany as it is executed, it is always there no matter what command I use

@codebrainz
Copy link
Member

Do you mean this?

@awsdert
Copy link
Author

awsdert commented Jan 18, 2020

Almost but as I said it has nothing to do with the command I run, gcc etc show up further down the line, example 1st line
make --no-print-directory (in directory /mnt/[DRIVE]/...)

@codebrainz
Copy link
Member

codebrainz commented Jan 18, 2020

Yeah, the linked code is where Geany injects a blue the_command (in directory /where/ever) message in the Compiler tab.

I tend to agree that shouldn't be printed in the "compiler" output, it seems like it belongs more in the "Status" tab and/or in the debug messages. Or perhaps there could be a new action added to the Compiler tab context menu that is like "Copy Command Output Only" which skips those blue messages inject by Geany?

@awsdert
Copy link
Author

awsdert commented Jan 18, 2020

ah, I just saw msgwin_compiler and assumed you had linked to msgwin code

@codebrainz
Copy link
Member

every time I copy my build output I have to remove the directory manually

Can you elaborate on what you do this for? Not to second-guess your use-case, but just so the developers can understand how you're using Geany.

@awsdert
Copy link
Author

awsdert commented Jan 18, 2020

I run make or gcc or clang or lua from the build command list and the 1st line of the output always shows the command plus directory, everything thereafter is what I expect from the executable, when I get errors I use the copy all command from the output context menu and I have to remove the directory before posting it in the relative forum

@awsdert
Copy link
Author

awsdert commented Jan 18, 2020

@elextr
Copy link
Member

elextr commented Jan 18, 2020

Because there are substitutions in the command such as current file, and the directory that the command runs in can also be a substitution, showing the actual command thats run and where its run is useful. Its shown I ran a command on the wrong file many times.

However if somebody made a pull request to make it optional (default on) it probably would be accepted. Don't forget to document the option in the manual.

@codebrainz
Copy link
Member

Because there are substitutions in the command such as current file, and the directory that the command runs in can also be a substitution, showing the actual command thats run and where its run is useful. Its shown I ran a command on the wrong file many times

It seems like that's duplicating what make, ninja and similar tools already do though, in addition to also confusing what the "Compiler" tab contains; not just compile/build output as described in the manual, but also some non-build status messages generated by Geany.

In any case, IMO the simplest solution, as previously mentioned, would be to add a new menu item to the context menu of the Compiler tab to allow copying only the actual build output, and none of Geany's injected status messages. This way doesn't require adding any preferences or removing existing functionality or such.

@elextr
Copy link
Member

elextr commented Jan 19, 2020

It seems like that's duplicating what make, ninja and similar tools already do though

But the build command does not have to be make, ninja, or whatever, it can just be gcc.

not just compile/build output as described in the manual, but also some non-build status messages generated by Geany.

I do think you are overegging it, the message is in a different colour to the compiler output, so most people understand its not the compiler output.

In any case, IMO the simplest solution, as previously mentioned, would be to add a new menu item to the context menu of the Compiler tab to allow copying only the actual build output, and none of Geany's injected status messages. This way doesn't require adding any preferences or removing existing functionality or such.

Yes, but what would be even better is if it was possible to select and copy specific lines, several times I have wanted to copy part of the output (usually to ridicule G++ messages, but thats a valid use-case 😁 ).

AFAICT its not possible to select lines because the output is actually a treeview not plain text, but maybe there is something that can be set to allow it, GTK experts needed.

@awsdert
Copy link
Author

awsdert commented Jan 19, 2020

I don't mind the command being printed but I would like the option of not printing the directory, so for example you could add a text box to the build options dialog that allows us to customize what gets appended to the command we run in the output

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