emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>,
	Julien Cubizolles <j.cubizolles@free.fr>
Subject: Re: org-pdfview-open doesn't work anymore
Date: Fri, 05 Feb 2016 18:22:59 +0100	[thread overview]
Message-ID: <8760y3qdfw.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CALn3zogu6B+Lb7CKU6Nd7ni9-gN4utrWnBt-Wgg83+GQWtieTw@mail.gmail.com> (Michael Brand's message of "Fri, 5 Feb 2016 14:45:46 +0100")

Hello,

Michael Brand <michael.ch.brand@gmail.com> 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

  reply	other threads:[~2016-02-05 17:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05  5:46 org-pdfview-open doesn't work anymore Julien Cubizolles
2016-02-05  8:33 ` Michael Brand
2016-02-05 13:36   ` Nicolas Goaziou
2016-02-10 12:55     ` Julien Cubizolles
2016-02-05 13:45   ` Michael Brand
2016-02-05 17:22     ` Nicolas Goaziou [this message]
2016-02-05 18:47       ` Michael Brand
2016-02-05 22:43         ` Nicolas Goaziou
2016-02-06  8:08           ` Michael Brand
2016-02-06 16:41             ` Nicolas Goaziou
2016-02-07 10:13               ` Michael Brand
2016-02-07 11:06                 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760y3qdfw.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=j.cubizolles@free.fr \
    --cc=michael.ch.brand@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).