Hey, I need some help, how I can write a simple lisp code which ask
for a value, after store in a variable, indeed I want to the value is
concatenate to an url, I have the following:
which found on google:
(defun search-word ()
(interactive)
(browse-url
(concat "http://foo.bar.foobar/index.php?search="
(thing-at-point 'word))))
but this is only with the word at point, I want ask a word, any help?
thanks
From: Maciej Katafiasz
Subject: Re: Newbie question, store some in a variable
Date:
Message-ID: <fh2eac$k4n$1@news.net.uni-c.dk>
Den Fri, 09 Nov 2007 11:45:27 -0800 skrev someusernamehere:
> Hey, I need some help, how I can write a simple lisp code which ask for
> a value, after store in a variable, indeed I want to the value is
> concatenate to an url, I have the following:
This group concerns itself with Common Lisp, whereas your code is about
details of Emacs Lisp and its user interaction. Head over to comp.emacs
Cheers,
Maciej
On Nov 9, 2:01 pm, Maciej Katafiasz <········@gmail.com> wrote:
> Den Fri, 09 Nov 2007 11:45:27 -0800 skrev someusernamehere:
>
> > Hey, I need some help, how I can write a simple lisp code which ask for
> > a value, after store in a variable, indeed I want to the value is
> > concatenate to an url, I have the following:
>
> This group concerns itself with Common Lisp, whereas your code is about
> details of Emacs Lisp and its user interaction. Head over to comp.emacs
Well, and hot to do this in common lisp???
From: Maciej Katafiasz
Subject: Re: Newbie question, store some in a variable
Date:
Message-ID: <fh2hk9$k4n$3@news.net.uni-c.dk>
Den Fri, 09 Nov 2007 12:07:38 -0800 skrev someusernamehere:
>> This group concerns itself with Common Lisp, whereas your code is about
>> details of Emacs Lisp and its user interaction. Head over to comp.emacs
> Well, and hot to do this in common lisp???
Mu.
CL doesn't have the concept of point, interactive functions, and the
concept of "user input" is rather vague as well.
Cheers,
Maciej
someusernamehere <················@gmail.com> writes:
> On Nov 9, 2:01 pm, Maciej Katafiasz <········@gmail.com> wrote:
>> Den Fri, 09 Nov 2007 11:45:27 -0800 skrev someusernamehere:
>>
>> > Hey, I need some help, how I can write a simple lisp code which ask for
>> > a value, after store in a variable, indeed I want to the value is
>> > concatenate to an url, I have the following:
>>
>> This group concerns itself with Common Lisp, whereas your code is about
>> details of Emacs Lisp and its user interaction. Head over to comp.emacs
>
> Well, and hot to do this in common lisp???
What OS are you using? Which Common Lisp? Are you using a GUI?
The following should work with CLISP, no GUI, Firefox as the browser,
and Google as the search engine.
(setf *browser* :firefox)
(defun search-word ()
(format *query-io* "~&Find: ")
(finish-output *query-io*)
(let ((line (read-line *query-io* nil nil)))
(when line
(let ((url (concatenate 'string "http://www.google.com/search?q=" line)))
(browse-url url)))))
--
Barry Fishman
In article <························@i13g2000prf.googlegroups.com>,
someusernamehere <················@gmail.com> wrote:
> Hey, I need some help, how I can write a simple lisp code which ask
> for a value, after store in a variable, indeed I want to the value is
> concatenate to an url, I have the following:
>
> which found on google:
>
> (defun search-word ()
> (interactive)
> (browse-url
> (concat "http://foo.bar.foobar/index.php?search="
> (thing-at-point 'word))))
>
> but this is only with the word at point, I want ask a word, any help?
>
>
> thanks
Looks like Emacs Lisp, right?
-> gnu.emacs.help