help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to reject visiting a file


From: Óscar Fuentes
Subject: Re: How to reject visiting a file
Date: Fri, 12 Dec 2014 16:19:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> Is there a way to error-out when Emacs tries to visit certain file
>> before the file is loaded? I'll like to use a hook that receives the
>> file name and be able to throw an error from there that aborts the
>> operation.
>
> You could define a file-handler for these files.

Yes, that looks like a solution.

For the record, the relevant info is in the Elisp manual:

    Making Certain File Names “Magic”

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]