all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* -f/--funcall and --batch and keyboard macros
@ 2006-05-03 19:42 Kevin Rodgers
  2006-05-04 14:16 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Rodgers @ 2006-05-03 19:42 UTC (permalink / raw)


etc/NEWS says:

	* Startup Changes in Emacs 22.1
	...
	** The -f option, used from the command line to call a function,
	now reads arguments for the function interactively if it is
	an interactively callable function.

1. Should a command's arguments be read interactively (presumably from
    standard input) when emacs is invoked with --batch?  That seems to be
    what Emacs does.

2. When the function/command is actually a keyboard macro, the commands
    it runs are called interactively even though the keyboard macro
    specifies its arguments.  For example, evaluating this (via --eval or
    --load)

	(fset 'myfunction (kbd "C-x C-f foo.bar RET"))

    followed by --funcall myfunction causes Emacs to prompt with
    "Find file: " when --batch is also specified (but when --batch
    isn't specified, Emacs visits foo.bar as expected).

Thanks,
-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: -f/--funcall and --batch and keyboard macros
  2006-05-03 19:42 -f/--funcall and --batch and keyboard macros Kevin Rodgers
@ 2006-05-04 14:16 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2006-05-04 14:16 UTC (permalink / raw)
  Cc: emacs-devel

    1. Should a command's arguments be read interactively (presumably from
	standard input) when emacs is invoked with --batch?  That seems to be
	what Emacs does.

It does in fact work to read the arguments from stdin.  And if the
command needs to read arguments, it needs to read them _somehow_ in
this case.

Overall I think that it is correct to read the arguments from stdin.

    2. When the function/command is actually a keyboard macro, the commands
	it runs are called interactively even though the keyboard macro
	specifies its arguments.  For example, evaluating this (via --eval or
	--load)

	    (fset 'myfunction (kbd "C-x C-f foo.bar RET"))

	followed by --funcall myfunction causes Emacs to prompt with
	"Find file: " when --batch is also specified (but when --batch
	isn't specified, Emacs visits foo.bar as expected).

That case is clearly a bug.  I think I have fixed it.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-04 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-03 19:42 -f/--funcall and --batch and keyboard macros Kevin Rodgers
2006-05-04 14:16 ` Richard Stallman

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.