-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config parser complains over temp file created by Emacs #5061
Comments
Symlinks should be followed, that feature request was implemented a while ago. Other than that the format is still valid, even for hidden files on Linux-based systems. How exactly does such a file and its attribute look like? Please show the output of
|
This kind of feels like an oversight in Emacs. Icinga really only does what it's being told to, i.e. to include all files whose names match the pattern "*.conf". I'm uncertain whether we should work around this issue in Icinga. At the same time I'm also wondering whether other applications (e.g. Apache) show similar behavior. Vim has enough foresight to use the '.swp' extension for its temporary files, probably to avoid this exact same problem. In the meantime http://stackoverflow.com/questions/151945/how-do-i-control-how-emacs-makes-backup-files has a workaround for this, i.e. to use a different directory for those temporary files. |
@dnsmichi here's the ls:
Maybe the ".conf" regex should be interpreted as any file ending in .conf and not starting with a dot (kinda [^\.] or something like this). The convention of using . as a first character for hidden files may apply quite well in this respect as I'd expect a sysadmin to not hide configuration files inside /etc... but there may be other habits in strange communities ? ;) I guess there should probably be libs allowing that, and indeed @gunnarbeutner how apache behaves in this case could be woth checking. Thanks for caring. |
Ok, understood. I guess Apache reads "hidden" files too, think of .htaccess and so on. I haven't looked into its source code though. I found another issue on the Logstash tracker which discusses parsing such temporary files: elastic/logstash#2271 Yet I'm not certain how one could workaround that emacs specific file type. It might be worthwhile to check whether emacs can be configured to use a different suffix for temporary files. Or specifically use a different backup location. |
FWIW I'm strongly opposed to adding editor-specific workarounds. |
I'd say users should be able to change the auto-save/backup file location, like described here: http://ergoemacs.org/emacs/emacs_set_backup_into_a_directory.html Such files might also affect backups and other applications, and instead of tinkering with each application having trouble with it, I'd find a way to handle that on a global basis. At least I'd do that on my systems because I dislike such specialities driving me nuts :) |
I've been editing with Emacs a config file within /etc/icinga2/conf.d/hosts/ named esther.conf. This results in a symlink being created there as .#esther.conf until the file is saved.
This results in a crash of the parser when restarting Icinga 2:
I guess such temporary "hidden" lock/temp symlinks should be skipped.
Hope this helps.
The text was updated successfully, but these errors were encountered: