all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#68632: [PATCH] Downcase host name to match URL parsing behavior
@ 2024-01-21 10:05 Brad Howes via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-27 10:33 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Brad Howes via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-21 10:05 UTC (permalink / raw)
  To: 68632

[-- Attachment #1: Type: text/plain, Size: 824 bytes --]

Tags: patch

Tags: patch

Tags: patch


When using `comint-osc-process-output' to track directory changes, there
can be a failure to match host names due to inconsistent behavior
between `url-generic-parse-url' and `ansi-osc-directory-tracker. The
former applies `downcase' to the result extracted from the URL but the
latter does not.


In GNU Emacs 29.1 (build 1, aarch64-apple-darwin21.6.0, NS
appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2023-08-17 built on
armbob.lan
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.2.1

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000
-DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no'


[-- Attachment #2: 0001-Downcase-host-name-to-match-URL-parsing-behavior.patch --]
[-- Type: application/octet-stream, Size: 963 bytes --]

From 1be1c11a33b87612dd2b768f3cdf43b11c1ecdc9 Mon Sep 17 00:00:00 2001
From: Brad Howes <bradhowes@mac.com>
Date: Sun, 21 Jan 2024 10:07:24 +0100
Subject: [PATCH] Downcase host name to match URL parsing behavior

---
 lisp/ansi-osc.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ansi-osc.el b/lisp/ansi-osc.el
index 7e686193f69..8dbaeb45132 100644
--- a/lisp/ansi-osc.el
+++ b/lisp/ansi-osc.el
@@ -121,7 +121,8 @@ ansi-osc-directory-tracker
   (let ((url (url-generic-parse-url text)))
     (when (and (string= (url-type url) "file")
                (or (null (url-host url))
-                   (string= (url-host url) (system-name))))
+                   ;; Use `downcase' to match `url-generic-parse-url' behavior
+                   (string= (url-host url) (downcase (system-name)))))
       (ignore-errors
         (cd-absolute (url-unhex-string (url-filename url)))))))
 
-- 
2.39.3 (Apple Git-145)


[-- Attachment #3: Type: text/plain, Size: 2 bytes --]




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#68632: [PATCH] Downcase host name to match URL parsing behavior
  2024-01-21 10:05 bug#68632: [PATCH] Downcase host name to match URL parsing behavior Brad Howes via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-01-27 10:33 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-01-27 10:33 UTC (permalink / raw)
  To: Brad Howes; +Cc: 68632-done

> Date: Sun, 21 Jan 2024 11:05:26 +0100
> From:  Brad Howes via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> When using `comint-osc-process-output' to track directory changes, there
> can be a failure to match host names due to inconsistent behavior
> between `url-generic-parse-url' and `ansi-osc-directory-tracker. The
> former applies `downcase' to the result extracted from the URL but the
> latter does not.

Thanks, installed on the master branch, and closing the bug.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-27 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-21 10:05 bug#68632: [PATCH] Downcase host name to match URL parsing behavior Brad Howes via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-27 10:33 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.