Mail Archives: geda-user/2018/07/06/11:48:48
On Fri, Jul 06, 2018 at 05:24:51PM +0200, Roland Lutz wrote:
> On Fri, 6 Jul 2018, Chris Green wrote:
> > If I look in the 'File'->'Open Recent' menu in gschem I see:-
> >
> > 0. bbbpsu.sch
> > 1. socket.sym
> > 2. odinbbb.sch
> > 3. odinbbb.sch
> > 4. 12n.sch
> > 5. odinbbb.sch
> >
> >
> > This really isn't very useful! :-)
>
> Are these entries actually referring to files in the directory you listed,
> or do you have identically-named files in different directories? If you
> hover the mouse over the menu item, you will get a tooltip showing the full
> path.
>
Ah, I hadn't seen the tooltip. It turns out that the 'Open Recent'
list includes files in different directories which don't even exist
any more. So the names are right, it's not showing backup files, it
was just bad luck that there were similar looking names (and numbers
of files) in the same directory.
> Did you do anything unusual, such as opening the backup file directly in the
> editor, or moving the file to another directory and opening it there?
>
I have moved some files around while rationalising my directory
structure.
> > While I'm at it why are there both xxxxx.sch~ and #xxxxx.sch# files?
>
> Files with a trailing tilde are backup files, while files with a leading and
> trailing number sign are autosave files which are used to recover the
> work-in-prgoress in case something went wrong.
>
When are backup files created?
> > Plus, while I'm at it, # is a really rubbish character to use because
> > it's the comment marker in most (Unix/Linux) shells.
>
> This is the usual naming convention for autosave files on POSIX systems.
>
OK, I've not come across it before, and I have been using/programming
on Unix systems since the 1980s! :-)
> In the unusual case that you need to specify the name of an autosave file to
> a shell, there are multiple ways to do so: the comment character is only
> interpreted at the beginning of a word, so you can give the file name as
> ./#foo.sch#, or you could just escape the character or the whole file name
> according to your shell's escaping mechanism, like \#foo# or '#foo#'.
>
Yes, I'm familiar with shell quoting etc. but something that forces
you to use it *by design* seems not a good idea to me. However as it
does seem to be a convention I'll live with it and not complain. :-)
I do think that the 'Open Recent' list could do with some improvement
though, e.g. it could check for duplicates and/or if there are any
indicate different directories.
Thanks for the very full and helpful explanation.
--
Chris Green
- Raw text -