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

Patch: Fix a Bug in emacspeak-play-auditory-icon



Hi,
Emacs itself deals fine with creating a file in a directory that doesn't exist. For example, if I do C-x C-f ~/test/test.txt <RET>, assuming that I don't have a directory called `test' under `~', everything would go fine and I would only be asked to run `make-directory' so that the directories could be created.
However, with Emacspeak running and with auditory icons turned on, this gets my Emacs into an unrecoverable state, specially when there is only one window.
The reason for this is that `start-process' starts the process in `default-directory', whatever it is. So when a buffer points to a file that doesn't exist, it causes an error.
This patch binds `default-directory' to `emacspeak-sounds-directory' so that it works regardless of what your default directory is.
Here is the patch:
1 file changed, 3 insertions(+), 2 deletions(-)
lisp/emacspeak-sounds.el | 5 +++--

modified   lisp/emacspeak-sounds.el
@@ -241,8 +241,9 @@ Do not set this by hand;
 
 (defun emacspeak-play-auditory-icon (sound-name)
   "Produce auditory icon SOUND-NAME."
-  (cl-declare (special emacspeak-play-program emacspeak-play-args))
-  (let ((process-connection-type nil))
+  (cl-declare (special emacspeak-play-program emacspeak-play-args emacspeak-sounds-directory))
+  (let ((process-connection-type nil)
+        (default-directory emacspeak-sounds-directory))
     (if emacspeak-play-args
         (start-process
          emacspeak-play-program nil emacspeak-play-program



|May 1995 - Last Year |Current Year|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page