Kevin Rodgers | 1 May 2004 01:47
Picon
Favicon

Re: Per-directory customizations?

Roy Smith wrote:
 > In article <4092A276.8060505 <at> yahoo.com>,
 >  Kevin Rodgers <ihs_4664 <at> yahoo.com> wrote:
 >>Why not set compile-command in the mode hook, as suggested in it's doc
 >>string:
 >>
 >>(add-hook 'java-mode-hook
 >>	  (lambda ()
 >>	    (when (string-match "\\`~/dev/foo/" default-directory)
 >>	      (set (make-local-variable 'compile-command)
 >> 
	   "cd ~/dev/foo; ant"))))
 >
 > The problem there, is it only works for java files.  I've got all
 > sorts of files in my project directory tree (html, css, jsp, etc,
 > etc).  I want the compile command tied to the directory tree, not the
 > file type.

The use find-file-hooks instead of jave-mode-hook.

--

-- 
Kevin Rodgers
Johan Bockgård | 1 May 2004 01:54
Picon
Picon

Re: Per-directory customizations?

Kevin Rodgers <ihs_4664 <at> yahoo.com> writes:

> Roy Smith wrote:
>> Kevin Rodgers <ihs_4664 <at> yahoo.com> wrote:
>>> Why not set compile-command in the mode hook, as suggested in it's doc
>>> string:
>>>
>>> (add-hook 'java-mode-hook
>>>       (lambda ()
>>>         (when (string-match "\\`~/dev/foo/" default-directory)
>>>           (set (make-local-variable 'compile-command)
>>>        "cd ~/dev/foo; ant"))))
>>
>> The problem there, is it only works for java files. I've got all
>> sorts of files in my project directory tree (html, css, jsp, etc,
>> etc). I want the compile command tied to the directory tree, not
>> the file type.
>
> The use find-file-hooks instead of jave-mode-hook.

There is another way, using

(setq compile-command
      '<lisp expression that evaluates to a string>)

like

(setq compile-command
      '(cond ((string-match "\\`~/dev/foo/" default-directory)
	      "cd ~/dev/foo; ant")
(Continue reading)

Kin Cho | 1 May 2004 02:11
Favicon

Re: Per-directory customizations?

Kevin Rodgers <ihs_4664 <at> yahoo.com> writes:

> Roy Smith wrote:
>  > In article <4092A276.8060505 <at> yahoo.com>,
>  >  Kevin Rodgers <ihs_4664 <at> yahoo.com> wrote:
>  >>Why not set compile-command in the mode hook, as suggested in it's doc
>  >>string:
>  >>
>  >>(add-hook 'java-mode-hook
>  >>	  (lambda ()
>  >>	    (when (string-match "\\`~/dev/foo/" default-directory)
>  >>	      (set (make-local-variable 'compile-command)
>  >> 	   "cd ~/dev/foo; ant"))))
>  >
>  > The problem there, is it only works for java files.  I've got all
>  > sorts of files in my project directory tree (html, css, jsp, etc,
>  > etc).  I want the compile command tied to the directory tree, not the
>  > file type.
> 
> The use find-file-hooks instead of jave-mode-hook.

This won't work if he uses dired, gnus, man, etc... while in
~/dev/foo/.

-kin
Joe Corneli | 1 May 2004 02:51
Picon
Favicon

Re: How to *completely* disable font-lock mode in my .emacs?


   AFAIK, X resources aren't used on a text-terminal.

Hm, well I nevertheless have good results both under X and on a
terminal, and moreover, in the case of a terminal, the background
can be either dark or light background, and Emacs adjusts the
*default* face accordingly.  The font lock setup I use is optimized
for a dark background, including plenty of yellow etc., so I don't
really advise using it on a terminal with a light background unless
you have to.

I should probably have posted this little .emacs snippet too, which
is useful in combination with the .Xdefaults config.  This is only
relevant under X; its purpose is to keep flickering at startup time
down to a minimum.

(Cf. http://mail.gnu.org/archive/html/help-gnu-emacs/2004-02/msg00757.html)

(cond (window-system
       (setq default-frame-alist
             '((internal-border-width . 2)
               (border-width . 2)
               (left-fringe . 0)
               (right-fringe . 0)
               (menu-bar-lines . 0)
               (tool-bar-lines . 0)
               (tool-bar-lines . 0)
               (modeline . t) 
               (width . 85) 
               (height . 32)
(Continue reading)

Don Saklad | 1 May 2004 07:12
Picon
Picon

How to convert an attachment to plain text ascii

Would any of you nice folks out there convert an attachment to plain text ascii ?...
Kai Grossjohann | 1 May 2004 11:42
Picon

Re: define Info's "dir"?

gebser <at> speakeasy.net writes:

> I'm not the original poster, but I'd like to be able to set the default 
> directory interactively and change it from time to time.  The motivation 
> is that I sometimes work on a project whose (multiple) files all reside, 
> or will reside, in a particular directory (or subdirs of it.  As a 
> fictional example, suppose I'm working on economics today.  Throughout 
> the day I create several files which I want to have in econ/national/, 
> econ/state/, econ/local/, and econ/international.  In this case I'd want 
> the default directory to be /home/ken/projects/writings/politics/econ/ 
> but wouldn't want to have to type that in every time I visit a file.  
> I'm aware of "M-x cd" but this sets "default-directory" only for that 
> buffer.  I'd like a function (defun in emacspeak, yes?) which is global, 
> i.e., sets the default-directory no matter which buffer I'm currently 
> visiting.  Is there such a nicety?

(setenv "econ" "/home/ken/projects/writings/politics/econ")

Then C-x C-f $econ/foo RET.

You can also always use $x and redefine it depending on your work
context.

Kai
Kai Grossjohann | 1 May 2004 11:44
Picon

Re: keypad.el wierdness in CVS emacs?

mecklen <at> realmsys.com (Robert Mecklenburg) writes:

> I'm running a recent cvs emacs and the keypad keys act strangely when
> shifted:
>
> C-h c                 ;; describe key
> <S-kp-7>              ;; shifted kp-7
> 7 (translated from <S-kp-7>) runs the command self-insert-command

If there is no binding for S-<foo> where <foo> is a function key, then
Emacs will use the binding for <foo> instead.

This means that just doing

(global-set-key (kbd "S-<kp-7>") 'forward-char)

will change what C-h c S-<kp-7> will do!

Why does Emacs do such strange things?  So that people can hit C-f
even if CapsLock is on.

Kai
Micha Feigin | 1 May 2004 18:12
Picon
Picon

Re: FVWM mode ?

On Fri, Apr 30, 2004 at 08:49:46AM +0200, Xavier Maillard wrote:
> Hi,
> 
> I am  having fun with the  window manager FVWM.  The configuration files
> of this WM are quite unreadable without font-lock.
> 
> I am looking for an Emacs mode to edit/read this files.
> 
> Are you aware of something working under Emacs20/21 ?
> 

There is a mode I found somewhere on the net which is ok. Find it
attached. Otherwise shell script mode is usually adequate.

> Thank you.
> -- 
> GnusFR  (http://www.gnusfr.org)
> EmacsFR (http://www.emacsfr.org)
> 
> .emacs: Because customisation is fun!
> 
> 
> 
> 
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs <at> gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
>  
>  +++++++++++++++++++++++++++++++++++++++++++
(Continue reading)

It's me FKtPp ; | 1 May 2004 19:56
Picon
Favicon

Re: FVWM mode ?

Micha Feigin <michf <at> post.tau.ac.il> writes:

> On Fri, Apr 30, 2004 at 08:49:46AM +0200, Xavier Maillard wrote:
> > Hi,
> > 
> > I am  having fun with the  window manager FVWM.  The configuration files
> > of this WM are quite unreadable without font-lock.
> > 
> > I am looking for an Emacs mode to edit/read this files.
> > 
> > Are you aware of something working under Emacs20/21 ?
> > 
> 
> There is a mode I found somewhere on the net which is ok. Find it
> attached. Otherwise shell script mode is usually adequate.

(require 'generic-x) <-- this maybe useful
Aliesha Finkel | 1 May 2004 20:47
Picon
Favicon

syntax highlighting question

Hi, I'd like to make a new region to syntax highlight
similar to C-style comments.  I'd like to start it
with
// DBG
and end it with
// GBD

Everything in-between I'd like to set to some color. 
I'm a newbie to emacs customization, does anyone know
off-hand if this can be done in emacs, or are things
like C-style comments hardcoded somewhere?

Thanks in advance.

	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

Gmane