astoff / devdocs.el

Emacs viewer for DevDocs
279 stars 16 forks source link

Error while calling devdocs-install #7

Closed seagle0128 closed 3 years ago

seagle0128 commented 3 years ago

When I eval this snippet, I got the errors. But no error while calling M-x devdocs-install.

(devdocs-install "Elisp")
Debugger entered--Lisp error: (file-error "https://documents.devdocs.io/Elisp/db.json" "Forbidden")
  signal(file-error ("https://documents.devdocs.io/Elisp/db.json" "Forbidden"))
  url-http--insert-file-helper(#<killed buffer> "https://documents.devdocs.io/Elisp/db.json" nil)
  url-insert-file-contents("https://documents.devdocs.io/Elisp/db.json")
  devdocs-install("Elisp")
  (progn (devdocs-install "Elisp"))
  eval((progn (devdocs-install "Elisp")) t)
  elisp--eval-last-sexp(nil)
  #f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nThis commands handles `defvar', `defcustom' and `defface' the\nsame way that `eval-defun' does.  See the doc string of that\nfunction for details.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'.  With a prefix argument of zero,\nhowever, there is no such truncation.\nInteger values are printed in several formats (decimal, octal,\nand hexadecimal).  When the prefix argument is -1 or the value\ndoesn't exceed `eval-expression-print-maximum-character', an\ninteger value is also printed as a character of that codepoint.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode -0x1c0cdbd88b50fe17>)(nil)
  apply(#f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nThis commands handles `defvar', `defcustom' and `defface' the\nsame way that `eval-defun' does.  See the doc string of that\nfunction for details.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'.  With a prefix argument of zero,\nhowever, there is no such truncation.\nInteger values are printed in several formats (decimal, octal,\nand hexadecimal).  When the prefix argument is -1 or the value\ndoesn't exceed `eval-expression-print-maximum-character', an\ninteger value is also printed as a character of that codepoint.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode -0x1c0cdbd88b50fe17>) nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\n\nOptional second arg RECORD-FLAG non-nil means unconditionally put\nthis command in the variable `command-history'.  Otherwise, that\nis done only if an arg is read using the minibuffer.\n\nThe argument KEYS specifies the value to use instead of the\nreturn value of the `this-command-keys' function when reading the\narguments; if it is nil, `this-command-keys' is used.\n\nThe argument SPECIAL, if non-nil, means that this command is\nexecuting a special event, so ignore the prefix argument and\ndon't clear it." #<bytecode -0x1298a4c3eedafa0c>)(eval-last-sexp nil nil nil)
  ad-Advice-command-execute(#f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\n\nOptional second arg RECORD-FLAG non-nil means unconditionally put\nthis command in the variable `command-history'.  Otherwise, that\nis done only if an arg is read using the minibuffer.\n\nThe argument KEYS specifies the value to use instead of the\nreturn value of the `this-command-keys' function when reading the\narguments; if it is nil, `this-command-keys' is used.\n\nThe argument SPECIAL, if non-nil, means that this command is\nexecuting a special event, so ignore the prefix argument and\ndon't clear it." #<bytecode -0x1298a4c3eedafa0c>) eval-last-sexp)
  apply(ad-Advice-command-execute #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\n\nOptional second arg RECORD-FLAG non-nil means unconditionally put\nthis command in the variable `command-history'.  Otherwise, that\nis done only if an arg is read using the minibuffer.\n\nThe argument KEYS specifies the value to use instead of the\nreturn value of the `this-command-keys' function when reading the\narguments; if it is nil, `this-command-keys' is used.\n\nThe argument SPECIAL, if non-nil, means that this command is\nexecuting a special event, so ignore the prefix argument and\ndon't clear it." #<bytecode -0x1298a4c3eedafa0c>) eval-last-sexp)
  command-execute(eval-last-sexp)
astoff commented 3 years ago

It should be "elisp". In general, the argument is the devdocs slug, in the format "<document>~<version>".

seagle0128 commented 3 years ago

Thanks for the reply!