[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Add a custom list in org-mac-link.el
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [PATCH] Add a custom list in org-mac-link.el |
Date: |
Thu, 15 Jun 2017 18:32:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello,
Takaaki Ishikawa <address@hidden> writes:
> I tried to generate a patch for this proposal. Please find an attached
> file.
Thank you.
> +(defcustom org-mac-link-descriptors
> + `(("F" "inder" org-mac-finder-insert-selected ,org-mac-grab-Finder-app-p)
> + ("m" "ail" org-mac-message-insert-selected ,org-mac-grab-Mail-app-p)
> + ("d" "EVONthink Pro Office" org-mac-devonthink-item-insert-selected
> + ,org-mac-grab-devonthink-app-p)
> + ("o" "utlook" org-mac-outlook-message-insert-selected
> ,org-mac-grab-Outlook-app-p)
> + ("a" "ddressbook" org-mac-addressbook-insert-selected
> ,org-mac-grab-Addressbook-app-p)
> + ("s" "afari" org-mac-safari-insert-frontmost-url
> ,org-mac-grab-Safari-app-p)
> + ("f" "irefox" org-mac-firefox-insert-frontmost-url
> ,org-mac-grab-Firefox-app-p)
> + ("v" "imperator" org-mac-vimperator-insert-frontmost-url
> ,org-mac-grab-Firefox+Vimperator-p)
> + ("c" "hrome" org-mac-chrome-insert-frontmost-url
> ,org-mac-grab-Chrome-app-p)
> + ("e" "evernote" org-mac-evernote-note-insert-selected
> ,org-mac-grab-Evernote-app-p)
> + ("t" "ogether" org-mac-together-insert-selected
> ,org-mac-grab-Together-app-p)
> + ("S" "kim" org-mac-skim-insert-page ,org-mac-grab-Skim-app-p)
> + ("A" "crobat" org-mac-acrobat-insert-page ,org-mac-grab-Acrobat-app-p))
> + "Descriptors to select an application."
Could you expand the docstring a bit? What is a descriptor, what type of
data structure is it?
> + :tag "A list of descriptors"
> + :group 'org-mac-link'
> + :type 'symbol)
The :type value is wrong. You need a composite type here.
>
> ;; In mac.c, removed in Emacs 23.
> (declare-function do-applescript "org-mac-message" (script))
> @@ -238,21 +258,7 @@
> "Prompt for an application to grab a link from.
> When done, go grab the link, and insert it at point."
> (interactive)
> - (let* ((descriptors
> - `(("F" "inder" org-mac-finder-insert-selected
> ,org-mac-grab-Finder-app-p)
> - ("m" "ail" org-mac-message-insert-selected ,org-mac-grab-Mail-app-p)
> - ("d" "EVONthink Pro Office" org-mac-devonthink-item-insert-selected
> - ,org-mac-grab-devonthink-app-p)
> - ("o" "utlook" org-mac-outlook-message-insert-selected
> ,org-mac-grab-Outlook-app-p)
> - ("a" "ddressbook" org-mac-addressbook-insert-selected
> ,org-mac-grab-Addressbook-app-p)
> - ("s" "afari" org-mac-safari-insert-frontmost-url
> ,org-mac-grab-Safari-app-p)
> - ("f" "irefox" org-mac-firefox-insert-frontmost-url
> ,org-mac-grab-Firefox-app-p)
> - ("v" "imperator" org-mac-vimperator-insert-frontmost-url
> ,org-mac-grab-Firefox+Vimperator-p)
> - ("c" "hrome" org-mac-chrome-insert-frontmost-url
> ,org-mac-grab-Chrome-app-p)
> - ("e" "evernote" org-mac-evernote-note-insert-selected
> ,org-mac-grab-Evernote-app-p)
> - ("t" "ogether" org-mac-together-insert-selected
> ,org-mac-grab-Together-app-p)
> - ("S" "kim" org-mac-skim-insert-page ,org-mac-grab-Skim-app-p)
> - ("A" "crobat" org-mac-acrobat-insert-page
> ,org-mac-grab-Acrobat-app-p)))
> + (let* ((descriptors org-mac-link-descriptors)
> (menu-string (make-string 0 ?x))
> input)
Is it useful to let the °descriptors' binding? We could simply replace
`descriptors' with `org-mac-link-descriptors' in the `let' body. WDYT?
Regards,
--
Nicolas Goaziou