[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debugging firefox extension (Re: idea for capture anywhere in x)
From: |
Jean Louis |
Subject: |
Re: Debugging firefox extension (Re: idea for capture anywhere in x) |
Date: |
Thu, 17 Nov 2022 12:42:10 +0300 |
User-agent: |
Mutt/2.2.7+37 (a90f69b) (2022-09-02) |
* Samuel Wales <samologist@gmail.com> [2022-11-17 06:19]:
> in other words, you click unicorn, it does some org-protocol call, and
> then it flashes that nice but misleading message.
That is why I am using Emacs to tell me audibly that bookmark was
recorded.
Forgive me for not using really Org to record what org-protocol
extension does, but this example may help people by principle to
people to get better notification:
(defun hyperscope-org-protocol-store-link (query)
(if (hyperscope-user-www-set)
(let* ((splitparts (org-protocol-parse-parameters query t))
(uri (org-protocol-sanitize-uri (plist-get splitparts :url)))
(title (plist-get splitparts :title))
(hlink-exist (hyperscope-link-exists-p uri 2)))
(if hlink-exist
(progn
(rcd-warning-message "Link: %s already exists." uri)
(rcd-speak "Link exists already")
nil)
(let* ((parent (hyperscope-user-www-set))
(id (hyperscope-add-generic title uri nil 2 nil parent)))
(if id
(progn
(message "Added Hyperlink: %s to Hyperscope ID: %s" title id)
(hyperscope-update-tokens id)
(rcd-speak "Done")
;; speaking "Done" on my loud speaker tells me it was
;; made well
nil)
(progn
(message "Could not insert: %s" query)
(rcd-speak "Did not work")
nil)))))
(rcd-warning-message "Define WWW set for user `%s' in table
`usersdefaults'" (rcd-db-current-user))))
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/