Flutterby™! : Emacs Q

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

Emacs Q

2010-08-20 22:36:12.187226+00 by Dan Lyke 3 comments

In the wake of setting up a web site for aggregating information about Petaluma, PetalumaOpen.com, and a few requests to slap up some simple editable sites, I decided to move Flutterby.net back from my home-written system to MediaWiki.

I was impressed by the speed enhancements, the WYSIWYG FCKeditor extension, and the flexibility and speed of the new MediaWiki API, which let me upload my articles with just a little bit of Perl.

And Mediawiki.el is now fast enough to be usable (I suspect largely due to the API). Yay Mark!

Which leads me to my question: What parameters do I send to emacs to make it open one of my wiki pages on startup? I can write a bit of Lisp to do this, but --script skips my ~/.emacs.d/init.el code and then exits.

I suppose I could have my "upload these pictures and create a new blog entry" script alter the init, but that seems even more annoying.

[ related topics: Weblogs Perl Open Source ]

comments in ascending chronological order (reverse):

#Comment Re: made: 2010-08-21 18:01:31.379226+00 by: Mark A. Hershberger

From the info file for Emacs: http://www.gnu.org/software/em...l/html_node/emacs/Init-File.html

There can also be a default init file, which is the library named default.el, found via the standard search path for libraries. The Emacs distribution contains no such library; your site may create one for local customizations. If this library exists, it is loaded whenever you start Emacs (except when you specify ‘-q’). But your init file, if any, is loaded first; if it sets inhibit-default-init non-nil, then default is not loaded.

So, since I have ~/.emacs.d/lisp in my load-path, I put a file named default.el there that will be automatically executed.

#Comment Re: made: 2010-08-21 18:06:14.715226+00 by: Mark A. Hershberger

Hrm... but that probably won't do what you want, either.

Use (server-start) in your startup file and then, in your "upload these pictures ..." script, make sure you already have emacs running and use emacsclient to do what you need.

That way, you can have the environment set up the way you want and can execute arbitrary code via emacsclient. (don't you know Emacs isn't meant to be shut down? ;)

#Comment Re: made: 2010-08-21 22:02:38.307226+00 by: markd

+1 on never shutting down emacs. At the goog I had a six month emacs uptime with an internal machine slice, running emacs in screen.