Skip to main content
Explained what I want more
Source Link

I want to make it so that I have interactive functions that can only be called from buffers in a certain directory, like variables in .dir-locals.el. Is there a way to do this?

For example, say I'm writing a program that has configuration files. I'd like to be able to invoke M-x new-conf, which will make a new conf file in the same directory as the buffer I invoke it in. However, I only want to be able to call it from buffers in a certain directory.

I want to make it so that I have interactive functions that can only be called from buffers in a certain directory, like variables in .dir-locals.el. Is there a way to do this?

I want to make it so that I have interactive functions that can only be called from buffers in a certain directory, like variables in .dir-locals.el. Is there a way to do this?

For example, say I'm writing a program that has configuration files. I'd like to be able to invoke M-x new-conf, which will make a new conf file in the same directory as the buffer I invoke it in. However, I only want to be able to call it from buffers in a certain directory.

Source Link

How can I make an interactive function be local to directories?

I want to make it so that I have interactive functions that can only be called from buffers in a certain directory, like variables in .dir-locals.el. Is there a way to do this?