From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +AG2CZWuy2KJKgAAbAwnHQ (envelope-from ) for ; Mon, 11 Jul 2022 07:01:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qAmpCZWuy2LeAAAA9RJhRA (envelope-from ) for ; Mon, 11 Jul 2022 07:01:09 +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 BB75C2A334 for ; Mon, 11 Jul 2022 07:01:08 +0200 (CEST) Received: from localhost ([::1]:35568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAlXf-000229-FF for larch@yhetil.org; Mon, 11 Jul 2022 01:01:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAlWx-0001yx-FW for emacs-orgmode@gnu.org; Mon, 11 Jul 2022 01:00:26 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:33533) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAlWv-0006Bd-Bx for emacs-orgmode@gnu.org; Mon, 11 Jul 2022 01:00:23 -0400 Received: by mail-pg1-x533.google.com with SMTP id 72so3843916pge.0 for ; Sun, 10 Jul 2022 22:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=1HLZeZE4iLxtJ4egI11KdS/Y6ihoFewYiiB9oi5Q03o=; b=g1BBo/oGLs1XyhdWdi+fXCQu3gZDjn8hIaAjpW5Psdx/MAD+9c8cnqAjSt4yjCY0UY X+on90n0mgNIdawf0CJZSYE/bhVPgNbTBqp9jhwGtpSBzeKwF+UQXH8AASKcSqOcKrLZ YhNnh0+dU9at9/VT7EK+9tHsHZabIdjObGMG436xQOk6/Uf5ezb2geXWvJ2vbn8mMuzX 2Px4W+IfvxssFAeouB+8bwUH1vBStqo+MjAfIMCWD+X+sVwf67+LGgN8vQJdTeP5ULJZ gDedktCjHUpuNlb1DTmq36/PbKXvw1ELr358Jhcpvkt1Z8O6x2eD88Fh7H1q4so8z/4M 0hrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=1HLZeZE4iLxtJ4egI11KdS/Y6ihoFewYiiB9oi5Q03o=; b=H12L6IenRwTwFnzvf5UcBeG1GQNjNZK83oJXudWO2AQPGkcI0jQUZX+fTEtBVffkL5 k7QHPikZhEoJ/G0K9WZvHtgo4NMD0MQ3Or9iJiTDdj4Dz+KdJ48hBwja7xNgcpxJw3wu l9yImnu4d7CBWnCoaGv62gM/pDtxJH9hKjP7eWx/hwtbNowQIckvpB5YSi6Vkt22GlwS pv26To88QlXBTtOZ7Kvdo7LE+eKEngU1/u5H35Hb2OH/IXWlPlslZXpnXRZCh9GeIP/0 FJ/XcfP1Nq4eVWU7GyKpJ21pDZyOcoWdoo8VcmwEnCUUIuiKRxew86rjnH1ZocdRaXHD CFvw== X-Gm-Message-State: AJIora+byPL8ePeOOQe6SBEvr61MhwwsFn1OazutGeIiog1vMEWmB+XD lz/fpmFnkYC8HbTCP+/moHE= X-Google-Smtp-Source: AGRyM1vjf+dYsYC2rtSCyOOp0D+pC+IZjDluJVMc22y/2KOMwGXQYEPkTXnJCLqFioQvhPHIcXvo1w== X-Received: by 2002:a65:6151:0:b0:412:e419:d651 with SMTP id o17-20020a656151000000b00412e419d651mr14694527pgv.378.1657515619598; Sun, 10 Jul 2022 22:00:19 -0700 (PDT) Received: from localhost ([157.52.138.46]) by smtp.gmail.com with ESMTPSA id n4-20020a170902d2c400b0016648412514sm3601716plc.188.2022.07.10.22.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jul 2022 22:00:18 -0700 (PDT) From: Ihor Radchenko To: Alan Wehmann Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Re: link error when file missing In-Reply-To: <874k25iax8.fsf@localhost> References: <87zgklmd0g.fsf@localhost> <874k25iax8.fsf@localhost> Date: Mon, 11 Jul 2022 13:01:25 +0800 Message-ID: <87h73oqm3e.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=yantar92@gmail.com; helo=mail-pg1-x533.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, 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=1657515669; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1HLZeZE4iLxtJ4egI11KdS/Y6ihoFewYiiB9oi5Q03o=; b=MqYcdufee9+8rR/L70EZXG2bOVFG7h98ikdNuN2Fqw4+zG14tBnQJ/62pyTakNubYm+icX MNeAKmKsuH2rBxss+ks2C8MYyy4jfOJrGY4ZSSJe96emq4tCiDiLA5L9Xevh9viE0DjkPN g5nrpnFcAQwDx6GvyOLtjblrGNCTCZ2VxL3e2HmeKPCOaZI5AsZ+Ulz042HJHPfxfx+gBI 3e3I001Hdof3I2dkM21RufeinBPzC8DgdXw5Q7h04fMz6X8CMjx9uNhFzbEOF16SkBLsva 5FuZAEPsM+Tgp9emhBhUbWGVRvluf+F/F4KpKT2t/zzwBTFKEgulP05w1ADejw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657515669; a=rsa-sha256; cv=none; b=ndQWU0cOkm4x8mm+oqJYXcZRPUWz4GFdCrIp3tP0Chpsf8bbrPDXGWBcloRRR3uOdDdQgA NdkwIR9GdFKY+EhpnKFNezGCud2nnor7Sw+qTKFSVo7acer9DSUxESWqyHivzpmxbJkbVM w4xxF7IVaiP9MYcFHdkpexnMGGoVuLinMiwYt7GYLX7Q+MaNKul0AOllGKjK2iNJjlgyCd UAcEFtiwDBh2QJWZCKcvlGMHAMuywKxVOwbOqYnuNUxtAfG72jwZXKsQ808/KJOY7C/moz fNsSyShSjiTudo5TzQvuAO5cLDAjfXGC2pARy6x6dvmWC7ZkXS3yFwD0nCkCJg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="g1BBo/oG"; 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: -1.95 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="g1BBo/oG"; 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: BB75C2A334 X-Spam-Score: -1.95 X-Migadu-Scanner: scn1.migadu.com X-TUID: j7Ss7ea+Qhah Ihor Radchenko writes: > Alan Wehmann writes: > >> Thanks for your reply. In my personal case I've modified "org-open-file" to throw an error for a non-existing file. In my case, clearly Emacs is not happy with a non-existing file--at least if it is a PDF file meant to be viewed by docview. Option 1 could have "org-docview-open" throw an error for a non-existing file, I suppose. You describe option 2 as risking existing configs. I am uninformed on such an issue. I only use Org from within Emacs. If a future problem occurs because I modified "org-open-file", I'll deal with it when it occurs. > > I thought more about this and I do not think that modifying > org-open-file is a good idea. The current behaviour could be useful for > people who would like to auto-create, say, .org/.txt files just by > typing a link and opening it. Even .svg files could be created like > this. > > So, I propose to update ol-docview instead. See the attached patch. Applied onto main via c231e93b5. Best, Ihor