Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for R sessions started with ess-remote #1182

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Commits on Jan 31, 2022

  1. use octal rather than literals for control characters in R string

    This avoids a bug when the file is "injected" where the control characters are
    potentially intercepted and consumed by the shell on their way to R.
    
    This should fix the original bug reported in emacs-ess#1163, although it doesn't fully
    address the issues with MPI support for sessions initiated by
    `ess-remote` (which require some additional work as outlined [here](emacs-ess#1163 (comment))
    dankessler committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    2ce1846 View commit details
    Browse the repository at this point in the history
  2. use different control codes as MPI start/end delimiters

    Literal ESC is tricky because it can be consumed by the shell or otherwise
    misinterpreted. Use FS to mark the beginning, GS to mark the end, and RS (which
    was previously used) to mark the end of the header. Hopefully the separator
    control codes are unlikely to cause conflicts.
    
    Also simplify the delimiters to use *solely* the control code and not rely on
    other adjacent ASCII characters.
    
    Make corresponding updates to elisp variables
    ess-mpi-message-{start,end}-delimiter and update the docstring for
    `ess-mpi-handle-messages` (which curiously already used GS as the end
    separator).
    dankessler committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    d944300 View commit details
    Browse the repository at this point in the history
  3. override read-only when handling MPI messages

    in `*shell*` buffers, the MPI message we are trying to extract may likely have
    the special `read-only` text property, which prevents us from deleting it after
    we handle it.
    
    Overcome this by wrapping the deletion command in a let form that binds
    `inhibit-read-only` to `t`, as suggested by the elisp manual's "Special
    Properties" page
    dankessler committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    a545141 View commit details
    Browse the repository at this point in the history
  4. setup ess-tracebug when invoked via ess-remote

    This is necessary to configure the MPI handler to run regularly
    dankessler committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    f5f54f2 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2022

  1. Change control codes in MPI protocol

    As suggested in discussion of emacs-ess#1182, adopt the following protocol for MPI
    `SOH header STX payload ETX`
    
    also use octal codes in elisp for better readability
    dankessler committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    a9784f9 View commit details
    Browse the repository at this point in the history
  2. rename mpi-related vars and funs to use internal convention

    As requested in emacs-ess#1182, rename any variables/functions that I've touched to begin
    with `ess--mpi` in order to follow the convention for "internal" features
    dankessler committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    3e84b0a View commit details
    Browse the repository at this point in the history
  3. 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
    dankessler committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    775e541 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2022

  1. revert function name to ess-mpi-handle-messages

    as requested by @vspinu, but for now, leave the mpi delimiter variables names
    double-dashed as explicitly requested by @lionel-
    dankessler committed Feb 3, 2022
    Configuration menu
    Copy the full SHA
    7f1e984 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2023

  1. update protocol and documentation for mpi

    new protocol is GS RS head US payload RS GS
    
    See further [discussion on github](emacs-ess#1182 (comment))
    dankessler committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    930897d View commit details
    Browse the repository at this point in the history