[ESS] Polymode keymap error

John Haman m@|| @end|ng |rom johnh@m@n@org
Wed Mar 10 02:03:09 CET 2021


After nuking my elpa folder and starting over, the error is gone.

I'm going to chock this one up to a some problem with the way I install 
or maintain my packages.

Thanks for the example configuration, Tyler.

-John

On 3/9/21 6:51 PM, John Haman via ESS-help wrote:
> Interestingly, replacing my init.el with Tyler's minimal configuration 
> also results in the same error:
>
> Error (use-package): poly-R/:catch: Symbol’s value as variable is 
> void: keymap
>
> My package versions are:
>
> poly-markdown-20200316.1315
> polymode-20200606.1106
> poly-noweb-20200316.1315
> poly-R-20210210.1053
>
> -John
>
>
> On 3/9/21 11:51 AM, Tyler Smith wrote:
>> Yes, no errors. I had to include all the dependencies to get it to work:
>>
>> ```
>>
>> (setq package-load-list
>>      '((use-package t)
>>     (bind-key t)
>>     (polymode t)
>>     (poly-R t)
>>     (poly-markdown t)
>>     (poly-noweb t)
>>     (markdown-mode t)
>>     (ess t)
>>     (julia-mode t)))
>> (package-initialize)
>>
>> (require 'use-package)
>>
>> (use-package polymode
>>  :ensure t)
>>
>> (use-package poly-R
>>  :after polymode
>>  :ensure t)
>>
>> (use-package poly-markdown
>>  :after polymode
>>  :mode
>>  ("\\.Rmd\\'" . poly-markdown+R-mode)
>>  :ensure t)
>>
>> ```
>>
>> John Haman writes:
>>
>>> Tyler, thanks, I'll try to reproduce your example when I get home 
>>> tonight.
>>>
>>> In the meantime, can you try your code without the defer keywords 
>>> and confirm the absence of an error?
>>>
>>> Thanks,
>>> John
>>>
>>> On Tue, Mar 9, 2021, at 10:22 AM, Tyler Smith wrote:
>>>> I can't reproduce your problem. I tried opening `emacs -Q`, then 
>>>> running the following code. It works without any error. Is this 
>>>> enough to cause the error on your system? If not, there's something 
>>>> else in your config creating the issue:
>>>>
>>>>
>>>> ```
>>>> (setq package-load-list
>>>>       '((use-package t)
>>>>     (bind-key t)))
>>>> (package-initialize)
>>>>
>>>> (require 'use-package)
>>>>
>>>> (use-package polymode
>>>>   :defer t
>>>>   :ensure t)
>>>>
>>>> (use-package poly-R
>>>>   :defer t
>>>>   :after polymode
>>>>   :ensure t)
>>>>
>>>> (use-package poly-markdown
>>>>   :defer t
>>>>   :after polymode
>>>>   :mode
>>>>   ("\\.Rmd\\'" . poly-markdown+R-mode)
>>>>   :ensure t)
>>>>
>>>> ```
>>>>
>>>>
>>>> John Haman writes:
>>>>
>>>> > Thanks, I've been using this use-package declaration for some > 
>>>> time (with a few of my custom functions omitted for brevity)
>>>> >
>>>> > (use-package polymode
>>>> >   :defer t
>>>> >   :ensure t)
>>>> >
>>>> > (use-package poly-R
>>>> >   :defer t
>>>> >   :after polymode
>>>> >   :ensure t)
>>>> >
>>>> > (use-package poly-markdown
>>>> >   :defer t
>>>> >   :after polymode
>>>> >   :mode
>>>> >   ("\\.Rmd\\'" . poly-markdown+R-mode)
>>>> >   :ensure t)
>>>> >
>>>> >
>>>> >
>>>> > On Mon, Mar 8, 2021, at 10:32 PM, Tyler Smith wrote:
>>>> >> Can you show us your Emacs config, or at least the >> 
>>>> use-package >> expression you use for poly-mode?
>>>> >> >> Best,
>>>> >> >> Tyler
>>>> >> >> John Haman via ESS-help writes:
>>>> >> >> > I'm having an issue with Poly-R or poly-markdown. When I >> 
>>>> > start >> > up my >> > Emacs installation, I get a strange error 
>>>> about a keymap:
>>>> >> >
>>>> >> > Error (use-package): poly-markdown/:catch: Symbol’s value >> > 
>>>> as >> > variable is >> > void: keymap Disable showing Disable logging
>>>> >> >
>>>> >> > I have no issues loading polymode, but either of poly-R or >> 
>>>> > poly-markdown >> > triggers the error.
>>>> >> >
>>>> >> > Thanks everyone.
>>>> >> >
>>>> >> > The traceback is below.
>>>> >> >
>>>> >> > Debugger entered--Lisp error: (void-variable keymap)
>>>> >> > 
>>>> byte-code("\306\307!\210\310\311!\210\312\313\10!\203\23\0\10\202O\0\313\10!\203\35\0\314\202E\0\315\11J!\2036\0\316\10\11J\"\317\n\2@\"\20\211A\262..." 
>>>> >> > [keymap parent keylist parent-conf polymode-minor-mode-map >> 
>>>> > parent-conf-name make-variable-buffer-local >> > 
>>>> poly-markdown-mode >> > makunbound poly-markdown-mode-map (lambda 
>>>> (def-tmp-var) >> > (defvar >> > poly-markdown-mode-map def-tmp-var 
>>>> "Keymap for >> > poly-markdown-mode.")) >> > keymapp nil 
>>>> eieio-object-p >> > pm--get-keylist\.keymap-from-parent >> > append 
>>>> >> > derived-mode-map-name eieio-oref -minor-mode >> > 
>>>> easy-mmode-define-keymap >> > :inherit poly-markdown-polymode 
>>>> (lambda (def-tmp-var) >> > (defvar >> > poly-markdown-polymode 
>>>> def-tmp-var "Configuration object >> > for >> > 
>>>> `poly-markdown-mode' poly...")) clone :name >> > 
>>>> "poly-markdown-polymode" >> > :innermodes 
>>>> (poly-markdown-fenced-code-innermode >> > 
>>>> poly-markdown-displayed-math-innermode >> > 
>>>> poly-markdown-inline-math-innermode >> > 
>>>> poly-markdown-yaml-metadata-innermode) :hostmode >> > 
>>>> poly-markdown-hostmode >> > pm-polymode defalias 
>>>> #f(compiled-function (&optional arg) >> > 
>>>> "nil\n\n\\{poly-markdown-mode-map}" (interactive nil) >> > 
>>>> #<bytecode >> > 0x141a4722905af83a>) add-minor-mode " PM" 
>>>> add-to-list >> > auto-mode-alist >> > ("\\.md\\'" . 
>>>> poly-markdown-mode)] 11)
>>>> >> >    require(poly-markdown nil t)
>>>> >> >    (not (require 'poly-markdown nil t))
>>>> >> >    (if (not (require 'poly-markdown nil t)) >> >    
>>>> (display-warning >> > 'use-package (format "Cannot load %s" 
>>>> 'poly-markdown) >> > :error) >> > (use-package-statistics-gather 
>>>> :config 'poly-markdown nil) >> > (use-package-statistics-gather 
>>>> :config 'poly-markdown t))
>>>> >> >    (progn (use-package-statistics-gather :init >> >    
>>>> 'poly-markdown >> >    nil) (if >> > (not (require 'poly-markdown 
>>>> nil t)) (display-warning >> > 'use-package >> > (format "Cannot 
>>>> load %s" 'poly-markdown) :error) >> > 
>>>> (use-package-statistics-gather :config 'poly-markdown nil) >> > 
>>>> (use-package-statistics-gather :config 'poly-markdown t)) >> > 
>>>> (use-package-statistics-gather :init 'poly-markdown t))
>>>> >> >    (closure (t) nil (progn (use-package-statistics-gather >> 
>>>> >    :init >> > 'poly-markdown nil) (if (not (require 
>>>> 'poly-markdown nil >> > t)) >> > (display-warning 'use-package 
>>>> (format "Cannot load %s" >> > 'poly-markdown) >> > :error) 
>>>> (use-package-statistics-gather :config >> > 'poly-markdown >> > 
>>>> nil) >> > (use-package-statistics-gather :config 'poly-markdown t)) 
>>>> >> > (use-package-statistics-gather :init 'poly-markdown t)))()
>>>> >> >    eval-after-load(polymode (closure (t) nil (progn >> > 
>>>> (use-package-statistics-gather :init 'poly-markdown nil) >> > (if 
>>>> >> > (not >> > (require 'poly-markdown nil t)) (display-warning >> 
>>>> > 'use-package >> > (format >> > "Cannot load %s" 'poly-markdown) 
>>>> :error) >> > (use-package-statistics-gather >> > :config 
>>>> 'poly-markdown nil) (use-package-statistics-gather >> > :config >> 
>>>> > 'poly-markdown t)) (use-package-statistics-gather :init >> > 
>>>> 'poly-markdown t))))
>>>> >> >    (condition-case err (eval-after-load 'polymode >> >    
>>>> #'(lambda >> >    nil >> >    (progn >> > 
>>>> (use-package-statistics-gather :init 'poly-markdown nil) >> > (if 
>>>> >> > (not >> > (require ... nil t)) (display-warning 'use-package 
>>>> (format >> > "Cannot load >> > %s" ...) :error) 
>>>> (use-package-statistics-gather :config >> > 'poly-markdown >> > 
>>>> nil) (use-package-statistics-gather :config 'poly-markdown >> > t)) 
>>>> >> > (use-package-statistics-gather :init 'poly-markdown t)))) >> > 
>>>> ((debug error) >> > (funcall use-package--warning102 :catch err)))
>>>> >> >    (progn (use-package-statistics-gather :use-package >> >    
>>>> 'poly-markdown >> > nil) (use-package-ensure-elpa 'poly-markdown 
>>>> '(t) 'nil) >> > (defvar >> > use-package--warning102 #'(lambda 
>>>> (keyword err) (let ((msg >> > (format >> > "%s/%s: %s" ... keyword 
>>>> ...))) (display-warning >> > 'use-package >> > msg >> > :error)))) 
>>>> (condition-case err (eval-after-load 'polymode >> > #'(lambda nil 
>>>> >> > (progn (use-package-statistics-gather :init 'poly-markdown >> 
>>>> > nil) >> > (if (not >> > ...) (display-warning ... ... :error) >> 
>>>> > (use-package-statistics-gather >> > :config ... nil) 
>>>> (use-package-statistics-gather :config >> > ... >> > t)) >> > 
>>>> (use-package-statistics-gather :init 'poly-markdown t)))) >> > 
>>>> ((debug error) >> > (funcall use-package--warning102 :catch err))) 
>>>> >> > (use-package-statistics-gather :use-package 'poly-markdown >> 
>>>> > t))
>>>> >> >    (progn (progn (use-package-statistics-gather >> >    
>>>> :use-package >> > 'poly-markdown nil) (use-package-ensure-elpa >> > 
>>>> 'poly-markdown >> > '(t) >> > 'nil) >> > (defvar 
>>>> use-package--warning102 #'(lambda (keyword err) >> > (let >> > 
>>>> ((msg ...)) >> > (display-warning 'use-package msg :error)))) >> > 
>>>> (condition-case >> > err >> > (eval-after-load 'polymode #'(lambda 
>>>> nil (progn >> > (use-package-statistics-gather :init ... nil) (if 
>>>> ... ... >> > ... >> > ...) >> > (use-package-statistics-gather 
>>>> :init ... t)))) ((debug >> > error) >> > (funcall >> > 
>>>> use-package--warning102 :catch err))) >> > 
>>>> (use-package-statistics-gather >> > :use-package 'poly-markdown t)))
>>>> >> >    eval((progn (progn (use-package-statistics-gather >> >    
>>>> :use-package >> > 'poly-markdown nil) (use-package-ensure-elpa >> > 
>>>> 'poly-markdown >> > '(t) >> > 'nil) >> > (defvar 
>>>> use-package--warning102 #'(lambda (keyword err) >> > (let >> > 
>>>> (...) >> > (display-warning ... msg :error)))) (condition-case err 
>>>> >> > (eval-after-load >> > 'polymode #'(lambda nil (progn ... ... 
>>>> ...))) ((debug >> > error) >> > (funcall >> > 
>>>> use-package--warning102 :catch err))) >> > 
>>>> (use-package-statistics-gather >> > :use-package 'poly-markdown 
>>>> t))) t)
>>>> >> >    elisp--eval-last-sexp(nil)
>>>> >> >    eval-last-sexp(nil)
>>>> >> >    funcall-interactively(eval-last-sexp nil)
>>>> >> >    call-interactively(eval-last-sexp nil nil)
>>>> >> >    command-execute(eval-last-sexp)
>>>> >> >
>>>> >> > ______________________________________________
>>>> >> > ESS-help using r-project.org mailing list
>>>> >> > https://stat.ethz.ch/mailman/listinfo/ess-help
>>>> >> >> >> -- >> Tyler Smith
>>>> >> plantarum.ca
>>>> >>
>>>>
>>>>
>>>> -- 
>>>> Tyler Smith
>>>> plantarum.ca
>>>>
>>
>>
>
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list