* Geosoft File Finder
@ 2006-08-24 20:59 Johan Josefsson
0 siblings, 0 replies; only message in thread
From: Johan Josefsson @ 2006-08-24 20:59 UTC (permalink / raw)
Hi all,
I have some trouble getting Geosoft File Finder working
(http://geosoft.no/development/emacs.html#File Finder). The actual
short snippet of code is attached at the end of this post.
>From the explanation written on the site it should work something like this:
1) A keyword is defined, in my case "Java".
2) This keyword is associated with a location, in my case "D:/archive/code".
3) The function then uses autocompletion in the minibuffer to give the
correct path based on the keyword.
Example:
"Ja<SPC>" should complete into "D:/archive/code", in minibuffer.
That is at least how I read the explanation on their site.
However, when trying to use the code (w32 emacs 21.3 and 22.0), the
only thing that happens is that I get a [No Match] when pressing
space after typing "Ja". I also tried binding it to F5 to rule out
that it had something
to do with the specific key choosen, with no luck.
So, any ideas what I do wrong here?
//Johan
File Finder code:
(defun geosoft-parse-minibuffer ()
;; Extension to the complete word facility of the minibuffer
(interactive)
(backward-char 4)
(setq found t)
(cond
; local directories
((looking-at "..cd") (setq directory "c:/users/john/"))
((looking-at ".doc") (setq directory "c:/users/john/documents/"))
((looking-at "java") (setq directory "c:/users/john/src/java/"))
(t (setq found nil)))
(cond (found (beginning-of-line)
(kill-line)
(insert directory))
(t (forward-char 4)
(minibuffer-complete))))
Used with:
(define-key minibuffer-local-completion-map " " 'geosoft-parse-minibuffer)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-24 20:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-24 20:59 Geosoft File Finder Johan Josefsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).