dickmao / nnreddit

A Gnus backend for Reddit
70 stars 5 forks source link

cask unknown directive and --=-=-=-- #71

Closed torgeir closed 4 years ago

torgeir commented 4 years ago

This is more of a question than an issue, I guess;

I am getting Unknown directive: (package-descriptor "lisp/nnreddit-pkg.el") on os x 10.15 trying to make this package install.

[~/Code/nnreddit]$ make install                                                                   [master●]
/usr/local/bin/emacs -Q --batch --eval "(package-initialize)" --eval "(package-generate-autoloads \"nnreddit\" \"./lisp\")"
Package cl is deprecated
  INFO     Scraping files for nnreddit-autoloads.el...
  INFO     Scraping files for nnreddit-autoloads.el...done
pylint nnreddit

------------------------------------
Your code has been rated at 10.00/10

cask install
Unknown directive: (package-descriptor "lisp/nnreddit-pkg.el")
make: *** [test-compile] Error 255
[~/Code/nnreddit]$ cask --version                                                                  [master]
0.8.4

Why am I building it you ask - I was trying to debug this error that I get after adding nnreddit to gnus

Warning: nnreddit-sentinel: process /Users/torgeir/.virtualenvsnnreddit-20200417.1757-python/bin/python exited abnormally with code 127; nnreddit-rpc-call: Wrong type argument: stringp, nil

..which I since resolved by adding a trailing slash to $WORKON_HOME 🤦

torgeir commented 4 years ago

..which made it load as expected, but for some reason articles don't seem to load, and only renders --=-=-=--

Screenshot 2020-05-24 at 11 17 10

Rendering issues on os x? Suggestions where to go digging?

Edit: The --=-=-=-- also seems to be the case for nnhackernews on my end

dickmao commented 4 years ago

Unknown directive: (package-descriptor "lisp/nnreddit-pkg.el")

That is strange. https://github.com/cask/cask/blob/master/cask.el#L429 is not consistent with that error.

I commited cb4ce17 to test MacOS in addition to Ubuntu, and witnessed no such error.

As for --=-=-=--, what is C-h v mm-text-html-renderer. And what is M-: (fboundp 'libxml-parse-html-region)? It does seem the Simple HTML Renderer (shr) is not doing its job.

dickmao commented 4 years ago

Also, nnreddit can only be as fast as PRAW, the underlying backend which for good reason is duly throttled to protect Reddit. While I've found nnreddit to be very usable with my current 3-4 low-traffic subreddits, it's not quite as tolerable with say 7-8 subreddits or a high-traffic subreddit like /r/funny.

dickmao commented 4 years ago

since resolved by adding a trailing slash to $WORKON_HOME

Thanks for pointing out this bug 164e04f .

torgeir commented 4 years ago

Unknown directive: (package-descriptor "lisp/nnreddit-pkg.el")

That is strange. https://github.com/cask/cask/blob/master/cask.el#L429 is not consistent with that error.

I commited cb4ce17 to test MacOS in addition to Ubuntu, and witnessed no such error.

If that passes, I guess somethings fishy on my end..

As for --=-=-=--, what is C-h v mm-text-html-renderer. And what is M-: (fboundp 'libxml-parse-html-region)? It does seem the Simple HTML Renderer (shr) is not doing its job.

mm-text-html-renderer is shr and (fboundp 'libxml-parse-html-region) is t.

torgeir commented 4 years ago

.. very usable with my current 3-4 low-traffic subreddits, it's not quite as tolerable with say 7-8 subreddits or a high-traffic subreddit like /r/funny.

No worries, just playing around with this to learn more about gnus :)

torgeir commented 4 years ago

So, I removed emacs (I believe it was 27) and installed emacs-plus brew install emacs-plus --HEAD ... from master with emacs 28 and now it works 🤔

It installs a horde of dependencies, so some deps might well have been upgraded. Shr has been working fine for me in eww, tho

Screenshot 2020-05-24 at 21 28 43
dickmao commented 4 years ago

mm-text-html-renderer is shr and (fboundp 'libxml-parse-html-region) is t.

These were the correct answers. :+1:

While the code is tested on 28.0.50, I have less confidence in pre-release versions of emacs than 25.3 and 26.3.