From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id pgp+AMTZa2DBWgEAgWs5BA (envelope-from ) for ; Tue, 06 Apr 2021 05:47:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id SFM+NcPZa2CAPwAA1q6Kng (envelope-from ) for ; Tue, 06 Apr 2021 03:47:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4FAA41A9EB for ; Tue, 6 Apr 2021 05:47:15 +0200 (CEST) Received: from localhost ([::1]:52190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTcgL-0002vm-VP for larch@yhetil.org; Mon, 05 Apr 2021 23:47:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTcfj-0002va-GT for emacs-orgmode@gnu.org; Mon, 05 Apr 2021 23:46:35 -0400 Received: from out2.migadu.com ([188.165.223.204]:49199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTcff-0001Jo-W8 for emacs-orgmode@gnu.org; Mon, 05 Apr 2021 23:46:34 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1617680788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xelWzLiXOn+UGaRQTSY1x9Em38c2qp+0jcx7pNRw6tc=; b=oovd9khRx3ZmlC3msbcq+iXyBRN67l4E8GMUoHhr9mqG9LtQnM0qzrLZiG7QuSM5AOCSvq i7dCIzQpJq6R7BMyMcj0BTownKzcDp9rRBI59Q+lj2eVIJCBHNiiULPq13neY1OmF+4xpr bkekKYEuoAx+24zAJDv6wOpOfmrWweifOzaNzwygz93mrnP8MSAVGrxc+YDYVlFJ3szGqC tHo7mJRmuYP3/UDC0Z5SKYrpZXGRn+OLo2fJlf49KJJXAoffCdXRVjzJ1MUnGNaZD1lMzn 72T5blh5FUSMonSZObEaTZmr/30QGAG94D2fznyt7HlsnXDWoPVOWqGiO1btJg== From: Kyle Meyer To: Simon =?utf-8?Q?Bra=C3=9F?= Subject: Re: Bug: org-attach-follow with wrong-number-of-arguments [ ( @ /home/sbrass/.emacs.d/elpa/org-9.4.4/)] In-Reply-To: References: Date: Mon, 05 Apr 2021 23:46:26 -0400 Message-ID: <87sg44axd9.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Auth-User: kyle@kyleam.com Received-SPF: pass client-ip=188.165.223.204; envelope-from=kyle@kyleam.com; helo=out2.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617680835; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=xelWzLiXOn+UGaRQTSY1x9Em38c2qp+0jcx7pNRw6tc=; b=F4yaO81sZnLdGdL7u07GQWppHK7ec48+5znYPXqhf5Miw0EJ8xT5bTxyJNt5y7c1V8V/NW r+tyWak9Qu++GwsPQhaBYcX+qIyQ1aV+EFynA01BqK4yaPed5iGCTaerVc/z74LSm6sYFQ xwlE4KLo/KXfo73WOpT4QL5Vk/jCneTkUeWN/ma0UGbbNhUSudjkErlHUNeZ5Rww+tVNnt gAESUKBDzeHJAh1EIku1Phz5bb0Gqtp1IF8mbVONd7WBl3eO8UmQyzuqjKGWnIQcDwgY8O ieGPh6iW6Yv0cJYNZyf2WmbhMzq54mw1DYBfDlo2QjrIPHols0utGp1qXnwF8Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617680835; a=rsa-sha256; cv=none; b=JL7ncwp5I9Tpg5RY6Xpcxk8j1qudDGkISsMzxESn4txM+R3LWMAtobNyaFicr6yJJiQkHS IwU3XhfRCbSjccBUFbb/4DTzO4Ovd/C61E8XTYkaSw4wyq7ULixvaPFF+SzFAxaSuYMND3 9prF7cdhWA/nCE7JtOfpsRwNP1s+JVar7aR24BfwIiYfCa9rvAwHqWAzvmhRDEgsONtlU/ Jsfq7xDIMCnEDBvjpVyZUgoFQqSHLxxPu/eB1y/RfR6r+9bF7FpuWD6wrbY2/78fh14wB4 5Dls3vFKZs6ZWNgnT8GuoIUNPbZyHrypFkEXGRy0hzC0Xv1XTrpF4E4hZA5eYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=oovd9khR; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=oovd9khR; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 4FAA41A9EB X-Spam-Score: -1.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: NhPnLLT1EIK1 [ Sorry for the slow reply. ] Simon Bra=C3=9F writes: > Hi all, > > I've tried to open an attached file (added with org-attach-attach), howev= er, > when I try to open it with C-c C-o I got the following backtrace: > > #+begin_example > Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 2) 1) > org-attach-follow("1805.00020.pdf") > org-link-open((link (:type "attachment" :path "1805.00020.pdf" :format > bracket :raw-link "attachment:1805.00020.pdf" :application nil > :search-option nil :begin 717 :end 818 :contents-begin 746 :contents-end > 816 :post-blank 0 :parent (paragraph (:begin 717 :end 819 :contents-begin > 717 :contents-end 819 :post-blank 0 :post-affiliated 717 :parent (item > (:bullet "- " :begin 708 :end 819 :contents-begin 717 :contents-end 819 > :checkbox off :counter nil :structure (... ... ... ... ...) :pre-blank 0 > :post-blank 0 :post-affiliated 708 :tag nil :parent (plain-list ...))))))) > nil) > org-open-at-point(nil) > funcall-interactively(org-open-at-point nil) > call-interactively(org-open-at-point nil nil) > command-execute(org-open-at-point) > #+end_example Hmm, this looks like an inaccessible state for Org 9.4.4. Here's how org-link-open would handle an attachment type: (let ((f (org-link-get-parameter type :follow))) (when (functionp f) ;; Function defined in `:follow' parameter may use a single ;; argument, as it was mandatory before Org 9.4. This is ;; deprecated, but support it for now. (condition-case nil (funcall (org-link-get-parameter type :follow) path arg) (wrong-number-of-arguments (funcall (org-link-get-parameter type :follow) path))))) So it first calls with the expected 2 arguments and then falls back to the single one. Follow attachment links works okay on my end, and, aside from a mixed installation, I can't think of a way to get into that state. https://orgmode.org/worg/org-faq.html#mixed-install > After adding =3D&optional=3D to the definition of =3Dorg-attach-follow=3D= , and > reloading org-mode (uncompiled) I could get through org-attach-follow. > But, then I hit another issue: > > #+begin_example > Debugger entered--Lisp error: (void-function org-link-open-as-file) > (org-link-open-as-file (org-attach-expand file) arg) > org-attach-follow("0906.4487.pdf") > =E2=80=A6 > #+end_example That function was added in 9.4 and is in the same file as the caller, org-link-open. The fact that it's not defined also points to a mixed install, with an older ol.el taking precedence.