From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gNo+G3GGWWK6mAAAgWs5BA (envelope-from ) for ; Fri, 15 Apr 2022 16:51:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AIPsF3GGWWLSUQEAauVa8A (envelope-from ) for ; Fri, 15 Apr 2022 16:51:29 +0200 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 B8BC21117E for ; Fri, 15 Apr 2022 16:51:28 +0200 (CEST) Received: from localhost ([::1]:33328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nfNIE-00013n-NL for larch@yhetil.org; Fri, 15 Apr 2022 10:51:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfNGw-00013M-BK for emacs-orgmode@gnu.org; Fri, 15 Apr 2022 10:50:07 -0400 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]:37473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nfNGs-0005cr-R5 for emacs-orgmode@gnu.org; Fri, 15 Apr 2022 10:50:06 -0400 Received: by mail-il1-x12c.google.com with SMTP id y5so4950818ilg.4 for ; Fri, 15 Apr 2022 07:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:content-transfer-encoding:mime-version:date:subject:message-id :to; bh=TaNKeyXvK0O+Yl3YhDPNr+zdDe8YNbAAD9iD1E1VwgY=; b=VkFdxcMNAULRAQqcc2YdfUa1hTqb5gm8cfug+6Rh2pXNWtVeEbbet7V3a7KsRFVyzD pS7q3gwCbP2lnb34pqmzopBRBNSduonTvBiAfNiGi2yPFnzap4dHSuKjIC+pLHkm5ZTh CgjwVQaQvulV+YdBYFMt05pyYHE1e7j/ponmt7ZkNEQGLO31aRjS2nEM/KCW+/iW7TW+ D2QPEnTRPdrZ+GgrpyGaHJV12a7spLCHG1SPjGeg1ot6ZQmSj0MzvAaP+pnd+wtPsOKW jCS3tpw9au1kJDaQHNymKrXd555SpP0WIiy5X9eXqGyZrzbQVtgBLxQu0eOOANIyQEQf dIqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:to; bh=TaNKeyXvK0O+Yl3YhDPNr+zdDe8YNbAAD9iD1E1VwgY=; b=HVxeTs885v9/4owUJEbH/vq3sWnP2BL1bXEamhDgc51BxQpzrYzqgAuKvkLWoC7Rhm 1DBCmUedp6Fod1omFs2eFIrw7CZlckbfPXUA2obkZqXrJ2YbkuV92tE7fl/u0CahXFgT R340zCyzx4vnQvvMRM+uB7ruRc3UXjKW9EjliCBdm/Gf0LpwmB4wQ0avm+b6SUl4soeo yqZJsU2TJ0gUsxrqF/GF0iZpLUSkB8rALrbJsFNBOCVAkhbIqXXxXfYV3yTvf4+/wir7 8lZJPKVSMCR3E0CK8nLZ8XSCOkLAyPlVxQe9v1vrhEJwpTyA24V72Bj/Jxud1B54KOa3 mXZg== X-Gm-Message-State: AOAM532p7sTTZTWvq7g1nlxQHqZx0sBplwx7QFwfCldAaPuwzlQv47WX fNBTnwSTloCFD7uH+Lrk5br/K8evY+Nfjw== X-Google-Smtp-Source: ABdhPJyfZfiEEefjLHRy6LAHXlJq6PYh2pf0RYsVtUQFKWxT00BfIq3xFVMumuhR4SlIvQdYpaK5uA== X-Received: by 2002:a05:6e02:1989:b0:2c9:f711:abb3 with SMTP id g9-20020a056e02198900b002c9f711abb3mr3554663ilf.36.1650034200550; Fri, 15 Apr 2022 07:50:00 -0700 (PDT) Received: from smtpclient.apple ([2601:249:187f:b4c0:79dd:7830:b630:23d5]) by smtp.gmail.com with ESMTPSA id b12-20020a6be70c000000b00648f61d9652sm2997671ioh.52.2022.04.15.07.49.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Apr 2022 07:50:00 -0700 (PDT) From: Alan Wehmann Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Date: Fri, 15 Apr 2022 09:49:58 -0500 Subject: link error when file missing Message-Id: To: emacs-orgmode@gnu.org X-Mailer: Apple Mail (2.3654.120.0.1.13) Received-SPF: pass client-ip=2607:f8b0:4864:20::12c; envelope-from=alan.wehmann@gmail.com; helo=mail-il1-x12c.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650034288; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=TaNKeyXvK0O+Yl3YhDPNr+zdDe8YNbAAD9iD1E1VwgY=; b=ufVl9FAk6Cr63DsnTXnMuplYchz7knkpDXhgZcmMPgAKiN7yI7/feolM/NXNWWVDZdyHWT a0a1Zf0zdPD15RRrJB84VVvO0sghV1F7az3qg9TzmZuN2hvAzOWndo4GyzkU7IN87VOJun uz42gWLuHS3LhUxuVXfcqwl92VhDWNollYQI8G6Z1MK2qniBfQsUUAJbLRYrO+RmrWXlPp QKlcfWoSbyLENibx1dgt7rMlosDXncb6Ql3OitpnGiCW4eLRBpjyzsrN2MGdP/yxreLYNM u192FpRQ/gj0GRNlAen/z0VUo41X6MELs7nVy0Bb63MO8WpJM6p4k/FJ0q2xhA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650034288; a=rsa-sha256; cv=none; b=B8K4VEDR8rqb4SP0li3hEUB39+U54q11cgtkb82JVJQnRMtqJkBrxpxheqQVpsUHNLpxif TYS8OqP0AvFlnLqhXtJoCU+pQVZpT3sFQwAnnl2PYQBJrMiLamJCBbmwfdynAqIdSM2/hr +ow5ZbQZyBF4ssajxq5GfbgLa8ajeS+JNcRnnhxFqqxLlK7+kM2DWt4nTckD8w3t8PvFSG Er9HoJMbG/TAUk2UcqSU9meEdnrBhCAcogtiEAO8su1WErYh7K4DDokqB92w/hgZE/g+AW 6rsU7qfFo+g+gr0XPHN0e4wTYJd8ljYgFhcMAA6fJZeYLrHMmnhdjgLCgletZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VkFdxcMN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VkFdxcMN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B8BC21117E X-Spam-Score: -2.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9z693ClvbSv0 Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ I have a link in a text file that looks as follows, in fundamental mode: 5. Contracts: [[docview:~/Documents/Wheaton_condo/landscaping/from = Mark/2019/ALM_landscape_contract_Fall_2018.pdf::1][Landscape]], = [[docview:~/Documents/Wheaton_condo/landscaping/from = Mark/2018/ALM_snow_management_contract_Fall_2018.pdf::1][Snow]] The path is deliberately wrong in the first link--in order to = demonstrate the error that results. The year "2019" there should be = "2018" and then in that case the link works properly (when the file is = set to org-mode); the result of using the proper link is that the = document is shown in a docview buffer. As is, there is an error thrown & below is the backtrace for it (after = appropriate use of "toggle-debug-on-error") Debugger entered--Lisp error: (wrong-type-argument listp t) image-mode-winprops(nil) image-mode-window-put(page 0 nil) doc-view-goto-page(1) org-docview-open("~/Documents/Wheaton_condo/landscaping/from = Mark/20..." nil) org-link-open((link (:type "docview" :path = "~/Documents/Wheaton_condo/landscaping/from Mark/20..." :format bracket = :raw-link "docview:~/Documents/Wheaton_condo/landscaping/from..." = :application nil :search-option nil :begin 1000 :end 1115 = :contents-begin 1104 :contents-end 1113 :post-blank 0 :parent (paragraph = (:begin 989 :end 1234 :contents-begin 989 :contents-end 1234 :post-blank = 0 :post-affiliated 989 :parent (item (:bullet "5. " :begin 986 :end 1235 = :contents-begin 989 :contents-end 1234 :checkbox nil :counter nil = :structure (... ... ... ... ... ... ... ...) :pre-blank 0 :post-blank 1 = :post-affiliated 986 :tag nil :parent (plain-list ...))))))) nil) (cond ((not type) (user-error "No link found")) ((memq type '(comment = comment-block node-property keyword)) (call-interactively = #'org-open-at-point-global)) ((memq type '(headline inlinetask)) = (org-match-line org-complex-heading-regexp) (let ((tags-beg = (match-beginning 5)) (tags-end (match-end 5))) (if (and tags-beg (>=3D = (point) tags-beg) (< (point) tags-end)) (org-tags-view arg = (save-excursion (let* (... ...) (buffer-substring ... ...)))) (let* = ((val (org-offer-links-in-entry ... ... arg))) (if (consp val) (let* = (...) (if ... ... ...)) nil))))) ((or (eq type 'footnote-reference) (and = (eq type 'footnote-definition) (save-excursion (skip-chars-forward " = \11") (let ((begin ...)) (if begin (< ... begin) (=3D ... ...)))))) = (org-footnote-action)) ((and (eq type 'planning) (org-in-regexp = org-ts-regexp-both nil t)) (org-follow-timestamp-link)) ((and (eq type = 'clock) value (>=3D (point) (org-element-property :begin value)) (<=3D = (point) (org-element-property :end value))) (org-follow-timestamp-link)) = ((eq type 'src-block) (org-babel-open-src-block-result)) ((>=3D (point) = (save-excursion (goto-char (org-element-property :end context)) = (skip-chars-backward " \11") (point))) (user-error "No link found")) = ((eq type 'inline-src-block) (org-babel-open-src-block-result)) ((eq = type 'timestamp) (org-follow-timestamp-link)) ((eq type 'link) = (org-link-open context arg)) ((memq type '(citation citation-reference)) = (org-cite-follow context arg)) (t (user-error "No link found"))) (let* ((context (org-element-lineage (org-element-context) '(citation = citation-reference clock comment comment-block footnote-definition = footnote-reference headline inline-src-block inlinetask keyword link = node-property planning src-block timestamp) t)) (type (org-element-type = context)) (value (org-element-property :value context))) (cond ((not = type) (user-error "No link found")) ((memq type '(comment comment-block = node-property keyword)) (call-interactively #'org-open-at-point-global)) = ((memq type '(headline inlinetask)) (org-match-line = org-complex-heading-regexp) (let ((tags-beg (match-beginning 5)) = (tags-end (match-end 5))) (if (and tags-beg (>=3D (point) tags-beg) (< = (point) tags-end)) (org-tags-view arg (save-excursion (let* ... ...))) = (let* ((val ...)) (if (consp val) (let* ... ...) nil))))) ((or (eq type = 'footnote-reference) (and (eq type 'footnote-definition) (save-excursion = (skip-chars-forward " \11") (let (...) (if begin ... ...))))) = (org-footnote-action)) ((and (eq type 'planning) (org-in-regexp = org-ts-regexp-both nil t)) (org-follow-timestamp-link)) ((and (eq type = 'clock) value (>=3D (point) (org-element-property :begin value)) (<=3D = (point) (org-element-property :end value))) (org-follow-timestamp-link)) = ((eq type 'src-block) (org-babel-open-src-block-result)) ((>=3D (point) = (save-excursion (goto-char (org-element-property :end context)) = (skip-chars-backward " \11") (point))) (user-error "No link found")) = ((eq type 'inline-src-block) (org-babel-open-src-block-result)) ((eq = type 'timestamp) (org-follow-timestamp-link)) ((eq type 'link) = (org-link-open context arg)) ((memq type '(citation citation-reference)) = (org-cite-follow context arg)) (t (user-error "No link found")))) (if (run-hook-with-args-until-success 'org-open-at-point-functions) = nil (let* ((context (org-element-lineage (org-element-context) = '(citation citation-reference clock comment comment-block = footnote-definition footnote-reference headline inline-src-block = inlinetask keyword link node-property planning src-block timestamp) t)) = (type (org-element-type context)) (value (org-element-property :value = context))) (cond ((not type) (user-error "No link found")) ((memq type = '(comment comment-block node-property keyword)) (call-interactively = #'org-open-at-point-global)) ((memq type '(headline inlinetask)) = (org-match-line org-complex-heading-regexp) (let ((tags-beg = (match-beginning 5)) (tags-end (match-end 5))) (if (and tags-beg (>=3D = ... tags-beg) (< ... tags-end)) (org-tags-view arg (save-excursion ...)) = (let* (...) (if ... ... nil))))) ((or (eq type 'footnote-reference) (and = (eq type 'footnote-definition) (save-excursion (skip-chars-forward " = \11") (let ... ...)))) (org-footnote-action)) ((and (eq type 'planning) = (org-in-regexp org-ts-regexp-both nil t)) (org-follow-timestamp-link)) = ((and (eq type 'clock) value (>=3D (point) (org-element-property :begin = value)) (<=3D (point) (org-element-property :end value))) = (org-follow-timestamp-link)) ((eq type 'src-block) = (org-babel-open-src-block-result)) ((>=3D (point) (save-excursion = (goto-char (org-element-property :end context)) (skip-chars-backward " = \11") (point))) (user-error "No link found")) ((eq type = 'inline-src-block) (org-babel-open-src-block-result)) ((eq type = 'timestamp) (org-follow-timestamp-link)) ((eq type 'link) (org-link-open = context arg)) ((memq type '(citation citation-reference)) = (org-cite-follow context arg)) (t (user-error "No link found"))))) 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) I note that in the "org-open-file" function in "org.el" there are the = lines: (when (and (not (eq cmd 'emacs)) ; Emacs has no problems with non-ex = files (not (file-exists-p file)) (not org-open-non-existing-files)) (user-error "No such file: %s" file)) & in the case that I've shown, the check on existence of the file is not = done. If I change things so that existence of the tile is checked, then = the error can be avoided and the warning message is exhibited. Function "org-docview-open" calls "org-open-file", but the backtrace = doesn't seem to show that. I had the initial link error occur because I changed the location of the = file so that the files were in sub-directories labelled by year. Emacs : GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS = appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2020-08-12 Package: Org mode version 9.5.2 (9.5.2-gfbff08 @ = /Users/alanwehmann/.emacs.d/elpa/org-9.5.2/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-modules '(ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus ol-info = ol-irc ol-mhe ol-rmail ol-w3m ol-vm) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append = local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook = org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300=01\236A\207" [:title] 3 = "\n\n(fn ENTRY)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-agenda-loop-over-headlines-in-active-region nil org-src-lang-modes '(("redis" . redis) ("php" . php) ("arduino" . = arduino) ("C" . c) ("C++" . c++) ("asymptote" . asy) = ("bash" . sh) ("beamer" . latex) ("calc" . fundamental) ("cpp" . = c++) ("ditaa" . artist) ("dot" . fundamental) ("elisp" . emacs-lisp) ("ocaml" . tuareg) ("screen" . shell-script) ("shell" . sh) ("sqlite" = . sql)) org-catch-invisible-edits 'show-and-error org-occur-hook '(org-first-headline-recenter) org-cycle-hook '(org-cycle-hide-archived-subtrees = org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-export-before-parsing-hook '(org-attach-expand-links) org-confirm-shell-link-function 'yes-or-no-p org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("vm-imap" :follow org-vm-imap-open) ("vm" :follow org-vm-open :store = org-vm-store-link) ("w3m" :store org-w3m-store-link) ("rmail" :follow org-rmail-open :store = org-rmail-store-link) ("mhe" :follow org-mhe-open :store = org-mhe-store-link) ("irc" :follow org-irc-visit :store = org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export = org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store = org-gnus-store-link) ("eww" :follow org-eww-open :store = org-eww-store-link) ("docview" :follow org-docview-open :export org-docview-export :store = org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export = org-bbdb-export :complete org-bbdb-complete-link :store = org-bbdb-store-link) ("bookmark-other-win" :follow = bookmark-jump-other-window :export nil) ("bookmark" :follow bookmark-jump :export nil) = ("file+sys") ("file+emacs") ("shell" :follow = org-link--open-shell) ("news" :follow #[514 "\301\300\302=04Q=02\"\207" ["news" = browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("mailto" :follow #[514 "\301\300\302=04Q=02\"\207" ["mailto" = browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("https" :follow #[514 "\301\300\302=04Q=02\"\207" ["https" = browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("http" :follow #[514 "\301\300\302=04Q=02\"\207" ["http" = browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("ftp" :follow #[514 "\301\300\302=04Q=02\"\207" ["ftp" = browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-link-elisp-confirm-function 'yes-or-no-p outline-minor-mode-prefix "=03=0F" org-table-copy-increment nil ) --=20 Alan Wehmann Alan.Wehmann@gmail.com