Skip to content
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

Text selection doesn't work #38

Open
wpix opened this issue Apr 6, 2020 · 2 comments
Open

Text selection doesn't work #38

wpix opened this issue Apr 6, 2020 · 2 comments

Comments

@wpix
Copy link

wpix commented Apr 6, 2020

Thanks for this wonderful package, much appreciated.

I managed to set up successfully for full page capture. However, whether I select text or not, the function always captured the entire page. I am wondering if I did anything wrong.

(setq org-directory "~/org-notes")
(setq org-default-notes-file (concat org-directory "/notes.org"))
(define-key global-map "\C-cc" 'org-capture)


(defun transform-square-brackets-to-round-ones(string-to-transform)
  "Transforms [ into ( and ] into ), other chars left unchanged."
  (concat 
  (mapcar #'(lambda (c) (if (equal c ?[) ?\( (if (equal c ?]) ?\) c))) string-to-transform))
  )

(setq org-capture-templates
      '(("w" "Web site"
 entry
 (file+olp "~/org-notes/notes.org" "Web")
 "* %c :website:\n%U %?%:initial")))

(setq org-protocol-default-template-key "w")

I am using the first bookmarklet set up for Firefox.

@alphapapa
Copy link
Owner

I don't know, sorry. I haven't been using Firefox for a while, and I don't know if the bookmarklet in the readme works properly with all the changes in Firefox's JavaScript/DOM stuff since the readme was written.

If you can, I'd recommend debugging the bookmarklet in Firefox to ensure that the selection works properly. It's possible that the problem is in Emacs or Org, but I'm guessing it's the bookmarklet that needs to be updated.

You might also try simply looking up whatever the currently correct code is for getting the selection content and comparing it to the code in the bookmarklet. Maybe you could just replace the code in the bookmarklet with newer code to do that.

@wpix
Copy link
Author

wpix commented Apr 9, 2020

I will keep looking for a solution and will post it here if I configured it right or found the recent version.
This package is very useful. Thanks for your reply and I appreciate the work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants