Closed falematte closed 3 years ago
Did you modify the hypothesis.el
file itself, or did you add these changes to your init.el
(or similar) before loading hypothesis
? I'm not 100% sure, but if you tried the latter I'd suggest trying setq
instead of defvar
.
I saved hypothesis.el, than modifies it in the way that I shown and finally M-x load file. Thanks for your prompt feedback!
Okay, I don't see why it shouldn't work (even though it isn't the standard way of configuring Emacs). Have you tried loading the package first, and then this:
(setq hypothesis-username "example")
(setq hypothesis-token "66354345")
(setq hypothesis-archive (expand-file-name "hypothesis.org" org-directory)
What would be the standard way? Usually I use use-package and, therefore I don't mess up with my .emacs file :)
The standard way would be to load the directory in which you downloaded the .el-file into your load-path. Then you would put something like (require 'hypothesis)
into your .emacs
and then you can configure the package with setq
etc as described above.
When using use-package
you could do something like this:
(use-package hypothesis
:load-path "lispcode"
:config
(setq hypothesis-username "example")
(setq hypothesis-token "66354345")
(setq hypothesis-archive (expand-file-name "hypothesis.org" org-directory)))
Now lispcode
should be a directory inside your ~/.emacs.d
directory, and that's where you put hypothesis.el
. See here: https://github.com/jwiegley/use-package#extending-the-load-path
Thank you, it is working perfectly!
You're welcome!
I tried to modify the .el file like this: (defvar hypothesis-username "example") (defvar hypothesis-token "66354345") (defvar hypothesis-archive (expand-file-name "hypothesis.org" org-directory)
Where of course in place of "example" i put my username... Then I M-x and load the file. Then if I try to launch hypothesis-to-org i get the following error:
user-error: ‘hypothesis-token’ and ‘hypothesis-username’ needs to be set
Am I missing something?
Best!