[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bauke Jan Douma
08 Sep 2003 01:20:28 GMT
I am trying to get a list of currently open files in emacs, by
sending it SIGUSR1 (signo=10). I have the following defines:
(defvar emacs-open-files "/root/emacs/.emacs-open-files" "List of files
currently open in Emacs")
(defun list-emacs-open-files ()
(message "list-emacs-open-files: done")
(buffer-file-name (car buf_list))
(insert (buffer-file-name (car
(setq buf_list (cdr buf_list))
(add-hook `signal-USR1-hook `list-emacs-open-files nil nil)
Alas, it doesn't work. It does work from within emacs by
calling M-x list-emacs-open-files or by eval'ing
(signal-process (emacs-pid) 10).
When doing kill -USR1 <emacs-pid>, all that happens is I get a
visual bell, the file is not written.
An strace reveals that the signal is sent allright.
I am doing something wrong, but what?
- signal-USR1-hook woes,
Bauke Jan Douma <=