Skip to content

# in .emacs_workgroup causes parsing error #113

@chipschap

Description

@chipschap

This is a re-opening of a bug from back in 2014. I saved an org-agenda file which resulted in this string in the workgroup file:

#<buffer etc.

This gave a syntax read error whenever trying to create or open a new workgroup. It turns out the '#' needs to be escaped and then all is well.

This hackish rewrite of wg-write-sexp-to-file appears to fix the issue. It could surely be done better but it works for me.

(defun wg-write-sexp-to-file (sexp file)
"Write a printable (and human-readable) representation of SEXP to FILE."
(with-temp-buffer
(wg-insert-and-indent sexp)
;;; rjn
(goto-char (point-min))
(while (search-forward " #<" nil t)
(replace-match " \#<" nil t))
;;; rjn
(write-file file)))

The space in " #<" is necessary to avoid re-doing previous edits on future invocations.

I hope this will be of some use.

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