[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 79c914247b: Fix Emacs-bug#74191 by using our own mini
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 79c914247b: Fix Emacs-bug#74191 by using our own minibuffer-completing-file-name |
Date: |
Sun, 3 Nov 2024 22:00:01 -0500 (EST) |
branch: elpa/helm
commit 79c914247b2640c3053faf64815bb8f51247ea90
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix Emacs-bug#74191 by using our own minibuffer-completing-file-name
variable.
---
helm-core.el | 3 +++
helm-mode.el | 11 +++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/helm-core.el b/helm-core.el
index 684c65bfa9..c436c7f6f5 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -197,6 +197,8 @@ window handling a buffer, it is this one we store.")
(defvar helm--deleting-minibuffer-contents-from nil
"[INTERNAL] Recenter when deleting minibuffer-contents and preselecting.
This is a flag used internally.")
+(defvar helm--minibuffer-completing-file-name nil
+ "Same as `minibuffer-completing-file-name' but doesn't affect
`file-directory-p'.")
;;; Multi keys
;;
@@ -4797,6 +4799,7 @@ See `helm-fuzzy-default-highlight-match'."
(cl-loop with diac = (helm-get-attr 'diacritics source)
with file-comp-p = (and (not (helm-action-window))
(or minibuffer-completing-file-name
+ helm--minibuffer-completing-file-name
(helm-get-attr 'completing-file-name
source)))
;; helm-pattern may have been modified (fuzzy) so ensure to
;; use helm-input which is the raw pattern.
diff --git a/helm-mode.el b/helm-mode.el
index 8ee94ebd13..98a578cfb6 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -545,6 +545,7 @@ If COLLECTION is an `obarray', a TEST should be needed. See
`obarray'."
;; Handle here specially such cases.
((and (functionp collection) (not (string= input ""))
(or minibuffer-completing-file-name
+ helm--minibuffer-completing-file-name
(eq (completion-metadata-get
(completion-metadata input collection test)
'category)
@@ -2015,7 +2016,11 @@ Keys description:
history nil nil alistp)))
(helm-ff--RET-disabled noret)
(minibuffer-completion-predicate test)
- (minibuffer-completing-file-name t)
+ ;; Since Emacs-30+ `minibuffer-completing-file-name' affect
+ ;; `file-directory-p' in that it returns `t' when testing e.g. "/ssh"
+ ;; which is not a directory, as a result we end up with error in
+ ;; `helm-find-files-get-candidates' when minibuffer contains only
"/ssh".
+ (helm--minibuffer-completing-file-name t)
;; Ensure not being prompted for password each time we
;; navigate to a directory.
(password-cache t)
@@ -2429,6 +2434,7 @@ Currently does nothing."
(let* ((split (helm-mm-split-pattern string))
(fpat (or (car split) ""))
(file-comp-p (or minibuffer-completing-file-name
+ helm--minibuffer-completing-file-name
(eq
(completion-metadata-get
(completion-metadata string collection predicate)
@@ -2520,7 +2526,8 @@ Currently does nothing."
(unless (string-match-p " " string)
(cl-multiple-value-bind (all pattern prefix suffix _carbounds)
(helm-completion--flex-all-completions string table pred point)
- (when minibuffer-completing-file-name
+ (when (or minibuffer-completing-file-name
+ helm--minibuffer-completing-file-name)
(setq all (completion-pcm--filename-try-filter all)))
(completion-pcm--merge-try pattern all prefix suffix))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/helm 79c914247b: Fix Emacs-bug#74191 by using our own minibuffer-completing-file-name,
ELPA Syncer <=