emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/drupal-mode 2517b39f42 154/308: Added a simple `drupal-tai


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode 2517b39f42 154/308: Added a simple `drupal-tail-drupal-debug-txt` function.
Date: Tue, 25 Jan 2022 10:59:41 -0500 (EST)

branch: elpa/drupal-mode
commit 2517b39f422425bbdfddbc56beb1d2075376d9fd
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>

    Added a simple `drupal-tail-drupal-debug-txt` function.
    
    Fixes #20.
---
 drupal-mode.el | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drupal-mode.el b/drupal-mode.el
index 7a7f114ba9..c08a2108ce 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -403,6 +403,24 @@ should save your files with unix style end of line."
            (format-spec drupal-search-url `((?v . ,(drupal-major-version 
drupal-version))
                                             (?s . ,symbol)))))))))
 
+(defun drupal-tail-drupal-debug-txt ()
+  "Tail drupal_debug.txt.
+If a drupal_debug.txt exists in the sites temporary directory
+visit it and enable `auto-revert-tail-mode' in the visiting
+buffer."
+  (interactive)
+  (when drupal-drush-program
+    (let* ((tmp (ignore-errors
+                  (replace-regexp-in-string
+                   "[\n\r]" ""
+                   (with-output-to-string
+                     (with-current-buffer standard-output
+                       (call-process drupal-drush-program nil (list t nil) nil 
"core-status" "temp" "--pipe" "--format=list" "--strict=0"))))))
+           (dd (concat tmp "/drupal_debug.txt")))
+      (when (file-readable-p dd)
+        (find-file-other-window dd)
+        (auto-revert-tail-mode 1)))))
+
 
 
 (defvar drupal-form-id-history nil



reply via email to

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