From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-pdfview-open doesn't work anymore Date: Fri, 05 Feb 2016 18:22:59 +0100 Message-ID: <8760y3qdfw.fsf@nicolasgoaziou.fr> References: <87a8nfzp44.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRk47-0002o0-02 for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 12:21:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRk42-000642-Ln for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 12:21:02 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:54220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRk42-00063n-FG for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 12:20:58 -0500 In-Reply-To: (Michael Brand's message of "Fri, 5 Feb 2016 14:45:46 +0100") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Brand Cc: Org Mode , Julien Cubizolles Hello, Michael Brand writes: > + ;; FIXME: Remove this check when most default installations of > + ;; Emacs have at least Org 9.0. > + (let ((arglist (help-function-arglist cmd))) > + (when (or (memq '&optional arglist) > + (memq '&rest arglist) > + (/= 2 (length arglist))) > + (user-error > + (format > + "%s%s%S" > + "Please see Org News for version 9.0 about `org-file-apps', " > + "this function signature is wrong: " > + cmd)))) I have the feeling there is some over-engineering involved there. In any case, instead of relying on `help-function-arglist', I suggest to use something lightweight: (condition-case err (funcall ...) (wrong-number-of-arguments (user-error "Please ...")) (invalid-function (user-error "Please ..."))) Regards, -- Nicolas Goaziou