From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: org-pdfview-open doesn't work anymore Date: Sat, 6 Feb 2016 09:08:37 +0100 Message-ID: References: <87a8nfzp44.fsf@free.fr> <8760y3qdfw.fsf@nicolasgoaziou.fr> <87si16pylj.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a114713549c1aed052b1579d8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRxv6-0003aI-85 for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 03:08:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRxv5-0008Tz-07 for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 03:08:40 -0500 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:38157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRxv4-0008Th-Lm for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 03:08:38 -0500 Received: by mail-wm0-x22d.google.com with SMTP id p63so55192073wmp.1 for ; Sat, 06 Feb 2016 00:08:38 -0800 (PST) In-Reply-To: <87si16pylj.fsf@nicolasgoaziou.fr> 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: Org Mode Cc: Julien Cubizolles --001a114713549c1aed052b1579d8 Content-Type: text/plain; charset=UTF-8 Hi Nicolas On Fri, Feb 5, 2016 at 11:43 PM, Nicolas Goaziou wrote: > Michael Brand writes: >> + ;; FIXME: Remove this check when most default installations of >> + ;; Emacs have at least Org 9.0. >> + ((wrong-number-of-arguments invalid-function) >> + (user-error >> + (concat >> + "Please see Org News for version 9.0 about `org-file-apps', " >> + "error: " >> + (prin1-to-string err)))))) > > (user-error > "Please see Org News for version 9.0 about `org-file-apps', error: %S" > (nth 1 err)) The above does not provide (nth 0 err) which is the important error type and (nth 2 err) which I find also helpful. See following zerop examples. What am I missing that it should not be ((wrong-number-of-arguments wrong-type-argument invalid-function) (user-error "Please see Org News for version 9.0 about \ `org-file-apps'--Lisp error: %S" err)) to get Please see Org News for version 9.0 about \ `org-file-apps'--Lisp error: (wrong-number-of-arguments zerop 2) Please see Org News for version 9.0 about \ `org-file-apps'--Lisp error: (wrong-type-argument numberp nil) from (condition-case err (zerop nil nil) ...) (condition-case err (zerop nil) ...) to mimic Debugger entered--Lisp error: (wrong-number-of-arguments zerop 2) Debugger entered--Lisp error: (wrong-type-argument numberp nil) from (zerop nil nil) (zerop nil) as far as possible? I just notice that in our case at least in case of wrong-type-argument the `cmd' is missing, so I suggest ((wrong-number-of-arguments wrong-type-argument invalid-function) (user-error "Please see Org News for version 9.0 about \ `org-file-apps'--Lisp error: The function %S leads to %S" cmd err)) for the attached intermediate patch version. For the above example of (zerop nil) it would not only report "wrong-type-argument" and "numberp" together with "nil" but also "zerop" which in our case is the registered application, the source of the problem where the user needs to look. Michael --001a114713549c1aed052b1579d8 Content-Type: text/x-patch; charset=US-ASCII; name="0001-org-file-apps-add-migration-hint-for-function-signat.patch" Content-Disposition: attachment; filename="0001-org-file-apps-add-migration-hint-for-function-signat.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ikau6hq70 RnJvbSA4NzNlOTljOWVlMDM1OTRlNDVkZDNlODJkODgwYzRiOGE5MGQyMTkyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNaWNoYWVsIEJyYW5kIDxtaWNoYWVsLmJyYW5kQGFsdW1uaS5l dGh6LmNoPgpEYXRlOiBTYXQsIDYgRmViIDIwMTYgMDk6MDM6MTcgKzAxMDAKU3ViamVjdDogW1BB VENIXSBgb3JnLWZpbGUtYXBwcycgYWRkIG1pZ3JhdGlvbiBoaW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