Skip to content

Org mode source block error ("lsp is not a valid syntax checker") #2594

@FredrikMeyer

Description

@FredrikMeyer

Before logging the bug, please make sure that:

Describe the bug

I try to activate lsp-org inside a Python source block in org mode.

To Reproduce
Make a Python source block:

#+begin_src python :tangle "test.py"

x = 2

#+end_src

Activate lsp-org. Get error message.

Expected behavior

lsp-org should start

Which Language Server did you use

None, lsp didnt start

OS
OSX

Error callstack

Debugger entered--Lisp error: (error "lsp is not a valid syntax checker")
  signal(error ("lsp is not a valid syntax checker"))
  error("%s is not a valid syntax checker" lsp)
  flycheck-add-mode(lsp org-mode)
  lsp-flycheck-add-mode(org-mode)
  lsp-org()
  funcall-interactively(lsp-org)
  call-interactively(lsp-org record nil)
  command-execute(lsp-org record)
  counsel-M-x-action("lsp-org")
  ivy-call()
  #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x7f1576aca0fa29>)("M-x " ("toggle-debug-on-error" "pyvenv-activate" "byte-recompile-directory" "eval-buffer" "package-delete" "package-utils-upgrade-all" "prettier-js" "python-pytest-file" "revert-buffer" "web-mode" "org-clock-out" "eslint-fix-file" "cider-quit" "flycheck-verify-setup" "org-clock-in" "comment-region" "cider-jack-in-clj" "insert-current-date" "org-clock-in-last" "lsp-execute-code-action" "lsp-restart-workspace" "paredit-mode" "insert-current-date-with-weekday" "customize-group" "tide-mode" "tide-restart-server" "describe-key" "electric-indent-mode" "load-theme" "package-refresh-contents" "try" "lsp-format-buffer" "tide-setup" "elfeed" "ansi-term" "mark-whole-buffer" "query-replace" "tide-rename-symbol" "electric-pair-mode" "compile" "flycheck-mode" "magit-blame" "package-install" "tide-references" "vue-mode" "dired-jump" "run-python" "org-toggle-latex-fragment" "indent-region" "lsp-workspace-restart" ...) :predicate #f(compiled-function (x) #<bytecode 0x1ffdc84191e94f>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x7f1576aca0fa29>) ("M-x " ("toggle-debug-on-error" "pyvenv-activate" "byte-recompile-directory" "eval-buffer" "package-delete" "package-utils-upgrade-all" "prettier-js" "python-pytest-file" "revert-buffer" "web-mode" "org-clock-out" "eslint-fix-file" "cider-quit" "flycheck-verify-setup" "org-clock-in" "comment-region" "cider-jack-in-clj" "insert-current-date" "org-clock-in-last" "lsp-execute-code-action" "lsp-restart-workspace" "paredit-mode" "insert-current-date-with-weekday" "customize-group" "tide-mode" "tide-restart-server" "describe-key" "electric-indent-mode" "load-theme" "package-refresh-contents" "try" "lsp-format-buffer" "tide-setup" "elfeed" "ansi-term" "mark-whole-buffer" "query-replace" "tide-rename-symbol" "electric-pair-mode" "compile" "flycheck-mode" "magit-blame" "package-install" "tide-references" "vue-mode" "dired-jump" "run-python" "org-toggle-latex-fragment" "indent-region" "lsp-workspace-restart" ...) :predicate #f(compiled-function (x) #<bytecode 0x1ffdc84191e94f>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x))
  ivy-posframe--read(#f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x7f1576aca0fa29>) "M-x " ("toggle-debug-on-error" "pyvenv-activate" "byte-recompile-directory" "eval-buffer" "package-delete" "package-utils-upgrade-all" "prettier-js" "python-pytest-file" "revert-buffer" "web-mode" "org-clock-out" "eslint-fix-file" "cider-quit" "flycheck-verify-setup" "org-clock-in" "comment-region" "cider-jack-in-clj" "insert-current-date" "org-clock-in-last" "lsp-execute-code-action" "lsp-restart-workspace" "paredit-mode" "insert-current-date-with-weekday" "customize-group" "tide-mode" "tide-restart-server" "describe-key" "electric-indent-mode" "load-theme" "package-refresh-contents" "try" "lsp-format-buffer" "tide-setup" "elfeed" "ansi-term" "mark-whole-buffer" "query-replace" "tide-rename-symbol" "electric-pair-mode" "compile" "flycheck-mode" "magit-blame" "package-install" "tide-references" "vue-mode" "dired-jump" "run-python" "org-toggle-latex-fragment" "indent-region" "lsp-workspace-restart" ...) :predicate #f(compiled-function (x) #<bytecode 0x1ffdc84191e94f>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  apply(ivy-posframe--read #f(compiled-function (arg1 arg2 &rest rest) "Read a string in the minibuffer, with completion.\n\nPROMPT is a string, normally ending in a colon and a space.\n`ivy-count-format' is prepended to PROMPT during completion.\n\nCOLLECTION is either a list of strings, a function, an alist, or\na hash table, supplied for `minibuffer-completion-table'.\n\nPREDICATE is applied to filter out the COLLECTION immediately.\nThis argument is for compatibility with `completing-read'.\n\nWhen REQUIRE-MATCH is non-nil, only members of COLLECTION can be\nselected.\n\nIf INITIAL-INPUT is non-nil, then insert that input in the\nminibuffer initially.\n\nHISTORY is a name of a variable to hold the completion session\nhistory.\n\nKEYMAP is composed with `ivy-minibuffer-map'.\n\nPRESELECT, when non-nil, determines which one of the candidates\nmatching INITIAL-INPUT to select initially.  An integer stands\nfor the position of the desired candidate in the collection,\ncounting from zero.  Otherwise, use the first occurrence of\nPRESELECT in the collection.  Comparison is first done with\n`equal'.  If that fails, and when applicable, match PRESELECT as\na regular expression.\n\nDEF is for compatibility with `completing-read'.\n\nUPDATE-FN is called each time the candidate list is re-displayed.\n\nWhen SORT is non-nil, `ivy-sort-functions-alist' determines how\nto sort candidates before displaying them.\n\nACTION is a function to call after selecting a candidate.\nIt takes one argument, the selected candidate. If COLLECTION is\nan alist, the argument is a cons cell, otherwise it's a string.\n\nMULTI-ACTION, when non-nil, is called instead of ACTION when\nthere are marked candidates. It takes the list of candidates as\nits only argument. When it's nil, ACTION is called on each marked\ncandidate.\n\nUNWIND is a function of no arguments to call before exiting.\n\nRE-BUILDER is a function transforming input text into a regex\npattern.\n\nMATCHER is a function which can override how candidates are\nfiltered based on user input.  It takes a regex pattern and a\nlist of candidates, and returns the list of matching candidates.\n\nDYNAMIC-COLLECTION is a boolean specifying whether the list of\ncandidates is updated after each input by calling COLLECTION.\n\nEXTRA-PROPS is a plist that can be used to store\ncollection-specific session-specific data.\n\nCALLER is a symbol to uniquely identify the caller to `ivy-read'.\nIt is used, along with COLLECTION, to determine which\ncustomizations apply to the current completion session." #<bytecode 0x7f1576aca0fa29>) ("M-x " ("toggle-debug-on-error" "pyvenv-activate" "byte-recompile-directory" "eval-buffer" "package-delete" "package-utils-upgrade-all" "prettier-js" "python-pytest-file" "revert-buffer" "web-mode" "org-clock-out" "eslint-fix-file" "cider-quit" "flycheck-verify-setup" "org-clock-in" "comment-region" "cider-jack-in-clj" "insert-current-date" "org-clock-in-last" "lsp-execute-code-action" "lsp-restart-workspace" "paredit-mode" "insert-current-date-with-weekday" "customize-group" "tide-mode" "tide-restart-server" "describe-key" "electric-indent-mode" "load-theme" "package-refresh-contents" "try" "lsp-format-buffer" "tide-setup" "elfeed" "ansi-term" "mark-whole-buffer" "query-replace" "tide-rename-symbol" "electric-pair-mode" "compile" "flycheck-mode" "magit-blame" "package-install" "tide-references" "vue-mode" "dired-jump" "run-python" "org-toggle-latex-fragment" "indent-region" "lsp-workspace-restart" ...) :predicate #f(compiled-function (x) #<bytecode 0x1ffdc84191e94f>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x))
  ivy-read("M-x " ("toggle-debug-on-error" "pyvenv-activate" "byte-recompile-directory" "eval-buffer" "package-delete" "package-utils-upgrade-all" "prettier-js" "python-pytest-file" "revert-buffer" "web-mode" "org-clock-out" "eslint-fix-file" "cider-quit" "flycheck-verify-setup" "org-clock-in" "comment-region" "cider-jack-in-clj" "insert-current-date" "org-clock-in-last" "lsp-execute-code-action" "lsp-restart-workspace" "paredit-mode" "insert-current-date-with-weekday" "customize-group" "tide-mode" "tide-restart-server" "describe-key" "electric-indent-mode" "load-theme" "package-refresh-contents" "try" "lsp-format-buffer" "tide-setup" "elfeed" "ansi-term" "mark-whole-buffer" "query-replace" "tide-rename-symbol" "electric-pair-mode" "compile" "flycheck-mode" "magit-blame" "package-install" "tide-references" "vue-mode" "dired-jump" "run-python" "org-toggle-latex-fragment" "indent-region" "lsp-workspace-restart" ...) :predicate #f(compiled-function (x) #<bytecode 0x1ffdc84191e94f>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions