Skip to main content


@screwlisp @Judy Anderson
I've been looking to migrate more of my workflow into emacs, in this particular case I'm looking to moo via emacs which I believe you both do?

I believe @screwlisp has mentioned using rmoo, but the only repo I found for that hasn't been updated in over a decade. Is there something more recent I'm not aware of?

in reply to screwlisp

@screwlisp Ohh... glad to see they've moved off of GitHub, though they don't seem to play well with my VPN.
in reply to Jonathan Lamothe

I can offer you the moo.el I use, it started out as something by Pavel and/or wRog and was recently updated by KMP for Emacs 29. Randomly looking at some comments I see references to williams.edu making me think that JoeFeedback had a hand in it as well.

download at olum.org/yduj/moo.el

".moo_worlds" file format:

/def settype
/settype MOO
/addworld LambdaMOO lambda.moo.mud.org 8888

screwlisp reshared this.

in reply to Judy Anderson

@Judy Anderson @screwlisp Hmm... I'm still using Emacs 28. I should really think about getting onto that upgrade to Debian 13.
in reply to Judy Anderson

I kinda think the version of moo.el that I have will automatically add LambdaMOO when you load moo.el if you don't have a .moo_worlds. I think you only need that if you have more worlds. YMMV, but try pulling moo.el into emacs and searching for 8888 to see the logic that I think is probably doing this. (I didn't track back to see where 'file' is getting its value, but I assume it's .moo_worlds because I don't have a .moo_worlds and somehow LambdaMOO is pre-defined.)

Also, you can, if you prefer, use the mud-add-world function from your .emacs (possibly multiple times with different hosts) to avoid a .moo_worlds. Whether that file is a help or hindrance is a personal taste issue. This is what my .emacs says, right after loading moo.el. It adds MOOsaico, a multilingual MOO in Portugal that I helped program (3 decades ago):

(mud-add-world "MOOsaico" "" "" "moosaico.moo.mud.org" 8888
(intern-soft "MOO" mud-types) t)

screwlisp reshared this.

in reply to Jonathan Lamothe

if you want a very lazy solution, Comint mode allows TCP connections (and supports things like history and word navigation). Obviously no fancy features, but it beats telnet!

I can't remember the exact function, I think its "(make-comint 'moo '(ADDRESS . PORT))"

in reply to Jonathan Lamothe

mud-mcp.el
wrog.net/emacs/#mud-mcp

is what I use. The main advantages of it:

(1) MCP support if you care about that (matters more for JHCore, which enables MCP by default... I think an MCP implementation *does* exist at LambdaMOO)

(2) it is a very thin layer on top of comint.el (what all of the other terminal modes in Emacs use under the hood -- meaning if you're used to the shell and telnet modes, this works the same way and you get all of the various features without having to do any work + it's actively maintained as part of the core Emacs distribution)

This entry was edited (2 days ago)

reshared this

in reply to Roger Crew✅❌☑🗸❎✖✓✔

@Roger Crew✅❌☑🗸❎✖✓✔ @Judy Anderson @screwlisp I've got this one working, though I had do a little finessing to get it to installed. Now I need to see if my elisp knowledge is sufficient to customize it in a manner similar to how I'd customized TF.
in reply to Jonathan Lamothe

> had do a little finessing to get it to installed

out of curiosity: what was the problem?

Is it that I didn't make a (M)ELPA package out of it? (nobody just drops things in their ./emacs directory anymore?)

or some other issue?

screwlisp reshared this.

in reply to Jonathan Lamothe

ok, so the answer is indeed
"nobody just drops things in their ./emacs directory anymore"

(really, that's all it's supposed to be.

well okay, that plus
M-x load-library mud-mcp

which is the old-school way of doing things)

(wRog needs to learn MELPA. Film at 11.)

screwlisp reshared this.

in reply to Roger Crew✅❌☑🗸❎✖✓✔

@Roger Crew✅❌☑🗸❎✖✓✔ @Judy Anderson @screwlisp It essentially already was a valid ELPA package with the mentioned exception.

I'm currently in the process of adding my own custonizations. I've added a rudimebtary shim that processes lines entered bu the user so that it can support commands that get processed on the client side.

Here's an excerpt:

(require 'mud-mcp)
                                                                                 (defun lambdamoo ()
  "Connect to LambdaMOO"
  (interactive)
  (mud-mcp-connect "LambdaMOO" "lambda.moo.mud.org" 8888)
  (setq lambdamoo-send-line comint-input-sender
        comint-input-sender #'lambdamoo-process-line))

(defconst lambdamoo-commands
  '(("send" . lambdamoo-send)
    ("test" . lambdamoo-test))
  "Command functions")

(defvar lambdamoo-send-line nil
  "The function that is called to send a line to the server")

(defun lambdamoo-process-line (proc str)
  "Process input sent by the user"
  (if (string-prefix-p "/" str)
      (lambdamoo-process-command proc str)
    (funcall lambdamoo-send-line proc str)))

(defun lambdamoo-process-command (proc str)
  "Process a command"
  (let* ((words (split-string str))
         (command (string-trim-left (car words) "/"))
         (found (assoc (downcase command)
                       lambdamoo-commands
                       #'string=))
         (func (and found (cdr found))))
    (if func
        (funcall func proc str)
      (message "Command '%s' not found." command))))

After I wrote all this, I found comments in the file detailing how to add functionality.

Is there a more "proper" way I could've done this?

Shannon Prickett reshared this.

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.