From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: how to do it a command automatically
Date: Sun, 04 Feb 2007 12:52:03 -0700 [thread overview]
Message-ID: <eq5dh4$eqf$1@sea.gmane.org> (raw)
In-Reply-To: <1170516489.691490.18460@p10g2000cwp.googlegroups.com>
collger wrote:
> define this new command, and then ......
>
> (defun print-chinese-date-sh ()
> "A silly way to print current chinese date.\nYou Can add other
> outputs after the 'set-buffer call"
> (interactive) ;become a command
> (save-excursion)
> (calendar)
> (set-buffer (get-buffer "*Calendar*"))
> (calendar-print-chinese-date)
> (kill-buffer-and-window) ;close the calendar, remove it if you want
> )
I think you meant
(save-excursion
(save-window-excursion
(calendar)
...
))
But since OP wants something to run from the shell:
emacs --batch --funcall calendar other-buffer --funcall
calendar-print-chinese-date
--
Kevin Rodgers
Denver, Colorado, USA
next prev parent reply other threads:[~2007-02-04 19:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-03 13:57 how to do it a command automatically kamo
2007-02-03 15:28 ` collger
2007-02-04 19:52 ` Kevin Rodgers [this message]
[not found] ` <mailman.4005.1170618753.2155.help-gnu-emacs@gnu.org>
2007-02-05 15:52 ` collger
2007-02-08 19:41 ` kamo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='eq5dh4$eqf$1@sea.gmane.org' \
--to=kevin.d.rodgers@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.