Comments (5)
Hi, is this the string you saw?
Unable to test Pandoc! Please report this bug! (include the output of "pandoc --dump-args --no-wrap")
If you give the output of that pandoc command as well it will give some other useful information to solve this.
from org-web-tools.
Hi there,
Hi, thanks a lot for the very nice tool. I started playing with it for my web clipping activities.
Glad you like it. :)
However, somehow by letting pandoc run in the terminal, the function of org-web-tools-read-url-as-org worked. It stopped working when i tried to stop pandoc running in the terminal.
That is very strange! I have no idea why it would work that way.
Is there anything I need to change in the environment or emacs configuration file for it to work properly without needing to have the terminal running with the pandoc command?
I don't use Mac OS, and I don't know much about using Emacs with it. I have heard that there can be issues with finding programs in the environment PATH
. I think it depends on how you launch Emacs, how it's installed, etc. I'm pretty sure that you should be able to find the answer if you google around, check emacswiki, /r/emacs, Emacs.SE, etc.
I did have this (when (memq window-system '(mac ns x)) (exec-path-from-shell-initialize)) in the .emacs file after googling about the problems of emacs running in macOS not being able to use executable files in usr/local/bin.
I can't find the function exec-path-from-shell-initialize
in my Emacs, so I'm guessing this is something external, but it sounds like it might help. :)
Basically, the problem is probably that Emacs is not being run in an environment where PATH
is set to what you get in a terminal. So if you were to start Emacs from a terminal, it would probably work. So if you can get exec-path-from-shell-initialize
working, whatever that is, I guess it will fix it for you.
But like @ag91 said, please do give the output of that command. Try it in a terminal outside of Emacs, and then run it from a terminal inside Emacs (e.g. M-x ansi-term
).
Thanks again for the nice tool and also the helm-org-rifle tool, I love both of them a lot.
Thanks, glad you like it. BTW, just curious, do you ever use the helm-org-rifle-occur
commands? Sometimes I wonder if anyone has ever noticed them. :)
from org-web-tools.
Thank you all for the responses. I have not really had a time to investigate further to the issue but I just found out that whenever I restart emacs, I just need to call pandoc
in the terminal for one time and kill it, the function of org-web-tools
works again in that session. I guess there is something to do with the environment of my MacOS settings.
Anyway, I like the tool a lot, it really solves my problem of web clipping activities. I have tried different solutions in the past years, including Evernote web clipping function (excellent tool but lately I don't want to have my knowledge-base trapped in Evernote without any easy ways to transfer in case they close down their service), then tagspace webclipping tool (it only output the rich text HTML, which is fine on desktop but barely readable on many mobile apps, also the file tends to be bigger with all of the rich markup). By the way, do you think it would be possible to extend the tool a bit by adding a function to convert the org file to markdown right after that (by calling pandoc
again for example)? I like org files but markdown files are supported widely by mobile apps.
I tried the helm-org-rifle-occur
, it's pretty neat. Also @alphapapa, could you let me know what the differences between helm-org-rifle
with helm swoop
?
from org-web-tools.
I guess there is something to do with the environment of my MacOS settings.
I guess so. Sorry I can't be more help here. Let me know if you ever figure out exactly what it is, and I'll add a note to the readme.
Evernote web clipping function (excellent tool but lately I don't want to have my knowledge-base trapped in Evernote without any easy ways to transfer in case they close down their service)
Agreed. I started using Evernote a long time ago, but I gradually stopped using it. They've basically ruined it.
do you think it would be possible to extend the tool a bit by adding a function to convert the org file to markdown right after that (by calling pandoc again for example)? I like org files but markdown files are supported widely by mobile apps.
You can do this fairly easily by copying the functions and changing the output format argument to pandoc. Here:
(defun org-web-tools--url-as-readable-md (&optional url)
"Return string containing Markdown of URL's web page content.
Content is processed with `eww-readable' and Pandoc."
(-let* ((url (or url (org-web-tools--get-first-url)))
(html (org-web-tools--get-url url))
((title . readable) (org-web-tools--eww-readable html))
(title (org-web-tools--cleanup-title (or title "")))
(converted (org-web-tools--html-to-md-with-pandoc readable)))
converted))
(defun org-web-tools--html-to-md-with-pandoc (html)
"Return string of HTML converted to Markdown with Pandoc."
(with-temp-buffer
(insert html)
(unless (zerop (call-process-region (point-min) (point-max) "pandoc"
t t nil
(org-web-tools--pandoc-no-wrap-option)
"-f" "html" "-t" "md"))
(error "Pandoc failed"))
(org-web-tools--clean-pandoc-output)
(buffer-string)))
could you let me know what the differences between helm-org-rifle with helm swoop?
They are completely different. helm-swoop is line-based and rather slow. helm-org-rifle is specific to Org mode, much faster, and has a lot of features.
from org-web-tools.
Going to close this now. Let me know if you need anything else.
from org-web-tools.
Related Issues (20)
- handling same-page relative links, such as footnotes HOT 5
- handle images in links HOT 1
- archive.today archiving function does not work anymore HOT 3
- fetch link at point HOT 2
- Is it possible to support images? HOT 5
- Archive not yet available. HOT 3
- Open local url? HOT 1
- Add option to disable use of `eww-readability` in `org-web-tools-read-url-as-org` HOT 3
- `org-element-at-point` cannot be used in non-Org buffer HOT 3
- Error when trying to use org-web-tools-archive-attach HOT 1
- Unable to get submitid HOT 2
- org-element-at-point and w3m error HOT 3
- Curl error HOT 16
- libxml-parse-html-region arguments non-optional before Emacs 29.1 HOT 4
- ‘buffer-substring’ is an obsolete generalized variable HOT 1
- Attempting to view an archived site raises tar error "option -a is not permitted in mode -x" HOT 5
- org-web-tools-insert-link-for-url fails for https://youtu.be links HOT 4
- org-web-tools--check-pandoc-no-wrap-option fails to correctly set the option HOT 1
- org-web-tools-archive-view has a problem with "--auto-compress" HOT 6
- Convert only heading matching link anchors HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-web-tools.