unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* eshell functions, what is the magic spell.
@ 2003-10-23  8:46 Steven Wu
  2003-12-03 22:10 ` Kai Grossjohann
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Wu @ 2003-10-23  8:46 UTC (permalink / raw)


Hi all,

I am in the process of switching to eshell, and my experience so far has 
been good, except one thing that I made a function by "(defun 
eshell/vi...) like the one Kai did, but after finding the file, it runs 
viper mode, (hay, that is what vi supposted to do right). The problem is 
that I cannot get the eshell to know my lisp function vi. I put the 
elisp into a file, and load-in in .emacs, and it took no effect. I 
wonder what is the trick to get eshell notics my functions.

thanks.

steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: eshell functions, what is the magic spell.
  2003-10-23  8:46 eshell functions, what is the magic spell Steven Wu
@ 2003-12-03 22:10 ` Kai Grossjohann
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Grossjohann @ 2003-12-03 22:10 UTC (permalink / raw)


Steven Wu <wus@qwest.net> writes:

> I am in the process of switching to eshell, and my experience so far
> has been good, except one thing that I made a function by "(defun
> eshell/vi...) like the one Kai did, but after finding the file, it
> runs viper mode, (hay, that is what vi supposted to do right). The
> problem is that I cannot get the eshell to know my lisp function vi. I
> put the elisp into a file, and load-in in .emacs, and it took no
> effect. I wonder what is the trick to get eshell notics my functions.

I have this:

(defun eshell/vi (&rest args)
  "Invoke vi, flattening the arguments appropriately."
  (funcall 'find-file (apply 'eshell-flatten-and-stringify args)))

(put 'eshell/vi 'eshell-no-numeric-conversions t)

It seems to work without any further setup.  If you copy the above
verbatim, does it also work for you?

What does your, failing, function look like?

Kai

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-03 22:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-23  8:46 eshell functions, what is the magic spell Steven Wu
2003-12-03 22:10 ` Kai Grossjohann

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).