From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Johan Josefsson" Newsgroups: gmane.emacs.help Subject: Geosoft File Finder Date: Thu, 24 Aug 2006 22:59:40 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156453223 29334 80.91.229.2 (24 Aug 2006 21:00:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2006 21:00:23 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 24 23:00:21 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GGMIv-00007J-Bg for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Aug 2006 22:59:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGMIu-0007cd-DN for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Aug 2006 16:59:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GGMIk-0007c9-Er for help-gnu-emacs@gnu.org; Thu, 24 Aug 2006 16:59:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GGMIg-0007Y3-TQ for help-gnu-emacs@gnu.org; Thu, 24 Aug 2006 16:59:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGMIg-0007Xl-OM for help-gnu-emacs@gnu.org; Thu, 24 Aug 2006 16:59:42 -0400 Original-Received: from [66.249.82.237] (helo=wx-out-0506.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GGMQo-0007LQ-W9 for help-gnu-emacs@gnu.org; Thu, 24 Aug 2006 17:08:07 -0400 Original-Received: by wx-out-0506.google.com with SMTP id i26so657122wxd for ; Thu, 24 Aug 2006 13:59:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=cRr+LQg1hFVbLvZ9qsBKVM7Tiv3Vsj8lNyeoouRMsWT20AWNVUrheiXxjblrXhNXIdmGJ8HOngSs1dlOYiLDKbLBZ78X6DXNWvoZktBzt0MyEHivfBWBpOi4vbDZAxL0GdRsav21wT337BdG3UC0t8LdZo85iwjui3pEeytnx5I= Original-Received: by 10.90.63.16 with SMTP id l16mr488067aga; Thu, 24 Aug 2006 13:59:40 -0700 (PDT) Original-Received: by 10.90.75.13 with HTTP; Thu, 24 Aug 2006 13:59:40 -0700 (PDT) Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36916 Archived-At: 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" 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)