ESS[SAS] F3 button and "File Mode Specification error: (void-variable ess-ac-sources)"

StackOverflow https://stackoverflow.com/questions/19148985

  •  30-06-2022
  •  | 
  •  

Pergunta

I have been searching for an answer/solution to this problem. I am not sure how it happened or what I did (if anything), but when I hit F3 to run a batch file for SAS in ESS[SAS] mode, it doesn't work. I have been using it all day and it suddenly just doesn't work anymore... If I call M-x ess-sas-global-unix-keys while in SAS-mode I can use the F3-F6 buttons, but having (setq ess-sas-global-unix-keys t) in my init.d file upon opening a .sas file doesn't bind F3-F6 to the necessary commands.

Also, when I now open a .sas file, I get the message "File mode specification error: (void-variable ess-ac-sources)" and the F3-F6 key-bindings no longer work in SAS-mode.

I checked to make sure I have everything up-to-date (everything appears to be: i.e. auto-complete, ess), I debugged using M-x toggle-debug-on-error, but I can't find what is wrong (not that I would necessarily know what I am looking for, I am still new to Emacs).

In my init.el file, the only reference I have to ESS is the ess-sas-global-unix-keys. I feel like the specification error is having an effect on the ESS[SAS] keybindings, but I don't know how to fix it. I am also at a loss as to why it just started happening, even though I had been using it all day long. What can I do?

EDIT:

As per the comments, I will be sending an email to the ESS-help mailing list as well as listing out the backtrace list from the debug-on-error.

Debugger entered--Lisp error: (void-variable ess-ac-sources)
  ess-load-extras()
  ess-mode(((ess-local-customize-alist quote SAS-customize-alist) (ess-language . "SAS") (ess-dialect . "SAS") (ess-mode-editing-alist . SAS-editing-alist) (ess-mode-syntax-table . SAS-syntax-table) (inferior-ess-program . inferior-SAS-program-name) (ess-help-sec-regex . "^[A-Z. ---]+:$") (ess-help-sec-keys-alist . " ") (ess-object-name-db-file . "ess-sas-namedb.el") (inferior-ess-objects-command . "objects(%d)") (inferior-ess-help-command . "help(\"%s\",pager=\"cat\",window=F)\n") (inferior-ess-exit-command . "endsas;\n") (ess-loop-timeout . 500000) (inferior-ess-primary-prompt . "^") (inferior-ess-secondary-prompt . "^") (comint-use-prompt-regexp . t) (inferior-ess-start-file) (inferior-ess-start-args . inferior-SAS-args-temp) (inferior-ess-font-lock-defaults . SAS-mode-font-lock-defaults)) nil)
  SAS-mode()
  set-auto-mode-0(SAS-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer cleaning-0yr.sas> "~/Documents/datasets/PROMISE/data/scripts/cleaning-0yr.sas" nil nil "~/Documents/datasets/PROMISE/data/scripts/cleaning-0yr.sas" (5673145 2049))
  find-file-noselect("~/Documents/datasets/PROMISE/data/scripts/cleaning-0yr.sas" nil nil t)
  find-file("~/Documents/datasets/PROMISE/data/scripts/cleaning-0yr.sas" t)
  call-interactively(find-file nil nil)
Foi útil?

Solução

Not sure what happened since I had tried this before, but today I again replaced (setq ess-sas-global-unix-keys t) with simply (ess-sas-global-unix-keys) (at the suggestion from the ESS-help mailing list) and the F3-F6 buttons now work in ESS[SAS] mode. I did get an update to emacs this morning, so that may have contributed to the fix. I still get the "File mode specification error..." though.

EDIT

As per @wvxvw comment, including (defvar ess-ac-sources nil) into the init.el (or .emacs) file prevented the "File mode..." error from occurring.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top