Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Apr 2026 00:05:56 +0000
From:      Joseph Mingrone <jrm@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: cc704ef2c80e - main - editors/emacs-devel: Fix upstream TRAMP performance regression
Message-ID:  <69d1a764.1f7c7.7c6d7c4d@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by jrm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cc704ef2c80e6f003285036bd6ab520be34caf24

commit cc704ef2c80e6f003285036bd6ab520be34caf24
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2026-04-04 23:58:45 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2026-04-04 23:58:45 +0000

    editors/emacs-devel: Fix upstream TRAMP performance regression
    
    A recent upstream TRAMP refactoring caused significant slowdowns when
    completing remote directories.  This patch restores completion
    performance.
    
    See also:       https://debbugs.gnu.org/cgi/bugreport.cgi?bug=80747
    Sponsored by:   The FreeBSD Foundation
---
 editors/emacs-devel/Makefile                      |  1 +
 editors/emacs-devel/files/patch-lisp_net_tramp.el | 26 +++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/editors/emacs-devel/Makefile b/editors/emacs-devel/Makefile
index 212477025500..61b10a9584d8 100644
--- a/editors/emacs-devel/Makefile
+++ b/editors/emacs-devel/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	emacs
 DISTVERSION=	31.0.50.20260402
+PORTREVISION=	1
 PORTEPOCH=	3
 CATEGORIES=	editors
 PKGNAMESUFFIX=	-devel
diff --git a/editors/emacs-devel/files/patch-lisp_net_tramp.el b/editors/emacs-devel/files/patch-lisp_net_tramp.el
new file mode 100644
index 000000000000..a03ca44f463a
--- /dev/null
+++ b/editors/emacs-devel/files/patch-lisp_net_tramp.el
@@ -0,0 +1,26 @@
+--- lisp/net/tramp.el.orig	2026-04-02 17:47:36 UTC
++++ lisp/net/tramp.el
+@@ -3027,16 +3027,18 @@ BODY is the backend specific code."
+ 			     (format
+ 			      "file-name-all-completions-%s"
+ 			      tramp-fnac-add-trailing-slash)
+-			   ;; Mark symlinked directories.  Other
+-			   ;; directories are already marked.
++			   ;; Mark directories, including symlinks to
++			   ;; directories.  `file-directory-p' follows
++			   ;; symlinks, so no separate `file-symlink-p'
++			   ;; check is needed; for the tramp-sh backend
++			   ;; the result is already cached by the
++			   ;; completion script.
+ 			   (mapcar
+ 			    (lambda (x)
+ 			      (let ((f (file-name-concat ,directory x)))
+ 				(if (and tramp-fnac-add-trailing-slash
+ 					 (not (string-suffix-p "/" x))
+-					 (file-directory-p
+-					  (if (file-symlink-p f)
+-					      (file-truename f) f)))
++					 (file-directory-p f))
+ 				    (concat x "/") x)))
+ 			    ;; Some storage systems do not return "." and "..".
+ 			    (seq-union


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69d1a764.1f7c7.7c6d7c4d>