commit 892593fbdc25b9f8b413dd842748e0b3a57c90b0
Author: Scott Kostyshak <[email protected]>
Date: Sat Oct 8 20:59:54 2016 -0400
Change default working directory from ~/ to "."
Note that the lyxrc.document_path variable corresponds to what we
call the "Working directory" in the GUI preferences dialog.
Setting document_path to "." makes it so when LyX is started from a
directory, that directory is the default path for many of LyX's
operations, such as the following:
- new file, new from template
- adding a custom BibTeX file
- GUI compare dialog
- local layout button in document settings
- external material file browser
- graphics browser, include browser
The best guess for where the user wants to save or find files is the
directory the user started LyX from. Before, the default was always
the home directory. If desired, the old behavior can be restored by
changing the default path in Preferences > "Working directory".
This commit takes advantage of 9b64d7bd, which allows the use of a
relative path for path preferences.
---
lib/RELEASE-NOTES | 6 ++++++
src/LyX.cpp | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES
index d4b537a..07f73e2 100644
--- a/lib/RELEASE-NOTES
+++ b/lib/RELEASE-NOTES
@@ -19,6 +19,12 @@
!!!The following pref variables were changed in 2.3:
+* \document_path
+ Default is changed to ".". The best guess for where the user wants to save
+ or find files is the directory the user started LyX from. Before, the
+ default was always the home directory. If desired, the old behavior can be
+ restored by changing the default path in Preferences > "Working directory".
+
!!!The following pref variables are obsoleted in 2.3:
diff --git a/src/LyX.cpp b/src/LyX.cpp
index fec8281..047e265 100644
--- a/src/LyX.cpp
+++ b/src/LyX.cpp
@@ -831,7 +831,7 @@ bool LyX::init()
#endif
lyxrc.tempdir_path = package().temp_dir().absFileName();
- lyxrc.document_path = package().document_dir().absFileName();
+ lyxrc.document_path = ".";
if (lyxrc.example_path.empty()) {
lyxrc.example_path =
addPath(package().system_support().absFileName(),