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

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

Re: Why is this -batch mode usage coming up with an empty file?


From: Roland Winkler
Subject: Re: Why is this -batch mode usage coming up with an empty file?
Date: Fri, 11 Apr 2014 23:28:20 -0500

On Fri Apr 11 2014 Dan Jacobson wrote:
> Why is this -batch mode usage coming up with an empty file?
> $ cat m.el
> (defun foo ()
>   (bbdb ".")
>   (write-file "*BBDB*"))
> $ emacs --batch -l m.el -f foo
> $ ls -l *BBDB*
> -rw-r--r-- 1 jidanni jidanni 0 04-11 08:22 *BBDB*

It seems that the command write-file is not intended for batch mode.

(defun foo ()
  (bbdb-display-all-records)
  (with-current-buffer (get-buffer bbdb-buffer-name)
    (write-region (point-min) (point-max) "my-bbdb")))



reply via email to

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