From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Edmondson Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] nextstep: Emacs can be used to edit PDF files Date: Tue, 23 Nov 2021 10:09:59 +0000 Message-ID: References: <20211110083818.57631-1-dme@dme.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39317"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Daniel =?utf-8?Q?Mart=C3=ADn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 23 13:31:37 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpUxU-000A3K-9A for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Nov 2021 13:31:36 +0100 Original-Received: from localhost ([::1]:46156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpUxS-0002Zz-KC for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Nov 2021 07:31:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpSkb-0001g7-Kn for emacs-devel@gnu.org; Tue, 23 Nov 2021 05:10:09 -0500 Original-Received: from [2a00:1450:4864:20::42d] (port=34546 helo=mail-wr1-x42d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpSkU-0005kP-U7 for emacs-devel@gnu.org; Tue, 23 Nov 2021 05:10:09 -0500 Original-Received: by mail-wr1-x42d.google.com with SMTP id j3so271304wrp.1 for ; Tue, 23 Nov 2021 02:10:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=f4HjEi1+o7Z2IbQjv+2Y6uu99RFldlHBQ3qmmeOHcro=; b=UgMokJrzJYirlaxhffKFJcdJsBBwVmdp8tw9Ue8fVx5oM+RE/hGjZzpbiXRm/wcM5f PpekGdVWJKt0RiQuE331hp+isQQR2oqBGdqhI0itKhE2gPC469stN3Ndvd7vp8QiinfW A8c2oYK24nxx1TR7/zkroWV1/lp1rIW0IEztS9WpMkbV3BOsz2l9MuRADQ6Yby/7tVRj Vydf2M/ublpZ420+rlTiu8uTujSIsHgZyamtXwyE/B/0408rp96PUcd0n5U1nkoJZwzr wRRYm2flbaeD+PuUY1Qj6MbwJ1t9PNRP/wclLktzsozloKFz7umu4DgJ1b0OhgbKGn1z LRpg== 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:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=f4HjEi1+o7Z2IbQjv+2Y6uu99RFldlHBQ3qmmeOHcro=; b=p39SEYho7JD4LK6p2+54sM2XRcSEVUefZ7drz+Uz8ckmxXPPh3+4xgPYg7pypfdG2K b+VdBqftxQf5RhZVwzjNld7hQrPnX81q0UjOrDloTpm1wHCA2CUHHceKoSQ0GwkyQ9s4 mikEkJy85MClhigzo/9eZ2J3R7HDAAF+IuCvzoQacGLaBffEpJ9p3RUzTg1AJTI7nfvd R+u097vuuDfMbFJ0dK1qFQlNhqKfNhO7RIp7CTzDV8hOLyV+vsQXnws3VHCBGFUdtMsV Z038rsNpznQgIhnzyNFw4pf+7Ixl/VWqUbfndXbKMFew9dI1YGsdDAkpMcRQIJCzMfxP 8sow== X-Gm-Message-State: AOAM533Z5xm+nKA7Sv46EFj+38haf4+D0cwZ6muub1vltD4vqPqUWFpN Hoja2dtvPm87PQZWZ2oW7Ljm65GiDi79kw== X-Google-Smtp-Source: ABdhPJw1zBkEEvuuv8jo0+Z9NqvF2vFsJKUrrLgLSKseWLOvNe14F9wzpDFdk2rdjIctolOJTaYc2w== X-Received: by 2002:a05:6000:1a45:: with SMTP id t5mr5791692wry.306.1637662200605; Tue, 23 Nov 2021 02:10:00 -0800 (PST) Original-Received: from disaster-area ([2001:8b0:bb71:7140:64::1]) by smtp.gmail.com with ESMTPSA id q4sm11405808wrs.56.2021.11.23.02.09.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Nov 2021 02:10:00 -0800 (PST) In-Reply-To: ("Daniel =?utf-8?Q?Mart=C3=ADn=22's?= message of "Fri, 19 Nov 2021 01:15:11 +0100") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42d (failed) Received-SPF: neutral client-ip=2a00:1450:4864:20::42d; envelope-from=dme@dme.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 23 Nov 2021 07:29:55 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279943 Archived-At: On Friday, 2021-11-19 at 01:15:11 +01, Daniel Mart=C3=ADn wrote: > David Edmondson writes: > >> Add editor role for PDF files, allowing them to be opened in Emacs via >> the Finder. >> --- >> nextstep/templates/Info.plist.in | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/nextstep/templates/Info.plist.in b/nextstep/templates/Info.= plist.in >> index f9f0ec0857..bd86a75e79 100644 >> --- a/nextstep/templates/Info.plist.in >> +++ b/nextstep/templates/Info.plist.in >> @@ -488,6 +488,18 @@ along with GNU Emacs. If not, see . >> CFBundleTypeRole >> Editor >> >> + >> + CFBundleTypeExtensions >> + >> + pdf >> + >> + CFBundleTypeIconFile >> + document.icns >> + CFBundleTypeName >> + PDF document >> + CFBundleTypeRole >> + Editor >> + >> >> CFBundleTypeExtensions >> > > Thanks for the patch, but by default Emacs opens PDF files in > fundamental-mode, which IMO is not very convenient for reading PDFs. I don't see this as a reason not to include the patch. Users are not forced to use Emacs to open PDFs, so this is only something that will happen with explicit configuration or selection in any case. I would also argue that fundamental mode is not a terrible place to edit PDF documents. It's not a very good viewer, but then... > It's true that there's also doc-view-mode, but that requires some extra > configuration. ...doc-view-mode is a *terrible* PDF viewer for larger (1000+ page) documents, and it is the default if ghostscript is found. > If someone has configured Emacs to be a good PDF viewer, they can always > force the Open With dialog to open PDFs with Emacs. If one wishes to open all PDF documents with Emacs then this is a good solution. If, as in my case, someone wishes to open some PDF documents using Emacs, the existing "Open with..." is very cumbersome to use, as it requires navigating the filesystem to find the Emacs application every time. The current Info.plist.in includes a clause that attempts to make Emacs available as an editor for *all* file types on macOS, but Apple appear to have discontinued support for this, which is unfortunate. dme. --=20 There's someone in my head but it's not me.