diff options
| author | Karl Heuer | 1998-10-06 23:41:18 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-10-06 23:41:18 +0000 |
| commit | 261f6363b53262d4667223af2170f54a2354309f (patch) | |
| tree | 67b72f58985d5ea842eef7e0e7d1f33d04b89b8e | |
| parent | 80252f73f80e53157eaf8cdd0795dc063aed06f1 (diff) | |
| download | emacs-261f6363b53262d4667223af2170f54a2354309f.tar.gz emacs-261f6363b53262d4667223af2170f54a2354309f.zip | |
Mentioned dirtrack-debug-toggle in the docs.
Added note about running shells as other users or on other machines.
(dirtrack-debug-toggle): Added this function.
| -rw-r--r-- | lisp/dirtrack.el | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el index cadaf6dcfc0..7ecfae014f6 100644 --- a/lisp/dirtrack.el +++ b/lisp/dirtrack.el | |||
| @@ -59,7 +59,8 @@ | |||
| 59 | ;; | 59 | ;; |
| 60 | ;; Determining this information may take some experimentation. Setting | 60 | ;; Determining this information may take some experimentation. Setting |
| 61 | ;; the variable `dirtrack-debug' may help; it causes the directory-tracking | 61 | ;; the variable `dirtrack-debug' may help; it causes the directory-tracking |
| 62 | ;; filter to log messages to the buffer `dirtrack-debug-buffer'. | 62 | ;; filter to log messages to the buffer `dirtrack-debug-buffer'. You can easily |
| 63 | ;; toggle this setting with the `dirtrack-debug-toggle' function. | ||
| 63 | ;; | 64 | ;; |
| 64 | ;; 3) Add a hook to shell-mode to enable the directory tracking: | 65 | ;; 3) Add a hook to shell-mode to enable the directory tracking: |
| 65 | ;; | 66 | ;; |
| @@ -99,6 +100,19 @@ | |||
| 99 | ;; | 100 | ;; |
| 100 | ;; This saves me from having to use the %E prefix in other non-emacs | 101 | ;; This saves me from having to use the %E prefix in other non-emacs |
| 101 | ;; shells. | 102 | ;; shells. |
| 103 | ;; | ||
| 104 | ;; A final note: | ||
| 105 | ;; | ||
| 106 | ;; I run LOTS of shell buffers through Emacs, sometimes as different users (eg, when | ||
| 107 | ;; logged in as myself, I'll run a root shell in the same Emacs). If you do this, and | ||
| 108 | ;; the shell prompt contains a ~, Emacs will interpret this relative to the user which | ||
| 109 | ;; owns the Emacs process, not the user who owns the shell buffer. This may cause | ||
| 110 | ;; dirtrack to behave strangely (typically it reports that it is unable to cd to a directory | ||
| 111 | ;; with a ~ in it). | ||
| 112 | ;; | ||
| 113 | ;; The same behavior can occur if you use dirtrack with remote filesystems (using telnet, | ||
| 114 | ;; rlogin, etc) as Emacs will be checking the local filesystem, not the remote one. | ||
| 115 | ;; This problem is not specific to dirtrack, but also affects file completion, etc. | ||
| 102 | 116 | ||
| 103 | ;;; Code: | 117 | ;;; Code: |
| 104 | 118 | ||
| @@ -215,6 +229,14 @@ forward ones." | |||
| 215 | (setq dirtrackp (not dirtrackp)) | 229 | (setq dirtrackp (not dirtrackp)) |
| 216 | (message "Directory tracking %s" (if dirtrackp "ON" "OFF"))) | 230 | (message "Directory tracking %s" (if dirtrackp "ON" "OFF"))) |
| 217 | 231 | ||
| 232 | (defun dirtrack-debug-toggle () | ||
| 233 | "Enable or disable Dirtrack debugging." | ||
| 234 | (interactive) | ||
| 235 | (setq dirtrack-debug (not dirtrack-debug)) | ||
| 236 | (message "Directory debugging %s" (if dirtrack-debug "ON" "OFF")) | ||
| 237 | (and dirtrack-debug | ||
| 238 | (display-buffer (get-buffer-create dirtrack-debug-buffer)))) | ||
| 239 | |||
| 218 | (defun dirtrack-debug-message (string) | 240 | (defun dirtrack-debug-message (string) |
| 219 | (let ((buf (current-buffer)) | 241 | (let ((buf (current-buffer)) |
| 220 | (debug-buf (get-buffer-create dirtrack-debug-buffer)) | 242 | (debug-buf (get-buffer-create dirtrack-debug-buffer)) |