mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-12 03:23:12 +00:00
Update of documentation in the source related to bug 4135 and the function callback.cpp::writeAs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19528 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cbb59eef29
commit
cc9380a90f
@ -131,32 +131,9 @@ bool menuWrite(Buffer * buffer)
|
|||||||
If 'newname' is empty (the default), the user is asked via a
|
If 'newname' is empty (the default), the user is asked via a
|
||||||
dialog for the buffer's new name and location.
|
dialog for the buffer's new name and location.
|
||||||
|
|
||||||
If 'newname' is not empty, FileName::makeAbsPath() will indirectly
|
If 'newname' is non-empty and has an absolute path, that is used.
|
||||||
produce the following behaviour:
|
Otherwise the base directory of the buffer is used as the base
|
||||||
|
for any relative path in 'newname'.
|
||||||
* If 'newname' has an absolute path, use that.
|
|
||||||
|
|
||||||
* If 'newname' has a relative path (or no path) and the buffer has
|
|
||||||
a path, that path is used as the base for 'newname'. Typically
|
|
||||||
this means that 'M-x buffer-write-as newname.lyx' will write to
|
|
||||||
the same directory as the original file.
|
|
||||||
|
|
||||||
* Otherwise use CWD as the base directory for 'newname'.
|
|
||||||
This behavour is arguably a bug, perhaps a system depedenant
|
|
||||||
"document directory" shoul be used instead. Note that CWD
|
|
||||||
isn't actually used according to a simple test on Linux.
|
|
||||||
Instead, it's based on '~', contrar to the documentation of
|
|
||||||
makeAbsPath(). Don't know what to do. *shrug*
|
|
||||||
|
|
||||||
Note: No checks are done on the extension etc of 'newname' when
|
|
||||||
it's non-empty. This may arguably also be a bug.
|
|
||||||
|
|
||||||
Note: The code may not code check that 'newname' is a valid for
|
|
||||||
the relevant file system?
|
|
||||||
|
|
||||||
Note: In Linux, it doesn't work with e.g. '~/file.lyx'. If it's
|
|
||||||
done from e.g. a buffer '/tmp/buf.lyx', it instead tries to write
|
|
||||||
to '/tmp/~/file.lyx'.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool writeAs(Buffer * buffer, string const & newname)
|
bool writeAs(Buffer * buffer, string const & newname)
|
||||||
|
11
src/lfuns.h
11
src/lfuns.h
@ -52,14 +52,11 @@ enum kb_action {
|
|||||||
LFUN_BUFFER_WRITE,
|
LFUN_BUFFER_WRITE,
|
||||||
// 5
|
// 5
|
||||||
LFUN_BUFFER_WRITE_AS,
|
LFUN_BUFFER_WRITE_AS,
|
||||||
/** LFUN_BUFFER_WRITE_AS, Chr 2007-08-12
|
/** LFUN_BUFFER_WRITE_AS,
|
||||||
* Function: Save current buffer as .lyx-file with a new filename.
|
* Function: Rename and save current buffer.
|
||||||
* Syntax: buffer-write-as <filename>
|
* Syntax: buffer-write-as <filename>
|
||||||
* In: <filename> = Name of the new file. Must currently be
|
* In: <filename> = New name of the buffer/file. A relative path
|
||||||
* an absolute path (bug 4135). Relative paths will be
|
* is with respect to the original location of the buffer/file.
|
||||||
* treated as relative to the location of the original
|
|
||||||
* buffer (i.e. LyX file?).
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
LFUN_BUILD_PROGRAM,
|
LFUN_BUILD_PROGRAM,
|
||||||
LFUN_BUFFER_VIEW,
|
LFUN_BUFFER_VIEW,
|
||||||
|
Loading…
Reference in New Issue
Block a user