From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Add a custom list in org-mac-link.el Date: Thu, 15 Jun 2017 18:32:20 +0200 Message-ID: <87wp8dgqjv.fsf@nicolasgoaziou.fr> References: <87h8ziikze.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLXh2-00063F-Tl for emacs-orgmode@gnu.org; Thu, 15 Jun 2017 12:32:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLXh1-00009t-SE for emacs-orgmode@gnu.org; Thu, 15 Jun 2017 12:32:24 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:59980) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dLXh1-00009i-Mj for emacs-orgmode@gnu.org; Thu, 15 Jun 2017 12:32:23 -0400 In-Reply-To: (Takaaki Ishikawa's message of "Thu, 15 Jun 2017 22:56:07 +0900") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Takaaki Ishikawa Cc: orgmode list Hello, Takaaki Ishikawa 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-Safar= i-app-p) > + ("f" "irefox" org-mac-firefox-insert-frontmost-url ,org-mac-grab-Fir= efox-app-p) > + ("v" "imperator" org-mac-vimperator-insert-frontmost-url ,org-mac-gr= ab-Firefox+Vimperator-p) > + ("c" "hrome" org-mac-chrome-insert-frontmost-url ,org-mac-grab-Chrom= e-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-Togeth= er-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-ap= p-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-Safa= ri-app-p) > - ("f" "irefox" org-mac-firefox-insert-frontmost-url ,org-mac-grab-Fi= refox-app-p) > - ("v" "imperator" org-mac-vimperator-insert-frontmost-url ,org-mac-g= rab-Firefox+Vimperator-p) > - ("c" "hrome" org-mac-chrome-insert-frontmost-url ,org-mac-grab-Chro= me-app-p) > - ("e" "evernote" org-mac-evernote-note-insert-selected ,org-m= ac-grab-Evernote-app-p) > - ("t" "ogether" org-mac-together-insert-selected ,org-mac-grab-Toget= her-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 =C2=B0descriptors' binding? We could simply replace `descriptors' with `org-mac-link-descriptors' in the `let' body. WDYT? Regards, --=20 Nicolas Goaziou