From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.devel Subject: Re: browse-url and URL handlers (MS-Windows) Date: Tue, 11 Oct 2022 14:32:21 +0200 Message-ID: <87fsfuee22.fsf@gmail.com> References: <825yh1b5si.fsf@gmail.com> <87czb61xv1.fsf@gnu.org> <82k056r7zw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32662"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Pascal Quesseveur Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 11 15:48:46 2022 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 1oiFch-00089Z-Uc for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 15:48:43 +0200 Original-Received: from localhost ([::1]:40534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiFcg-0008B1-RM for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 09:48:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiER5-0000Vk-Pk for emacs-devel@gnu.org; Tue, 11 Oct 2022 08:32:41 -0400 Original-Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:46057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiER1-00017c-Pc for emacs-devel@gnu.org; Tue, 11 Oct 2022 08:32:37 -0400 Original-Received: by mail-ed1-x52a.google.com with SMTP id a67so10531391edf.12 for ; Tue, 11 Oct 2022 05:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=FhJa1Y/Uc80omMsB+80JShfJQIXc5PjLLp34UyC5ZjQ=; b=gNz0++Y7L4Ub1f2Xwsickymj6AFEuLLvATyIThNyW+5MlYCf+OHrymN0m1tYvPwRXG oEaa9VRNJ9doWdScmnwjUPbcI08PP2um/Zr7l5uTdjVDhpEs3zM49cNFkubikc8oUdxv UmWoDS4MPJ0Ihe/f7//ium2a6+sPOU5Q4bLfG0jowBhkcAdrLFeGJIzUCZWSfQe0CZKe OJnw0vHRy5vNq7aBetmaNRAxY/6oGtdPPHVrc7iQIulpbUWJOGr5x7UfrJOpx2bKP/Na +4ZBMRiirqZqUcShJxK3RQpmlpPrpUaBIz/lB/qXYMMpX6BmJYDcb+j5zMMGep2lgTXs 9HTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FhJa1Y/Uc80omMsB+80JShfJQIXc5PjLLp34UyC5ZjQ=; b=wLrVrO7fi3RtuPCyh5tRUqmrnBXDDyB9wEUESAV1ZqtSMw5ZpkFAwWr8DYICnBHR2Q 6POKcOWozvx65dr+noK/GvuC+SIqV7N5oXGagwkNeBfG/kEp4GNFAm7jR9fzOh3uReJG irKYktqiRR5niOb/NaAJzihgknB2Y4rMGHJxlPVBsqowehnIxRyvg/FLYMaRXlE5KgWG kKtjDiDmM5QX28Mk2CBSMR86OtF21Cz/YS5Z1uE3CCrVU11P6kk+GZUhaIkB6NWRd0HT wp72vQxM6cZr3FAHdCOzCbmmRrGYFqAmQuF2M49Imw7pK2624pumV/OSZL4ew4VqYdCr tDEQ== X-Gm-Message-State: ACrzQf1mUwWt6LujutEuSsNPE2BXeDwzKfrpnpX3MsQZmhnxBnAOud5H zakn3fZhkjxFTvGzhTedy2Pe2jaWdJk= X-Google-Smtp-Source: AMsMyM7/f7t1cMddhJ9M8L+PCvhPoL3ZOFPakj4uRV0vkmcVpXTY4yI/APmWrvz0h+flSeJ9HsoZMw== X-Received: by 2002:a05:6402:5ca:b0:445:c80a:3c2 with SMTP id n10-20020a05640205ca00b00445c80a03c2mr22687923edx.247.1665491544076; Tue, 11 Oct 2022 05:32:24 -0700 (PDT) Original-Received: from ars3 (pd95c95b0.dip0.t-ipconnect.de. [217.92.149.176]) by smtp.gmail.com with ESMTPSA id b20-20020a17090630d400b0077f20a722dfsm6908324ejb.165.2022.10.11.05.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 05:32:22 -0700 (PDT) In-Reply-To: <82k056r7zw.fsf@gmail.com> (Pascal Quesseveur's message of "Tue, 11 Oct 2022 12:04:51 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=arstoffel@gmail.com; helo=mail-ed1-x52a.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 autolearn=ham autolearn_force=no X-Spam_action: no action 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:297484 Archived-At: On Tue, 11 Oct 2022 at 12:04, Pascal Quesseveur wrote: > Hello, > > In fact part of my problems comes from the fact that I was trying to > open an URL pointing to a Windows local file. When the URL is of the > form file://C:/some/file browse-url-emacs does not open the file even > if it is a text file. > > From https://en.wikipedia.org/wiki/File_URI_scheme it seems a correct > form for a Windows local file is file:///C:/some/file (3 > slashes). When I use this form browse-url-emacs allows to open some > files, but always causes the following message: > > File exists, but cannot be read > > this although the file is read. > > Everything is not working properly. For example in the case of an > image the buffer displays the contents of the file, but not the > image. The messages displayed are: > > Type C-c C-c or C-c C-x to view the image as an image or hex. > Cannot display image: ( *mm*-273075 1 8193) > # > > I don't konw if this is because of the incorrectly reported read error > when opening the file. When the file content is displayed in the > buffer I can view the image with C-c C-c. I've come across issues with file URLs in Windows before, and the problem was that (url-filename (url-generic-parse-url "file:///C:/some/file")) returns "/C:/some/file", with an extra slash at the beginning.