all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* a little .emacs, like .htaccess, for subdirectories
@ 2002-04-10 10:14 Dan Jacobson
  2002-04-10 16:28 ` Kevin Rodgers
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Jacobson @ 2002-04-10 10:14 UTC (permalink / raw)


Well, Apache has .htaccess files for each directory tree, etc.  Any
way to get a already running emacs to know that I want certain options
in effect when I am in this directory, and other options in effect
when I am in that directory?  Sure there are local file variables, but
that is only for one file.

And what about a *compilation* buffer?  I don't think you are going to
get any local variables in there.

Currently my .emacs does
(add-hook 'compilation-mode-hook
           (function (lambda ()
	      (toggle-read-only 1);else I often edit it because it
				  ;looks like my makefile
	      (toggle-truncate-lines); few docs for this
	      (define-key compilation-mode-map "q" 'quit-window))))

I was hoping to have toggle-truncate-lines be in effect in some
directories only.  Must I make some big conditional deal right there
in the hook, having to list which directories I want this on in... or
can I one day maybe have a "little .emacs", say read by emacs the
first time it visits a file in a directory, with items only
applicable to files in that directory... and if I change the little
.emacs, I would tell emacs to re digest it, unless I have autochecking on...

Hmmm, this probably is too much of an agglutination of an idea.
-- 
http://jidanni.org/ Taiwan(04)25854780

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: a little .emacs, like .htaccess, for subdirectories
  2002-04-10 10:14 a little .emacs, like .htaccess, for subdirectories Dan Jacobson
@ 2002-04-10 16:28 ` Kevin Rodgers
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2002-04-10 16:28 UTC (permalink / raw)


Dan Jacobson wrote:
> 
> Well, Apache has .htaccess files for each directory tree, etc.  Any
> way to get a already running emacs to know that I want certain options
> in effect when I am in this directory, and other options in effect
> when I am in that directory?  Sure there are local file variables, but
> that is only for one file.

Does http://www.lickey.com/env/elisp/dirvars.el do what you want?

> And what about a *compilation* buffer?  I don't think you are going to
> get any local variables in there.
> 
> Currently my .emacs does
> (add-hook 'compilation-mode-hook
>            (function (lambda ()
>               (toggle-read-only 1);else I often edit it because it
>                                   ;looks like my makefile
>               (toggle-truncate-lines); few docs for this
>               (define-key compilation-mode-map "q" 'quit-window))))
> 
> I was hoping to have toggle-truncate-lines be in effect in some
> directories only.  Must I make some big conditional deal right there
> in the hook, having to list which directories I want this on in... or
> can I one day maybe have a "little .emacs", say read by emacs the
> first time it visits a file in a directory, with items only
> applicable to files in that directory... and if I change the little
> emacs, I would tell emacs to re digest it, unless I have autochecking on...

I think the tricky thing is that the *compilation* buffer is a process
buffer that's not visiting a file.  Perhaps the
dirvars-hack-local-variables-hook function could be added to
compilation-mode-hook...

-- 
Kevin Rodgers <kevinr@ihs.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-10 16:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-10 10:14 a little .emacs, like .htaccess, for subdirectories Dan Jacobson
2002-04-10 16:28 ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.