doublep / logview

Emacs mode for viewing log files
GNU General Public License v3.0
153 stars 18 forks source link

Warning when logview.views file is missing #14

Closed tylercal closed 7 years ago

tylercal commented 7 years ago

If I don't have a logview.views file, I expect no problems, but I always get this warning:

Warning (emacs): Opening input file: no such file or directory, /home/telliott/.emacs.d/logview.views

It seems that (file-missing) is not catching and I'm falling through to (file-error (warn "%s" (error-message-string error)))

GNU Emacs 24.4.1

doublep commented 7 years ago

Strange, I cannot reproduce this. I.e. even if I delete my logview.views before the mode is even loaded, I properly get no views and no warnings.

Are you sure you have the latest version 0.7.1? What is your Emacs version? What is the result of evaluating

(condition-case err (insert-file-contents "hfipghdsfpgi") (file-missing) (file-error (error "WTF")))

in a modifiable buffer? Does .emacs.d directory exist?

doublep commented 7 years ago

0.7, not 0.7.1 of course.

tylercal commented 7 years ago

Yes, running latest logview lib (0.7) with GNU Emacs 24.4.1

result of evaluating test line: WTF

~/.emacs.d does exist and if I touch logview.views there, I can launch emacs with no warning.

doublep commented 7 years ago

Yeah, according to documentation, file-missing is new in Emacs 26.

doublep commented 7 years ago

Can you please test if the committed fix works?

tylercal commented 7 years ago

verified fixed, thanks!