tmedwards / tweego

Tweego is a free (gratis and libre) command line compiler for Twine/Twee story formats, written in Go.
https://www.motoslave.net/tweego
BSD 2-Clause "Simplified" License
124 stars 23 forks source link

Please make it possible for tweego to ignore certain file names #47

Open selden opened 1 year ago

selden commented 1 year ago

Please make it possible for tweego -w to ignore certain file names e.g. those starting with a dot (.) or a hash (#)

I'm using tweego, version 2.1.1+81d1d71 (2020-02-25T07:09:26Z) [windows/amd64]

Is your feature request related to a problem? Please describe.

tweego -w terminates with an error message of the form

error: load common_source\.#gui-common.tw: open common_source\.#gui-common.tw: The file cannot be accessed by the system.

This happens when I'm working with a collection of large Story files. I do not get this error when I'm editing a Story comprised of a single, small file. I use Emacs v28 under Windows 10 Pro 22H2, hence the backslants and the file name starting with a hash: it's an editing backup file.

Edited to add: Looking more closely, the filename shown above starts with a dot (.) and might actually be an Emacs lock file. By default, filenames which start with a dot are supposed to be hidden from the user. It'd be nice if tweego didn't try to process such "hidden" files even if the file's type is one that it normally processes by default (e.g. tw).

Describe the solution you'd like.

It'd be really nice if tweego -w could be told to ignore specific types of file names (e.g. all filenames starting with a hash (#) or dot (.) ) rather than always processing all of the files in a particular directory. (I can't find "ignore" in tweego's documentation. Am I looking for the wrong thing?)

While restarting tweego -w is easy (uparrow, return in its terminal window) it'd be really nice if that weren't necessary.

Edited to add: Although it is supposed to be possible to tell Emacs to put backup and lock files in another directory, I have not been able to accomplish that. Edited again to add: Looking carefully at the directory contents, I actually did manage to do the redirection. Unfortunately Emacs does that by creating a softlink which itself ends in a .tw, so that's no help at all.