-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Majorly update this extension #30
Conversation
Please note, this and #29 are mutually exclusive. Please choose one or the other. |
Thanks for your contribution! I'm still going over it. One thing I'd like to note is that I purposefully did not include the icons in the extension, as I am not sure what their licensing terms are. I felt that it would be safe to use the standard icons in the app store extension as it can be easily replaced if someone asks me to, but the git repository would be much harder to fix (esp. if the request would be regarding previous versions as well). As such, I would prefer it if the pull request did not have icons in them. Perhaps instructions on where to get them would be appropriate, if I didn't include them in the readme yet. |
I am also not sure why you removed the EmacsClient.app from the repo |
I saw no reason to include the EmacsClient.app, as I saw no reference to anywhere. Icons are likely GPL'd or similarly freely licensed (can be assumed that it's fine to use, see http://orgmode.org/worg/org-faq.html#unicorn). |
EmacsClient.app is referenced in the readme. |
And EmacsClient.app.zip is added back in. |
options.js
Outdated
function save_options() { | ||
var selTemp = document.getElementById('selTemplate').value; | ||
var unselTemp = document.getElementById('unselTemplate').value; | ||
var useOldStyleLinks = document.getELementById('useOldstyle').checked; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
document.getElementById has a capital L instead of lower case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixed
Do we have any progress on the licensing of the Unicorn? |
Sorry - was busy - sent the question just now. |
I found out that I had to an extra slash in order for things to work in Chrome (same as here: https://github.com/alphapapa/org-protocol-capture-html#chrome). |
(The issue is that I'm running Linux of course) |
@nerikj, Where does the extra slash need to be? |
@swflint To get it working, I only needed to add it in It needs to be added after the protocol part:
|
Fixed it. |
Awesome, thanks (and thanks for the PR)! |
Do we have any info about the logo? Or should I just remove it? |
There were no answers regarding the logo on the mailing list. I am conflicted on this, but unless I get permission, I think I still would rather not have the logo in the official repo so yes, please remove. |
I'm running Gnome (and don't have any KDE-stuff installed) but get the same issue so maybe it affects certain versions of xdg-open or something like that (I haven't investigated which program it delegates to yet). My point is that it doesn't seems to be only KDE-related. Anyway, since Linux (xdg-open) is the culprit, I'm fine with the workaround and reverting 725a545. |
@nerikj ah, that's good to know! It appeared previously to be strictly a KDE problem... |
@swflint I committed #29 and then added some additions on top of it myself. Some of the reasons I chose #29 over #30 are;
I am not exactly sure what you mean by "Updating the method of performing captures, providing a command rather than just a browser action". I do think that adding store-link functionality could be useful. I think it could be nicely implemented in the context of #32 if you or someone else (potentially me) wanted to do it. Anyway, thanks for this PR and for #29. I hope to read more of your code in the future! |
So, the new permissions let it perform the various other commands (store link and open source). I added the open-source as an "example" of how to build a new command. Browser actions and commands behave differently, a command doesn't have the same permissions, and thus using commands for all of them lets a lot of the commands just be a template (just modify it a bit). The permissions are required for it to be usable with the other features. |
Sorry, I don't really understand what you are talking about.
Could you elaborate please on what you mean by commands and actions, with
perhaps an example and also references to the documentation of both?
|
Sure! An extension can define infinitely many commands, whereas there are three browser action (window, tab, and another that I can't remember). While tab actions confer certain privileges automatically (access to |
Thanks for the explanation. I am starting to get an idea of what you mean.
If I understand correctly, you are referring to [these commands](
https://developer.chrome.com/extensions/commands).
If so, what do you want to accomplish by using "commands"?
Would users want to accept elevated permissions in order to use them?
|
Yes, that's correct. We use those to have more than just one action. One command for each action. The elevated permissions are just for tab data access, nothing more. |
@nerikj: I know I'm just chasing the white rabbit at this point, but I'm dreadfully curious! I'd really like to know what So, the way I traced
The output for me is here in this gist. In my case, the output is quite short, and notably, the last line that does anything special is the call to I would expect the output to be similarly short if it is delegating the job to something else on your end. (on the other hand, if you don't see anything quite so obvious in your trace output, or if your output is significantly longer than mine, then its possible that |
@ExpHP Well, on my system, case "$DE" in
kde)
open_kde "$url"
;; And that function looks like this: open_kde()
{
if kde-open -v 2>/dev/null 1>&2; then
kde-open "$1"
else
if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
kfmclient openURL "$1"
else
kfmclient exec "$1"
kfmclient_fix_exit_code $?
fi
fi
if [ $? -eq 0 ]; then
exit_success
else
exit_failure_operation_failed
fi
} It also has |
Fascinating! Please keep us posted with your findings! |
@ExpHP This is my output: https://gist.github.com/nerikj/530c64404520b5143d9db6a550caf3bc#file-xdg-open-trace-three-slashes If I remove a slash (org-protocol://capture...), I get this output: https://gist.github.com/nerikj/530c64404520b5143d9db6a550caf3bc#file-xdg-open-trace-two-slashes and Emacs only opens a buffer named "c". |
I have looked further into this, specifically testing the I wrote up about my findings in this MD document. The summary is as follows:
|
This majorly updates org-capture-extension, by doing the following: