@Pynckels commented on this pull request.
> @@ -593,8 +593,8 @@ static void print_external(GeanyDocument *doc)
return;
}
- cmdline = g_strdup(printing_prefs.external_print_cmd);
- utils_str_replace_all(&cmdline, "%f", doc->file_name);
+ /* replace d, e, f and p placeholders in cmdline */
+ cmdline = utils_replace_placeholder(doc,
printing_prefs.external_print_cmd, "defp");
My preference would be to continue with #4318, since my experience is that the
following is more transparent for (future) users of as well the external
printing as the build process.
- `%f` for file
- `%e `for extension
- `%d` for directory
- `%p` for (full) path
I have introduced a choice between being able to use `%l` (already present in
build.c before this PR) in the building process and not in the printing
process, since _current 1-based linenumber_ does not make sense within a
external printing environment and since I like non-time critical functionality
to check their input as much as possible.
It is true that the previous `%f` could be parsed by an external print process,
but that would, in many cases, need an extra `pipeline` alike construction
between Geany and the real printing process, which is a real hassle.
So I see two options:
- keep the changes in this PR and go ahead with #4318
- roll back the changes made to `build.c` and keep the changes made to
`utils.c` and `printing.c`
In the latter case, there will be a (temporary) incoherence between the
building and the printing substitutions, but it will give you the time to have
an in depth discussion.
As already said above: my preference would be to go ahead with #4318 to keep
coherence at a maximum.
In each case, thanks again for considering the proposed changes/extensions to
the printing process.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/4250#discussion_r2134612548
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/4250/review/[email protected]>