diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-07 19:00:46 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-07 19:00:46 +0100 |
commit | 63c88b9616a7d9f25ee1d466fbdd74792dec9a37 (patch) | |
tree | c45e4f67c2296b39e4103e8308ead4f3580f78bb | |
parent | a3a340a9e9e1856a46c079186354f163cfc5febc (diff) | |
download | sciteco-63c88b9616a7d9f25ee1d466fbdd74792dec9a37.tar.gz |
changed save point file format to .teco-<n>-<filename>~
* It is no longer possible to accidentally open save point files
of the same or another SciTECO instance when typing something like
EB*.cpp$
* The use of a trailing ~ is common among editors. These files
will be recognized more easily as temporary by users.
* People will often already have VCS ignore rules for files with
trailing tilde. Therefore SciTECO savepoints will often be
already ignored by VCS.
* Since they still have a unique ".teco" prefix, they will not
be confused by other programs as backup files.
* Also mention in sciteco(1) that save point files are hidden on
Windows.
-rw-r--r-- | doc/sciteco.1.in | 6 | ||||
-rw-r--r-- | src/ioview.cpp | 2 | ||||
-rw-r--r-- | src/ring.cpp | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in index 7e3b0c3..6bc0f98 100644 --- a/doc/sciteco.1.in +++ b/doc/sciteco.1.in @@ -183,10 +183,12 @@ and opening files specified on the command line. .B $SCITECOPATH/*.tes Standard library macros. .TP -.BI .teco- x - filename +.BI .teco- n - filename ~ Save point files created by \*(ST when saving files during interactive execution have this format. -These files can be ignored by version control systems, etc. +On Windows, these files have the hidden attribute set. +Savepoint files are temporary and should be ignored by version +control systems, etc. .TP .B $SCITECOCONFIG/.teco_session Macro storing the default buffer session. diff --git a/src/ioview.cpp b/src/ioview.cpp index 2d368ed..b663fcf 100644 --- a/src/ioview.cpp +++ b/src/ioview.cpp @@ -213,7 +213,7 @@ make_savepoint(const gchar *filename) basename = g_path_get_basename(filename); g_snprintf(savepoint_basename, sizeof(savepoint_basename), - ".teco-%d-%s", savepoint_id, basename); + ".teco-%d-%s~", savepoint_id, basename); g_free(basename); dirname = g_path_get_dirname(filename); savepoint = g_build_filename(dirname, savepoint_basename, NIL); diff --git a/src/ring.cpp b/src/ring.cpp index c7c145a..c3fec3f 100644 --- a/src/ring.cpp +++ b/src/ring.cpp @@ -403,7 +403,7 @@ StateEditFile::done(const gchar *str) * save point files. * It does not merely overwrite existing files when saving * but moves them to save point files instead. - * Save point files are called \(lq.teco-\fIn\fP-\fIfilename\fP\(rq, + * Save point files are called \(lq.teco-\fIn\fP-\fIfilename\fP~\(rq, * where <filename> is the name of the saved file and <n> is * a number that is increased with every save operation. * Save point files are always created in the same directory @@ -411,7 +411,7 @@ StateEditFile::done(const gchar *str) * on disk is necessary but only a rename of the file. * When rubbing out the EW command, \*(ST restores the latest * save point file by moving (renaming) it back to its - * original path - also not requiring any on-disk copying. + * original path \(em also not requiring any on-disk copying. * \*(ST is impossible to crash, but just in case it still * does it may leave behind these save point files which * must be manually deleted by the user. |