sly icon indicating copy to clipboard operation
sly copied to clipboard

Should sly-buffer-package always be a string in file local variables and not a symbol?

Open pouar opened this issue 6 years ago • 4 comments

replacing

(sly-send `(:emacs-rex ,form ,package ,thread ,id ,@extra-options))

with

(sly-send `(:emacs-rex ,form ,(if (symbolp package) (symbol-name package) package) ,thread ,id ,@extra-options))

in sly-dispatch-event seems to allow people to use

;;; -*- sly-local-package: my-package; -*-

instead of

;;; -*- sly-local-package: "my-package"; -*-

or was this not the intended behavior?

pouar avatar Aug 04 '19 14:08 pouar

I ask because when it's set to a symbol instead of a string, Slynk starts complaining about an undefined variable in the slynk-io-package when Company mode is suggesting completions, and that variable has the same symbol-name as the symbol in sly-buffer-package, but in uppercase

pouar avatar Aug 05 '19 15:08 pouar

Slynk seems to be trying to evaluate this symbol when this happens

pouar avatar Aug 05 '19 15:08 pouar

ACK, I'll look into this when I can. But what's the problem with using a string? Or what is gained when using an unquoted symbol?

joaotavora avatar Aug 06 '19 23:08 joaotavora

It was how Zmacs did it and so I just assumed you could do it in Emacs as well. Although Zmacs called it Package instead of sly-local-package

pouar avatar Aug 07 '19 21:08 pouar