Christian Szegedy wrote: > It is mainly an emacs question: > I use xemacs (with ruby-mode.el) to edit Ruby files. > > Does someone know how to achieve that each > newly constructed Ruby files have > executable permission. > > (I have modified my .emacs so that it automatically inserts > #!/bin/ruby at the beginning, I would like to avoid the need > for executing chmod manually.) > > Thanks, Christian Would this help? Have a shell script like the one below, call it 'newruby', and then when you want to work on a new ruby file named foo.rb, say "newruby foo.rb" -- I'm sure there is a way to do it within [x]emacs too, but I couldn't tell you offhand. -- Mark #!/bin/sh echo "#!/bin/ruby" > $1 echo >> $1 chmod 755 $1 emacs +3 $1