>EMACSPEAK --Complete Audio Desktop

Next: , Previous: emacspeak-erc Options, Up: Emacspeak Customizations


11.22 emacspeak-eshell Options

Commentary: EShell is a shell implemented entirely in Emacs Lisp. It is part of emacs 21 –and can also be used under Emacs 20. This module speech-enables EShell

Play an auditory icon as you display the prompt (defun emacspeak-eshell-prompt-function () "Play auditory icon for prompt." (declare (special eshell-last-command-status)) (cond ((= 0 eshell-last-command-status) (emacspeak-serve-auditory-icon 'item)) (t (emacspeak-auditory-icon 'warn-user))))

(add-hook 'eshell-after-prompt-hook 'emacspeak-eshell-prompt-function)

Speak command output (add-hook 'eshell-post-command-hook (function (lambda nil (declare (special eshell-last-input-end eshell-last-output-end eshell-last-output-start)) (emacspeak-speak-region eshell-last-input-end eshell-last-output-end))) t)

(defadvice pcomplete-list (after emacspeak pre act ) "Provide auditory feedback." (when (interactive-p) (emacspeak-auditory-icon 'help) (emacspeak-auditory-icon 'help)))

(defadvice pcomplete (around emacspeak pre act) "Say what you completed." (cond ((interactive-p) (emacspeak-kill-buffer-carefully "*Completions*") (let ((prior (point )) (emacspeak-speak-messages nil)m) ad-do-it (when (> (point) prior) (tts-with-punctuations 'all (dtk-speak (buffer-substring prior (point))))) (let ((completions-buffer (get-buffer "*Completions*"))) (when (and completions-buffer (window-live-p (get-buffer-window completions-buffer ))) (emacspeak-auditory-icon 'help) (switch-to-buffer completions-buffer))))) (t ad-do-it)) ad-return-value)

(defadvice pcomplete-show-completions (around emacspeak pre act comp) (let ((emacspeak-speak-messages nil)) ad-do-it))

(defadvice eshell (after emacspeak pre act ) "Announce switching to shell mode. Provide an auditory icon if possible." (when (interactive-p) (emacspeak-auditory-icon 'select-object ) (emacspeak-setup-programming-mode) (emacspeak-dtk-sync) (emacspeak-speak-line)))

(loop for f in '(eshell-next-input eshell-previous-input eshell-next-matching-input eshell-previous-matching-input eshell-next-matching-input-from-input eshell-previous-matching-input-from-input) do (eval (` (defadvice (, f) (after emacspeak pre act comp) "Speak selected command." (when (interactive-p) (emacspeak-auditory-icon 'select-object) (save-excursion (beginning-of-line) (eshell-skip-prompt) (emacspeak-speak-line 1)))))))

(defgroup emacspeak-eshell nil "EShell on the Emacspeak Audio Desktop." :group 'emacspeak :group 'eshell :prefix "emacspeak-eshell-")

(defcustom emacspeak-eshell-ls-use-personalities t "Indicates if ls in eshell uses different voice personalities." :type 'boolean :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-directory-personality 'ursula 'eshell-ls-directory-face "Personality for directory names." :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-symlink-personality voice-bolden 'eshell-ls-symlink-face "Personality for symlinks." :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-executable-personality voice-animate-extra 'eshell-ls-executable-face "Personality for executables." :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-readonly-personality voice-monotone 'eshell-ls-readonly-face "Personality for read only files." :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-unreadable-personality 'kid 'eshell-ls-unreadable-face "Personality for files that are not readable." :group 'emacspeak-eshell)

(defcustom emacspeak-eshell-ls-special-personality voice-smoothen "Personality for special files." :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-missing-personality voice-brighten 'eshell-ls-missing-face "Personality for missing file." :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-archive-personality voice-lighten-extra 'eshell-ls-archive-face "Personality for archive files." :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-backup-personality voice-monotone-medium 'eshell-ls-backup-face "Personality for backup files. " :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-product-personality voice-bolden 'eshell-ls-product-face "Personality for files that can be recreated." :group 'emacspeak-eshell)

(def-voice-font emacspeak-eshell-ls-clutter-personality voice-lighten-extra 'eshell-ls-clutter-face "Personality for transients." :group 'emacspeak-eshell) (def-voice-font emacspeak-eshell-special-personality voice-smoothen-extra 'eshell-ls-special-face "Personality for specials." :group 'emacspeak-eshell) (def-voice-font emacspeak-eshell-prompt-personality voice-monotone-medium 'eshell-prompt-face "Personality used for highlighting eshell prompts –emacs 21." :group 'emacspeak-eshell) (loop for f in '(eshell-next-prompt eshell-previous-prompt eshell-forward-matching-input eshell-backward-matching-input) do (eval (` (defadvice (, f) (after emacspeak pre act comp) "Speak selected command." (when (interactive-p) (let ((emacspeak-speak-messages nil)) (emacspeak-auditory-icon 'select-object) (emacspeak-speak-line 1)))))))

(loop for f in '(eshell-insert-buffer-name eshell-insert-process eshell-insert-envvar) do (eval (` (defadvice (, f) (after emacspeak pre act comp) "Speak output." (when (interactive-p) (emacspeak-auditory-icon 'select-object) (emacspeak-speak-line))))))

(defadvice eshell-insert-process (after emacspeak pre act comp) "Speak output." (when (interactive-p) (emacspeak-auditory-icon 'select-object) (emacspeak-speak-line))) (defadvice eshell-delchar-or-maybe-eof (around emacspeak pre act) "Speak character you're deleting." (cond ((interactive-p ) (cond ((= (point) (point-max)) (message "Sending EOF to comint process")) (t (dtk-tone 500 30 'force) (and emacspeak-delete-char-speak-deleted-char (emacspeak-speak-char t)))) ad-do-it) (t ad-do-it)) ad-return-value)

(defadvice eshell-delete-backward-char (around emacspeak pre act) "Speak character you're deleting." (cond ((interactive-p ) (dtk-tone 500 30 'force) (emacspeak-speak-this-char (preceding-char )) ad-do-it) (t ad-do-it)) ad-return-value)

(defadvice eshell-show-output (after emacspeak pre act comp) "Speak output." (when (interactive-p) (let ((emacspeak-show-point t) (voice-lock-mode t)) (emacspeak-auditory-icon 'large-movement) (emacspeak-speak-region (point) (mark))))) (defadvice eshell-mark-output (after emacspeak pre act comp) "Speak output." (when (interactive-p) (let ((emacspeak-show-point t) (voice-lock-mode t)) (emacspeak-auditory-icon 'mark-object) (emacspeak-speak-line)))) (defadvice eshell-kill-output (after emacspeak pre act comp) "Produce auditory feedback." (when (interactive-p) (emacspeak-auditory-icon 'delete-object) (message "Flushed output")))

(defadvice eshell-kill-input (before emacspeak pre act ) "Provide spoken feedback." (when (interactive-p) (emacspeak-auditory-icon 'delete-object ) (emacspeak-speak-line)))

(defadvice eshell-toggle (after emacspeak pre act comp) "Provide spoken context feedback." (when (interactive-p) (cond ((eq major-mode 'eshell-mode) (emacspeak-setup-programming-mode) (emacspeak-speak-line)) (t (emacspeak-speak-mode-line))) (emacspeak-auditory-icon 'select-object))) (defadvice eshell-toggle-cd (after emacspeak pre act comp) "Provide spoken context feedback." (when (interactive-p) (cond ((eq major-mode 'eshell-mode) (emacspeak-speak-line)) (t (emacspeak-speak-mode-line))) (emacspeak-auditory-icon 'select-object)))

(provide 'emacspeak-eshell)

local variables: folded-file: t byte-compile-dynamic: t

Automatically generated documentation for options defined in module emacspeak-eshell. These options are customizable via Emacs' Custom interface.

— Variable: User Option emacspeak-eshell-ls-archive-personality

Personality for archive files.

— Variable: User Option emacspeak-eshell-ls-backup-personality

Personality for backup files.

— Variable: User Option emacspeak-eshell-ls-clutter-personality

Personality for transients.

— Variable: User Option emacspeak-eshell-ls-directory-personality

Personality for directory names.

— Variable: User Option emacspeak-eshell-ls-executable-personality

Personality for executables.

— Variable: User Option emacspeak-eshell-ls-missing-personality

Personality for missing file.

— Variable: User Option emacspeak-eshell-ls-product-personality

Personality for files that can be recreated.

— Variable: User Option emacspeak-eshell-ls-readonly-personality

Personality for read only files.

— Variable: User Option emacspeak-eshell-ls-symlink-personality

Personality for symlinks.

— Variable: User Option emacspeak-eshell-ls-unreadable-personality

Personality for files that are not readable.

— Variable: User Option emacspeak-eshell-ls-use-personalities

Indicates if ls in eshell uses different voice personalities.

— Variable: User Option emacspeak-eshell-prompt-personality

Personality used for highlighting eshell prompts –emacs 21.

— Variable: User Option emacspeak-eshell-special-personality

Personality for specials.