[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/rt-liberation 96cc027 04/72: * rt-liberation.el: Add a
From: |
Stefan Monnier |
Subject: |
[elpa] externals/rt-liberation 96cc027 04/72: * rt-liberation.el: Add a debug option. |
Date: |
Wed, 5 Aug 2020 11:57:32 -0400 (EDT) |
branch: externals/rt-liberation
commit 96cc027f2b6893ba67848a51f502230237c3624a
Author: Johnathan Rabkin <yonirabkin@member.fsf.org>
Commit: Johnathan Rabkin <yonirabkin@member.fsf.org>
* rt-liberation.el: Add a debug option.
---
rt-liberation.el | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/rt-liberation.el b/rt-liberation.el
index b75bebd..3b4cd7a 100644
--- a/rt-liberation.el
+++ b/rt-liberation.el
@@ -179,6 +179,28 @@ The custom field symbols provide the programmer with a
consistent
way of referring to certain custom fields. The custom field
strings are the server specific strings.")
+(defvar rt-liber-debug-log-enable nil
+ "If t then enable logging of communication to a buffer.
+
+Careful! This might create a sizable buffer.")
+
+(defvar rt-liber-debug-log-buffer-name "*rt-liber debug log*"
+ "Name of debug log buffer.")
+
+
+;;; --------------------------------------------------------
+;;; Debug log
+;;; --------------------------------------------------------
+
+(defun rt-liber-debug-log-write (str)
+ "Write STR to debug log."
+ (when (not (stringp str))
+ (error "must be a string"))
+ (with-current-buffer (get-buffer-create
+ rt-liber-debug-log-buffer-name)
+ (goto-char (point-max))
+ (insert str)))
+
;;; --------------------------------------------------------
;;; TicketSQL compiler
@@ -314,6 +336,9 @@ AFTER date after predicate."
(with-temp-buffer
(insert answer-string)
(goto-char (point-min))
+ (when rt-liber-debug-log-enable
+ (rt-liber-debug-log-write (buffer-substring (point-min)
+ (point-max))))
(funcall parser-f)))
- [elpa] branch externals/rt-liberation created (now 05beb9f), Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation 6eeb9ca 02/72: * rt-liberation.el: Change mode even when signalling the no-results exception., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation ecd9c12 03/72: * doc/rt-liberation.texinfo: A patch to fix some typos in the documentation is attached., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation e772549 05/72: * rt-liberation.el: Bump copyright notice., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation 5de9af6 01/72: import for initial Savannah tree, Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation 96cc027 04/72: * rt-liberation.el: Add a debug option.,
Stefan Monnier <=
- [elpa] externals/rt-liberation 246acd2 06/72: * rt-liberation.el: Attempt to handle server response when assigning., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation 146b0ed 07/72: Add makefile., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation 1aa19e9 08/72: Fix compilation errors., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation e81b0a3 09/72: * rt-liberation-gnus.el: Fix compile warnings., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation 4dd2f82 11/72: * rt-liberation-gnus.el: Fix single line and leading space bugs., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation 7bc66d0 12/72: * rt-liberation.el: Add %-sequence support for priority., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation 6a51214 13/72: * rt-liberation.el: Add a custom time format string., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation 2c9b357 10/72: Fix compilation warnings., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation f0cf810 23/72: * doc/rt-liberation.texinfo: Update manual., Stefan Monnier, 2020/08/05
- [elpa] externals/rt-liberation b506154 14/72: * rt-liberation.el: Update the browser display format., Stefan Monnier, 2020/08/05