Saturday, June 26, 2004

The Remembrance Agent

The Remembrance Agent, remem, sounds really interesting.

I think the only way I'm ever going to get into Emacs is to immerse myself in it, use it for my shell, ftp client, news and mail reader (although I'll still need Outlook at work, but maybe I can copy all my email in plaintext to a repository which remem could access). Remem might convince me to do just this, as it's real power would be to bring all those things together.

One significant challenge is that this will be under Windows, running cygwin. I carry a Windows XP system, it only makes since that I'd try to make it work there.

I'll let you know how it goes.

5 comments:

Jesus Henry Christos said...

i might be mistaken, but i think remem is incompatible with the latest emacs. it does seem quite cool though.

i think learning emacs is a two-pronged affair: 1.) learning tips and tricks from other users or a mentor, and 2.) learning how to program in elisp. other than that, it's just learning some keybindings, and if you use bash in non-vi mode, most of those keybindings are they same. 'C-h b' will give you all the keybindings in the current mode.

as far #1 goes, i think you should try to learn how to create, edit, and save keyboard macros, b/c they are great. also, working with rectangles is pretty cool. some people really like using registers, but they never did it for me. if you don't have anybody to learn from, the emacs info file has all this documented pretty well: hit 'C-h i', move the cursor over the entry that says 'Emacs' and either hit return on it or middle click it. then look for the topic you want to learn and do the same. if you don't like the Info browser, the documentation is available in HTML form here http://www.gnu.org/software/emacs/manual/emacs.html

#2: there's an elisp tutorial that's pretty good. i don't think that it comes standard as part of emacs 21.3, but you can get it from http://www.gnu.org/software/emacs/emacs-lisp-intro/.

oh, the other big thing is finding help from within emacs. if you want to see the documentation for an elisp function, hit 'C-h f', type in the function name, and then hit return. you'll see the documentation of the function, and as long as the function isn't a built-in primitive, you can hit return/middle click the definition location and you will jump to the elsip code defining the function. (that is, it will say, 'function' is a compiled lisp function defined in 'location'. that location is a hyperlink to the actual code).

another help function is the apropos system. 'C-h a', then type in the name or partial name of the function you are thinking of. this is helpful if you want to use a function, but you can't really remember the full name, so you can just put in a regex and it'll find it for you. if you want to search by function description instead of function name, 'M-x apropos-documentation' and type in a word you would expect to be in the function's documentation and it will bring up the choices.

but i really really encourage learning from a mentor. watch how they use/customize emacs and ask them how they do certain things. the big thing to realize is that everything is bound to elisp functions. you can call these functions using M-x if the functions are defined as being 'interactive'. if not, then you have to evaluate an elisp expression (either by typing the sexp into a buffer and hitting 'C-x e' after the closing paren, or by 'M-: [type your lisp sexp here]').

(if you are going to program in perl, check this: http://www.khngai.com/emacs/perl.php)

good luck,
jhc
comptroller, rush limbaugh sucks club of greater poughkeepsie metropolitan area.

Jordan Henderson said...

Thanks for the pointers. Unfortunately, none of the emacs users I know work where I work, so I'm going to have to mentor myself.

I love keyboard macros and use them in vile, my currently favorite vi-like editor, so I can see where I should concentrate on this.

I do use perl and I'll check that out. I'm trying to use Scheme for some scripting, which is why I'm coming back to Emacs. I think the editor support for s-expression editing will be good in emacs. I will try to pickup some emacs lisp while I'm at it.

One problem is that I'm still using a VMS system sometimes and I've never taken the time to get the old emacs that runs on VMS going over there. Maybe someone has ported a more recent version, but they were stuck at 19.x something and the installation procedure was daunting, from what I remember. Someone was porting a more recent emacs to VMS awhile back, but I think they lost steam.

Jesus Henry Christos said...

i remember having a somewhat difficult time getting win-native emacs talking to my scheme interpreter so that i could evaluate scheme sexps from within emacs (i was using plt scheme's interpreter).

there's probably a way to get it to work, but i was sick of futzing with it, so i ended up using cygwin-native emacs under cygwin's xfree and it worked fine. perhaps you will have better luck though.

jhc.

Jordan Henderson said...

I'm using cygwin emacs, so maybe I'm in luck here.

Cygwin inetutils needs HOME set and so does win-native emacs and I don't think they can be the same, so I settled on cygwin emacs. I use cygwin inetutils so I can have a reasonable shell with PuTTY on the machine. I don't much care for either rxvt or the default cygwin console.

Thanks again!

Jordan Henderson said...

Oh, and I went looking and there appears to be an emacs-21.2 that someone ported to VMS now... and the installation looks a lot simpler than that old 19.x that used to be available, so maybe I'm in luck there, too.