Skip to content

Togetherly buffer does not inherit the value of an ERC buffer-local variable #5

@rafoo

Description

@rafoo

Thank you for your work on Togetherly,

I would like to use togetherly to remotely control ERC (an Emacs IRC client). However, ERC buffers use a buffer-local variable erc-insert-mark that is nil when accessing ERC through Togetherly and this breaks ERC.

Here is an emacs -Q recipe:

$ emacs -Q -l erc_togetherly_bug.el

where erc_togetherly_bug.el is the following file:

(require 'erc)
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages"))
(package-initialize)
(package-refresh-contents)
(unless (package-installed-p 'togetherly)
  (package-install "togetherly"))
(require 'togetherly)
(defun togetherly--read-host-address () "127.0.0.1")
(defun togetherly--read-target-address () "127.0.0.1")
(defun togetherly--read-port () "10000")
(defun togetherly--read-display-name () "server")

(defun erc-with-togetherly (server nick)
  (message "ERC connected, launching Togetherly")
  (togetherly-server-start)
  (defun togetherly--read-display-name () "client")
  (togetherly-client-start)
  (with-current-buffer "*Togetherly*"
    (goto-char (point-max))
    (insert "a")
    (erc-send-current-line))
  )

(add-hook 'erc-after-connect 'erc-with-togetherly)
(erc :server "irc.freenode.net" :password "")

The following error message from ERC is echoed:

error in process filter: erc-beg-of-input-line: erc-insert-marker has no value, please report a bug
error in process filter: erc-insert-marker has no value, please report a bug

I do not know if I am misusing Togetherly (which seems to focus on collaborative file editing) or if buffer-local variables should be shared between the server and the clients in order to allow sharing control over applications such as ERC. Maybe we do not want to share all buffer-local variables either, for example sharing default-directory does probably not make a lot of sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions