help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elisp question


From: Tim McNamara
Subject: Re: elisp question
Date: Thu, 01 Dec 2005 13:32:02 -0600
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

"N. Raghavendra" <raghu@mri.ernet.in> writes:

> At 2005-11-30T17:13:33-06:00, Tim McNamara wrote:
>
>> I am looking to write a small program for Emacs which will create a
>> new buffer and read a randomly selected text file into it after
>> launching Emacs- rather like yow or fortune, except the files would
>> be Dharma snippets.  ...
>> 
>> The files are in a subdirectory (called kaya)
>
> You could use the `fortune.el' which is part of Emacs, and uses
> fortune(6) to randomly select a cookie.  The relevant init file
> expressions are like this:
>
> (setq fortune-buffer-name "*Dharma*")
> (add-hook 'after-init-hook
>           (lambda ()
>             (fortune (expand-file-name "~/kaya"))))

Thank you, I will look into that further.  I didn't realize that Emacs
had its own fortune program and had errantly thought that the standard
Unix fortune was being called.  Dang- I've been using Emacs for 2-3
years and am still a newbie!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]