From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Simen =?UTF-8?Q?Endsj=C3=B8?= Newsgroups: gmane.emacs.bugs Subject: bug#70914: 29.3; Crashes often on Windows Date: Thu, 23 May 2024 20:33:34 +0200 Message-ID: References: <829659206.4083070.1716354489264@mail.yahoo.com> <582535681.1158538.1716358337102@mail.yahoo.com> <86zfsi6qdx.fsf@gnu.org> <867cfm6j14.fsf@gnu.org> <86v835676h.fsf@gnu.org> <86le415cmz.fsf@gnu.org> <87v834yg5o.fsf@localhost> <86v8344xtc.fsf@gnu.org> <87pltcyfbk.fsf@localhost> <86ttio4ve7.fsf@gnu.org> <87fru8ycdk.fsf@localhost> <86cypc4pra.fsf@gnu.org> <878r00y6sq.fsf@localhost> <868r004o9q.fsf@gnu.org> <871q5sy5d2.fsf@localhost> <865xv44itx.fsf@gnu.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="29381"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70914-done@debbugs.gnu.org, Ihor Radchenko , corwin@bru.st, ssbssa@yahoo.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 23 20:36:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sADIY-0007Tj-RU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 May 2024 20:36:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sADID-0003tw-S7; Thu, 23 May 2024 14:35:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sADIC-0003tG-0N for bug-gnu-emacs@gnu.org; Thu, 23 May 2024 14:35:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sADIB-0005s3-OY for bug-gnu-emacs@gnu.org; Thu, 23 May 2024 14:35:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sADII-0005r2-0z for bug-gnu-emacs@gnu.org; Thu, 23 May 2024 14:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simen =?UTF-8?Q?Endsj=C3=B8?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 May 2024 18:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70914 X-GNU-PR-Package: emacs Original-Received: via spool by 70914-done@debbugs.gnu.org id=D70914.171648930322487 (code D ref 70914); Thu, 23 May 2024 18:36:01 +0000 Original-Received: (at 70914-done) by debbugs.gnu.org; 23 May 2024 18:35:03 +0000 Original-Received: from localhost ([127.0.0.1]:60363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sADHK-0005qd-Vj for submit@debbugs.gnu.org; Thu, 23 May 2024 14:35:03 -0400 Original-Received: from mail-lf1-f49.google.com ([209.85.167.49]:51662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sADHG-0005q9-Ka for 70914-done@debbugs.gnu.org; Thu, 23 May 2024 14:35:02 -0400 Original-Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-51f45104ef0so8180672e87.3 for <70914-done@debbugs.gnu.org>; Thu, 23 May 2024 11:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716489226; x=1717094026; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YlJUi0AMO2m0nGELnK25veGufGuXuAzyElmPqt9OfTE=; b=Ab4Ivcudfi6UhdnsraMXa8lczTbHMcVX494r5o95HLR8gdQIGvzJvoHXzaFSC60k2N 4VlEsVgH+ZRAA8oovXX8JUtWxZKISh4wc1NmTnkJYQsJV02xjHjax032S1hTxUMBpvl5 eMwhwYCGFiEJzJi98r6cwdGXA4mJwfUGcczqWAxD4vn4zUzyWb5Na2Sjs6dk0+lsO7Vk VhQe5BpvTGD85Q72LcbbU6vcOT1qJkB1ylaWgFYD0lHrUP87sMTaBCnPApUwm5+0DiLq vIX3k7d5KQS5Y4P1bEfR/3wK3mfvLMz0b3sVI6C+iTO19h9ouavwYSc0m/Uylu9kkQlf ux6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716489226; x=1717094026; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YlJUi0AMO2m0nGELnK25veGufGuXuAzyElmPqt9OfTE=; b=Fpx2b6bvc/aqk91MvhOofq3Fh5w4FrAmbDNxO1aAUcKxBI0X1KqxaE6MTV7o9lWINm +EjhAfrs1p3fPtTkKobRwdeix7Xl+SGceU3t1w3jwSnOEvIx//zjpio8tKohNuHR131q glbWsCjW4uUhVQzKmNegPABZxvqjw2GWD7tamu1RH8Z0O7KMYZvdwEvwQWtiY9+dLhwL JkQ67IrHnIQTaEVNhYX8PAoLrFHHTddbh4og+0tgsZlcUanACo3DTh7kdXJMt73ip8Ax 9jAIw4Fw2QxDQ/UQKxb0y4a5LfPwhfo++uXumgN0pEPcO3Ir4GRAHy+vHbWTuyafNtMj LpaQ== X-Forwarded-Encrypted: i=1; AJvYcCW8rpHSQNq9IaN36vxxSaF2oRWlPR23KQ/z6eUC2stBNHxVlmH/82d7zKely5RXKmU8Oo0rm7sKQIchIuR9COX/VThCm+rRXb6btQ== X-Gm-Message-State: AOJu0Yxt2TkrCIy5IhcHgTEA7QqfFRI0VOaU/qUNu+Xqacl7HdAIWQbq 3lNm5kLcds8blYb/hOVfnmdzeLOAYjj/QDzDMIqW1ZzDw4XpHH0+S306mT8m2pQfcZPOwobWFJB 3kgitLkaaz8damTe8d3BXDxKzx04= X-Google-Smtp-Source: AGHT+IEhrGf0aLNdvOC5R2oVyDfHMJjaI6XcIoWcJkvfU8bQ0RFeC7nvT/G059uWVudbEEuCtb5uQqPWPk3epONtRmg= X-Received: by 2002:ac2:4650:0:b0:51d:9ce:c282 with SMTP id 2adb3069b0e04-526c078364bmr3784272e87.46.1716489225618; Thu, 23 May 2024 11:33:45 -0700 (PDT) In-Reply-To: <865xv44itx.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285727 Archived-At: > Got it. I'm closing this bug, since there doesn't seem to be anything > left to do here. Thanks, great job to all of you! Have to say this has been a pleasant suppo= rt experience :) Do you need anything from me? Should I create a patch, or are one of you on= it? On Thu, May 23, 2024 at 6:02=E2=80=AFPM Eli Zaretskii wrote: > > > From: Ihor Radchenko > > Cc: simendsjo@gmail.com, ssbssa@yahoo.de, corwin@bru.st, 70914@debbugs.= gnu.org > > Date: Thu, 23 May 2024 14:23:21 +0000 > > > > Eli Zaretskii writes: > > > > >> > My point is that if the URI is "file://", the corresponding :path = on > > >> > Windows is not "//". > > >> > > >> Sure. But what is passed to :activate-func is not a file path. It is > > >> "Org mode link path". They are not the same in this specific case, b= ut > > >> there is nothing wrong on Org side. > > > > > > Then on whose side is something wrong in this case? Which code calls > > > file-exists-p with the string "//" in the case you described? > > > > https://github.com/doomemacs/doomemacs/blob/master/modules/lang/org/con= fig.el#L500 > > > > >> >> IMHO, the bug is in file-exists-p: > > >> > > > >> > I don't think so. "//" is an invalid file name on Windows, so the > > >> > only requirement from file-exists-p in that case is not to crash. > > >> > Which it does, after the recent fix. > > >> > > >> IMHO, "invalid file name on Windows" leads to "trouble determining > > >> whether the file exists". > > > > > > Since the file name "//" is invalid, you get undefined behavior. > > > > > Examples: > > > > > > (file-exists-p "//) > > > =3D> nil > > > > As I tried to explain, I do not see the behaviour as "undefined" when t= he > > file name is really invalid. Not for `file-exists-p'. AFAIU, > > `file-attributes' and `file-directory-p' do not give such promises in > > their docstrings. > > > > > but > > > > > > (file-attributes "//") > > > =3D> (t 1 1001 513 (0 0 0 0) (0 0 0 0) (0 0 0 0) 0 "drwxrwxrwx" t= 0 0) > > > > This is somewhat surprising, but also somewhat expected - > > `file-exists-p' does not always mean that file does not exist: "This > > returns nil for a symlink to a nonexistent file." Yet, symlink to a > > nonexistent file can have attributes. So, I can see how > > `file-attributes' can return something strange for non-existing files. > > > > > and > > > > > > (file-directory-p "//") > > > =3D> nil > > > > This also follows from the docstring of `file-directory-p': > > > > Return t if FILENAME names an existing directory. > > > > Return nil if FILENAME does not name a directory, or if there > > was trouble determining whether FILENAME is a directory. > > > > >> AFAIU, this is what happens after the fix anyway, so there is nothin= g > > >> more that should be done on Emacs side. > > > > > > Generating such invalid file names is wrong, so it should be prevente= d > > > if possible. But I won't argue more if you are still unconvinced. > > > > Org does not care about "file" part. There is a link. The link has a > > path. User can put anything in that path. Org does not generate file > > names - Org parses Org link syntax and leaves its interpretation up to > > the more specialized code. > > > > Of course, if you see problems with Org mode code that interprets file > > links specifically and are _also_ designed to handle file links, I will > > be happy to fix edge cases like you described. The fontification code i= n > > Org mode has nothing to do with interpreting the meaning of the links. > > Got it. I'm closing this bug, since there doesn't seem to be anything > left to do here.