On Sat, Mar 04, 2017 at 10:10:58PM +0100, Guillaume Munch wrote: > I am not sure to understand since I am not familiar with this part of LyX. > But I will push a patch that makes "buffer-export *" synonymous to > buffer-export so that your patch becomes simpler.
Thanks, that does make things more simple. I made a couple of additions at a3e1b6b7 and cd87bd72. The problem now is that '*' is interpreted by some shells. So to export from the command line on e.g. bash, one cannot do: lyx -e * file.lyx and instead must do lyx -e '*' file.lyx Would you be opposed to using a different symbol that is not interpreted by common shells? Scott
diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 60dcc51..d01336e 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -4231,6 +4231,8 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir if (pos != string::npos) { dest_filename = target.substr(pos + 1, target.length() - pos - 1); format = target.substr(0, pos); + if (format == "*") + format = params().getDefaultOutputFormat(); runparams.export_folder = FileName(dest_filename).onlyPath().realPath(); FileName(dest_filename).onlyPath().createPath(); LYXERR(Debug::FILES, "format=" << format << ", dest_filename=" << dest_filename << ", export_folder=" << runparams.export_folder);
signature.asc
Description: PGP signature