Skip to content

Commit 775e541

Browse files
committed
add some documentation regarding MPI protocol
remove link to ESC sequence documentation (since we no longer use literal ESC for delimiters) and replace with link to control codes on wikipedia (slightly redundant with existing link but with more detail). Update docstring for ess--mpi-handle-messages to 1. Use octal's for literals for better readability on github 2. add a note calling attention to the fact that the message contains literal ASCII control codes which hopefully gives something search-able if a user is confused by the seemingly strange characters printed in the docstring
1 parent 3e84b0a commit 775e541

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lisp/ess-tracebug.el

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,10 +1182,10 @@ Kill the *ess.dbg.[R_name]* buffer."
11821182
;;; MPI
11831183

11841184
;; http://jkorpela.fi/chars/c0.html
1185-
;; https://en.wikipedia.org/wiki/ANSI_escape_code#Escape_sequences
1186-
(defvar ess--mpi-message-start-delimiter "\001")
1187-
(defvar ess--mpi-message-field-separator "\002")
1188-
(defvar ess--mpi-message-end-delimiter "\003")
1185+
;; https://en.wikipedia.org/wiki/C0_and_C1_control_codes
1186+
(defvar ess--mpi-message-start-delimiter "\001") ; SOH control code
1187+
(defvar ess--mpi-message-field-separator "\002") ; STX control code
1188+
(defvar ess--mpi-message-end-delimiter "\003") ; ETX control code
11891189

11901190
(define-obsolete-variable-alias 'ess-mpi-alist 'ess-mpi-handlers "ESS 19.04")
11911191
(defvar ess-mpi-handlers
@@ -1229,10 +1229,12 @@ value from EXPR and then sent to the subprocess."
12291229

12301230
(defun ess--mpi-handle-messages (buf)
12311231
"Handle all mpi messages in BUF and delete them.
1232-
The MPI message has the form TYPEFIELD... where TYPE is the
1233-
type of the messages on which handlers in `ess-mpi-handlers' are
1234-
dispatched. And FIELDs are strings. Return :incomplete if BUF
1235-
ends with an incomplete message."
1232+
The MPI message has the form \001TYPE\002FIELD...\003 where TYPE
1233+
is the type of the messages on which handlers in
1234+
`ess-mpi-handlers' are dispatched. And FIELDs are strings. Note
1235+
that the MPI message contains literal ASCII control codes as
1236+
delimiters. Return :incomplete if BUF ends with an incomplete
1237+
message."
12361238
(let ((obuf (current-buffer))
12371239
(out nil))
12381240
(with-current-buffer buf

0 commit comments

Comments
 (0)