If you want to use FFAP (find-file-at-point) in ruby-mode you can add this to your .emacs
(defvar ruby-program-name "ruby")
(defun ruby-module-path(module)
(shell-command-to-string
(concat
ruby-program-name " -e "
"\"ret=’()’;$LOAD_PATH.each{|p| "
"x=p+’/'+ARGV[0].gsub(’.rb’, ”)+’.rb’;" [...]
Filed under: Emacs on May 4th, 2008 | 2 Comments »
To anyone interested my extensive Emacs configuration is available here :
http://code.google.com/p/chmouel/source
And here is the usual screen shot :
Filed under: Emacs on September 7th, 2007 | 1 Comment »
This is a annoying, even if it take 5mn to code thing like that :
(defun my-dired-rm-rf()
"Rm -rf directories"
(interactive)
(let ((sel (selected-window)))
(dolist (curFile (dired-get-marked-files))
(if (yes-or-no-p (concat "Do you want to remove \"" (file-name-nondirectory curFile) "\" ? "))
(progn
(shell-command (concat "rm -rvf " curFile)
"*Removing Directories*")
(kill-buffer "*Removing Directories*")
(select-window sel)
(revert-buffer)
)
))
))
you [...]
Filed under: Emacs on February 11th, 2007 | No Comments »
I wanted to try the latest cvs snapshot with XFT support, since i did not want to screw up more my workstation i have used packages instead of make install blindy.
Basically i have a script called ./build.sh
#!/bin/bash
set -e
d=$(date ‘+%Y%m%d’)
debpatch=20061218-1
mkdir -p cvs
pushd cvs >/dev/null && {
cvs -Q -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co -r emacs-unicode-2 emacs
} && popd >/dev/null
mkdir [...]
Filed under: Emacs on January 21st, 2007 | 7 Comments »
To rename bunch of files via regexp i was using before a homegrown python script call rename-regexp.py to change bunch of files with a regexp.
But since then i discovered wdired which is pretty fantastic to use that from emacs. With the extended “query-replace-regexp“ from Emacs22 stuff are much easier to rename.
Filed under: Emacs on January 6th, 2007 | No Comments »
Classic my first webpage is still on the web that was back in 98 and that was about Emacs
http://membres.lycos.fr/crblinux/html/xemacs.html
It is in french thought.
Filed under: Emacs on December 30th, 2006 | No Comments »
If you want to emulate Control-L in Eshell (the Emacs Shell) like in Xterm, you can use this :
(defun eshell-show-minimum-output ()
(interactive)
(goto-char (eshell-beginning-of-output))
(set-window-start (selected-window)
(save-excursion
(goto-char (point-max))
(line-beginning-position)))
(eshell-end-of-output))
And add a key bind to it in [...]
Filed under: Emacs on December 27th, 2006 | No Comments »
Here is a simple html derived mode for Cheetah templates files. The font-locking regexp can be improved thought but that’s a start.
(define-derived-mode cheetah-mode html-mode "Cheetah"
(make-face ‘cheetah-variable-face)
(font-lock-add-keywords
nil
‘(
("\\(#\\(from\\|else\\|include\\|set\\|import\\|for\\|if\\|end\\)+\\)\\>" 1 font-lock-type-face)
("\\(#\\(from\\|for\\|end\\)\\).*\\<\\(for\\|import\\|if\\|in\\)\\>" 3 font-lock-type-face)
("\\(\\$\\(?:\\sw\\|}\\|{\\|\\s_\\)+\\)" [...]
Filed under: Emacs, Python on July 31st, 2006 | 1 Comment »
Here is some function to launch a gajim window from Emacs :
(defvar gajim-remote "/usr/bin/gajim-remote")
(defvar gajim-user-list ())
(defun my-gajim-get-list()
(save-excursion
(with-temp-buffer
(call-process gajim-remote nil t nil "list_contacts")
(goto-char (point-min))
(while (re-search-forward "^jid[ ]*:[ ]*\\(.*\\)$" (point-max) t )
[...]
Filed under: Emacs, Programming on July 31st, 2006 | No Comments »