From 4da55b228c72af7ec8acf229cd5207469b89b0ee Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Thu, 22 Aug 2024 18:10:18 +0200
Subject: [PATCH 001/329] Delete trailing white spaces
---
.github/FUNDING.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 20032d4a3..51a75d430 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,3 +1,3 @@
# These are supported funding model platforms
github: emacs-helm
-custom: https://www.patreon.com/user?u=86324343
+custom: https://www.patreon.com/user?u=86324343
From a047e69118928a3b10e9eaacded99db21f65e8a2 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Sat, 24 Aug 2024 07:22:50 +0200
Subject: [PATCH 002/329] Update documentation
---
helm-help.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/helm-help.el b/helm-help.el
index 09678fef0..02c1426c5 100644
--- a/helm-help.el
+++ b/helm-help.el
@@ -483,12 +483,21 @@ Use `xdg-open' to open files.
*** Toggle auto-completion
+Normally auto-completion in helm-find-files is disabled by
+default but you can toggle it with `\\[helm-ff-run-toggle-auto-update]'. To enable it on startup by
+default, customize `helm-ff-auto-update-initial-value'.
+
It is useful when trying to create a new file or directory and you don't want
Helm to complete what you are writing.
Note: On a terminal, the default binding `C-' may not work.
In this case use `C-c '.
+*** Show infos of files
+
+To have infos on files like size, permissions etc... hit `\\[helm-ff-properties-persistent]'.
+To have automatically brief infos on selected file, turn on `helm-popup-tip-mode'.
+
*** You can create a new directory and a new file at the same time
Simply write the path in the prompt and press `RET', e.g.
From 52ed53b37d21f79da8171ac2bf07cb89e11cb4d2 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Sat, 24 Aug 2024 07:47:37 +0200
Subject: [PATCH 003/329] Fix a possible error with helm-window in popup-info
---
helm-utils.el | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/helm-utils.el b/helm-utils.el
index b116e1c3d..481c2978f 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -1042,16 +1042,21 @@ Assume regexp is a pcre based regexp."
(run-with-idle-timer
1 nil
(lambda ()
- (save-selected-window
- (with-helm-window
- ;; Use helm-grep-fname prop instead of help-echo as help-echo
- ;; maybe used by mouse overlay after resume.
- (let ((pos (save-excursion (end-of-visual-line) (point))))
- (helm-aif (and popup-info-fn
- (funcall popup-info-fn (helm-get-selection)))
- (helm-tooltip-show
- (concat " " it)
- pos)))))))))))
+ ;; We may have an error (wrong-type-argument window-live-p nil)
+ ;; when switching to help window, the error may occur in the
+ ;; small lap of time where the helm-window is deleted and the
+ ;; help buffer not already displayed.
+ (ignore-error wrong-type-argument
+ (save-selected-window
+ (with-helm-window
+ ;; Use helm-grep-fname prop instead of help-echo as help-echo
+ ;; maybe used by mouse overlay after resume.
+ (let ((pos (save-excursion (end-of-visual-line) (point))))
+ (helm-aif (and popup-info-fn
+ (funcall popup-info-fn (helm-get-selection)))
+ (helm-tooltip-show
+ (concat " " it)
+ pos))))))))))))
;;;###autoload
(define-minor-mode helm-popup-tip-mode
From 73d8d6f79cdbc744505638ff3caf1be3049d1404 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Sat, 24 Aug 2024 07:55:57 +0200
Subject: [PATCH 004/329] Run popup-info in helm-help-mode-after-hook
---
helm-utils.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/helm-utils.el b/helm-utils.el
index 481c2978f..2b00c7589 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -1069,8 +1069,10 @@ this source to fetch infos on candidate."
(if helm-popup-tip-mode
(progn
(add-hook 'helm-move-selection-after-hook 'helm-maybe-show-help-echo)
+ (add-hook 'helm-help-mode-after-hook 'helm-maybe-show-help-echo)
(add-hook 'helm-cleanup-hook 'helm-cancel-help-echo-timer))
(remove-hook 'helm-move-selection-after-hook 'helm-maybe-show-help-echo)
+ (remove-hook 'helm-help-mode-after-hook 'helm-maybe-show-help-echo)
(remove-hook 'helm-cleanup-hook 'helm-cancel-help-echo-timer)))
(defun helm-open-file-with-default-tool (file)
From 15be79e5da4732314984ccc0932f96a5a5c50ef7 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Sat, 24 Aug 2024 07:59:09 +0200
Subject: [PATCH 005/329] Fix typo in docstring
---
helm-utils.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/helm-utils.el b/helm-utils.el
index 2b00c7589..862516cd3 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -1062,7 +1062,7 @@ Assume regexp is a pcre based regexp."
(define-minor-mode helm-popup-tip-mode
"Show additional informations in a popup tip at end of line.
-When the mode is enabled, popup showup when the source the source
+When the mode is enabled, popup showup when the source
has a `popup-info' attribute which define a specific function for
this source to fetch infos on candidate."
:global t
From 543e2fa5ddd8c8ec0b28541841db45d8a9dcaec1 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Sun, 25 Aug 2024 06:22:36 +0200
Subject: [PATCH 006/329] Allow showing marked in all sources in mode-line
when source has a all-marked attribute.
This is useful when marking in main source and dummy-source
e.g. wildcard or new directory.
helm-source has now a new slot :all-marked.
When helm-display-mode-line finds this slot it display marked from all sources.
---
helm-core.el | 18 +++++++++---------
helm-source.el | 8 +++++++-
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/helm-core.el b/helm-core.el
index 62caa1f82..d03974e2b 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -5835,17 +5835,17 @@ mode and header lines."
(assoc-default 'mode-line source))
(default-value 'helm-mode-line-string))
source))
- (let ((follow (and (or (helm-follow-mode-p source)
+ (let* ((src-name (assoc-default 'name source))
+ (follow (and (or (helm-follow-mode-p source)
(and helm-follow-mode-persistent
- (member (assoc-default 'name source)
- helm-source-names-using-follow)))
+ (member src-name helm-source-names-using-follow)))
" (HF)"))
- (marked (and helm-marked-candidates
- (cl-loop with cur-name = (assoc-default 'name source)
- for c in helm-marked-candidates
- for name = (assoc-default 'name (car c))
- when (string= name cur-name)
- collect c))))
+ (marked (if (assoc-default 'all-marked source)
+ helm-marked-candidates
+ (cl-loop for c in helm-marked-candidates
+ for name = (assoc-default 'name (car c))
+ when (string= name src-name)
+ collect c))))
;; Setup mode-line.
(if helm-mode-line-string
(setq mode-line-format
diff --git a/helm-source.el b/helm-source.el
index ca0072f68..dbfe3207c 100644
--- a/helm-source.el
+++ b/helm-source.el
@@ -726,7 +726,13 @@
:documentation
" A function that show infos in a popup on the selected candidate.
This happen when `helm-popup-tip-mode' is enabled.
- The function is called on candidate."))
+ The function is called on candidate.")
+ (all-marked
+ :initarg :all-marked
+ :initform nil
+ :custom boolean
+ :documentation
+ " When non nil display marked candidates from all sources in mode-line."))
"Main interface to define helm sources."
:abstract t)
From ced8c888a694e3c0c7510f94753a116681808365 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Sun, 25 Aug 2024 07:23:34 +0200
Subject: [PATCH 007/329] Fix docstring and error message in helm-ff-mcp
---
helm-files.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/helm-files.el b/helm-files.el
index d8202f263..2a728a83e 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -6537,7 +6537,7 @@ list."
"Copy the car of marked candidates to the remaining marked candidates.
The car of marked should be a regular file and the rest of marked (cdr) should
-be directories."
+be existing directories."
(let* ((mkd (helm-marked-candidates))
(file (car mkd))
(targets (cdr mkd))
@@ -6546,7 +6546,7 @@ be directories."
(cl-assert (file-regular-p file) nil (format "ERROR: Not a regular file `%s'" file))
(cl-assert targets nil (format "ERROR: No destination specified for file `%s'" file))
(cl-assert (cl-loop for f in targets always (file-directory-p f)) nil
- "ERROR: Destinations must be directories")
+ "ERROR: Destinations must be existing directories")
(when targets
(cl-loop with yes-for-all
for dest in targets
From bf9854ec8e5971eba836663baaa50d85f97bb2a6 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Sun, 25 Aug 2024 07:24:26 +0200
Subject: [PATCH 008/329] Allow marking wildcard candidates in HFF dummy source
---
helm-files.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/helm-files.el b/helm-files.el
index 2a728a83e..279b300c7 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -1162,6 +1162,7 @@ want to use it, helm is still providing
(action :initform 'helm-find-files-actions)
(before-init-hook :initform 'helm-find-files-before-init-hook)
(after-init-hook :initform 'helm-find-files-after-init-hook)
+ (all-marked :initform t)
(group :initform 'helm-files)))
;; Bookmark handlers.
@@ -1275,7 +1276,9 @@ ACTION can be `rsync' or any action supported by `helm-dired-action'."
(cons "rsync" helm-rsync-switches) " ")
'helm-rsync-command-history)))))
(ifiles (mapcar 'expand-file-name ; Allow modify '/foo/.' -> '/foo'
- (helm-marked-candidates :with-wildcard t)))
+ ;; Use :all-sources to allow actions on wildcards
+ ;; marked in dummy source.
+ (helm-marked-candidates :with-wildcard t :all-sources t)))
(cand (unless (cdr ifiles) (helm-get-selection))) ; preselection.
(prefarg helm-current-prefix-arg)
(prompt (format "%s %s file(s) %s: "
@@ -5603,6 +5606,7 @@ Use it for non-interactive calls of `helm-find-files'."
(lambda (_candidates _source)
(unless (file-exists-p helm-pattern)
(list (helm-ff-filter-candidate-one-by-one helm-pattern nil t))))
+ :all-marked t
:keymap 'helm-find-files-map
:action 'helm-find-files-actions))
From 43648ecabc23dd1516ee08f34487e923a32363cb Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Sun, 25 Aug 2024 06:43:32 +0200
Subject: [PATCH 009/329] Remove duplicates in helm-marked-candidates
when using at the same time :all-sources and :with-wildcard.
---
helm-core.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/helm-core.el b/helm-core.el
index d03974e2b..0ea4e2647 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -7751,7 +7751,11 @@ sources."
when (or all-sources
(equal (assq 'name source)
(assq 'name current-src)))
- append (helm--compute-marked real source use-wc)))
+ nconc (helm--compute-marked real source use-wc) into mkds
+ finally return
+ (if (and with-wildcard all-sources)
+ (helm-fast-remove-dups mkds :test 'equal)
+ mkds)))
sel)
(unless candidates
(setq sel (helm-get-selection
From 5d2fe41be729f277f2baea90fbeb20e08d6a0a9e Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Sun, 25 Aug 2024 10:09:25 +0200
Subject: [PATCH 010/329] Fix edit fnames action name
---
helm-files.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/helm-files.el b/helm-files.el
index 279b300c7..7922dbdb3 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -795,7 +795,11 @@ when moving out of directory when non nil."
"Find file in Dired" 'helm-point-file-in-dired
"View file" 'view-file
"Query replace fnames on marked `M-@'" 'helm-ff-query-replace-fnames-on-marked
- "Marked files in dired `C-x C-q'" 'helm-ff-edit-marked-files
+ (lambda ()
+ (helm-acase helm-ff-edit-marked-files-fn
+ (helm-marked-files-in-dired "Edit filenames in Wdired `C-x C-q'")
+ (helm-ff-wfnames "Edit filenames in Wfnames `C-x C-q'")))
+ 'helm-ff-edit-marked-files
"Query replace contents on marked `M-%'" 'helm-ff-query-replace
"Query replace regexp contents on marked `C-M-%'" 'helm-ff-query-replace-regexp
"Attach file(s) to mail buffer `C-c C-a'" 'helm-ff-mail-attach-files
From 5cc90a5650e28f93152343bf2c1f60c9e29658d5 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Mon, 26 Aug 2024 06:04:18 +0200
Subject: [PATCH 011/329] Reorder defcustom in helm-files (Fix #2683)
---
helm-files.el | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/helm-files.el b/helm-files.el
index 7922dbdb3..f8924eb0c 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -789,6 +789,19 @@ when moving out of directory when non nil."
"History source in *eshell-command-on-file appears on top when non nil."
:type 'boolean)
+(defcustom helm-ff-edit-marked-files-fn #'helm-ff-wfnames
+ "A function to edit filenames in a special buffer.
+
+By default `wfnames' package is used to avoid wdired which
+doesn't always work with all emacs versions and also is quite
+clumsy about default-directory among other things. If you still
+want to use it, helm is still providing
+`helm-marked-files-in-dired'."
+ :type '(choice (function :tag "Use Wfnames package to edit filenames."
+ helm-ff-wfnames)
+ (function :tag "Use Wdired package to edit filenames."
+ helm-marked-files-in-dired)))
+
(defcustom helm-find-files-actions
(helm-make-actions
"Find File" 'helm-find-file-or-marked
@@ -931,19 +944,6 @@ present in this list."
;; Force rebuilding the source to remove the highlight match FCT.
(setq helm-source-find-files nil)))
-(defcustom helm-ff-edit-marked-files-fn #'helm-ff-wfnames
- "A function to edit filenames in a special buffer.
-
-By default `wfnames' package is used to avoid wdired which
-doesn't always work with all emacs versions and also is quite
-clumsy about default-directory among other things. If you still
-want to use it, helm is still providing
-`helm-marked-files-in-dired'."
- :type '(choice (function :tag "Use Wfnames package to edit filenames."
- helm-ff-wfnames)
- (function :tag "Use Wdired package to edit filenames."
- helm-marked-files-in-dired)))
-
(defcustom helm-ff-ignore-following-on-directory nil
"In follow mode ignore silently directories when non nil."
:type 'boolean)
From be22cc39159a8d5910d7c20cf47035cb23a5dae7 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Mon, 26 Aug 2024 08:50:56 +0200
Subject: [PATCH 012/329] Make the helm-attributes dired line more compact
New function helm-format-time-string, use it instead of
format-time-string in helm-attributes.
Remove spaces and octal form in permissions in dired line.
---
helm-utils.el | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/helm-utils.el b/helm-utils.el
index 862516cd3..cb4a319c5 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -698,6 +698,18 @@ readable format,see `helm-file-human-size'."
(helm-file-human-size total)
total)))
+(defun helm-format-time-string (time)
+ "Format the time value TIME.
+If year of TIME is inferior to current year
+use \"%b %e %Y\" otherwise use \"%b %e %H:%M\"."
+ (let ((current-year (nth 5 (decode-time)))
+ (year (nth 5 (decode-time time)))
+ (fmt-opt '("%b %e %H:%M"
+ "%b %e %Y")))
+ (if (< year current-year)
+ (format-time-string (nth 1 fmt-opt) time)
+ (format-time-string (nth 0 fmt-opt) time))))
+
(cl-defun helm-file-attributes
(file &key type links uid gid access-time modif-time
status size mode gid-change inode device-num dired human-size
@@ -743,12 +755,10 @@ you have in `file-attributes'."
:uid uid
:gid gid
:access-time (if string
- (format-time-string
- "%Y-%m-%d %R" access-time)
+ (helm-format-time-string access-time)
access-time)
:modif-time (if string
- (format-time-string
- "%Y-%m-%d %R" modif-time)
+ (helm-format-time-string modif-time)
modif-time)
:status (if string
(format-time-string
@@ -773,7 +783,8 @@ you have in `file-attributes'."
(gid-change (cl-getf all :gid-change))
(inode (cl-getf all :inode))
(device-num (cl-getf all :device-num))
- (dired (helm-file-attributes-dired-line all human-size))
+ (dired (helm-file-attributes-dired-line
+ all human-size octal))
(human-size (helm-file-human-size (cl-getf all :size)))
(mode-type (cl-getf modes :mode-type))
(mode-owner (cl-getf modes :user))
@@ -782,10 +793,10 @@ you have in `file-attributes'."
(octal (cl-getf modes :octal))
(t (append all modes))))))
-(defun helm-file-attributes-dired-line (all &optional human-size)
+(defun helm-file-attributes-dired-line (all &optional human-size show-octal)
(format "%s %s %s:%s %s %s"
(helm-split-mode-file-attributes
- (cl-getf all :mode) t)
+ (cl-getf all :mode) t show-octal)
(number-to-string (cl-getf all :links))
(cl-getf all :uid)
(cl-getf all :gid)
@@ -794,7 +805,7 @@ you have in `file-attributes'."
(int-to-string (cl-getf all :size)))
(cl-getf all :modif-time)))
-(defun helm-split-mode-file-attributes (modes &optional string)
+(defun helm-split-mode-file-attributes (modes &optional string show-octal)
"Split MODES in a list of modes.
MODES is same as what (nth 8 (file-attributes \"foo\")) would return."
(if (string-match "\\`\\(.\\)\\(...\\)\\(...\\)\\(...\\)\\'" modes)
@@ -802,9 +813,11 @@ MODES is same as what (nth 8 (file-attributes \"foo\")) would return."
(user (match-string 2 modes))
(group (match-string 3 modes))
(other (match-string 4 modes))
- (octal (helm-ff-numeric-permissions (list user group other))))
+ (octal (and show-octal
+ (helm-ff-numeric-permissions
+ (list user group other)))))
(if string
- (mapconcat 'identity (list type user group other octal) " ")
+ (mapconcat 'identity (list type user group other (or octal "")) "")
(list :mode-type type :user user
:group group :other other
:octal octal)))
From c4d35c3c56ab770845f86d762298cc49dd97acff Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Mon, 26 Aug 2024 09:03:50 +0200
Subject: [PATCH 013/329] Make popup-info string more compact
---
helm-files.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/helm-files.el b/helm-files.el
index f8924eb0c..b4a9ba172 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -1143,7 +1143,9 @@ present in this list."
helm-ff-sort-candidates))
(popup-info :initform (lambda (candidate)
(unless (helm-ff-dot-file-p candidate)
- (helm-file-attributes candidate :dired t :human-size t))))
+ (helm-file-attributes
+ candidate
+ :dired t :human-size t :octal nil))))
(persistent-action-if :initform 'helm-find-files-persistent-action-if)
(persistent-help :initform "Hit1 Expand Candidate, Hit2 or (C-u) Find file")
(help-message :initform 'helm-ff-help-message)
From 351e02db26c48719090a59b50a7318f668fa8a86 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Mon, 26 Aug 2024 12:02:43 +0200
Subject: [PATCH 014/329] Change backquote to quote
---
helm-utils.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/helm-utils.el b/helm-utils.el
index cb4a319c5..fbbf04a27 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -1017,7 +1017,7 @@ Assume regexp is a pcre based regexp."
(defvar helm--show-help-echo-timer nil)
(defvar helm--maybe-show-help-echo-overlay nil)
(defface helm-tooltip
- `((t :background "Goldenrod"
+ '((t :background "Goldenrod"
:foreground "black"))
"Face used by `helm-tooltip-show'."
:group 'helm-grep-faces)
From 5c2adb1fe1b5fe3bf196e74bc1aed67e22decf13 Mon Sep 17 00:00:00 2001
From: Thierry Volpiatto
Date: Mon, 26 Aug 2024 18:52:58 +0200
Subject: [PATCH 015/329] Update README
---
README.md | 5 ++---
images/screenshot002.png | Bin 0 -> 1490187 bytes
2 files changed, 2 insertions(+), 3 deletions(-)
create mode 100644 images/screenshot002.png
diff --git a/README.md b/README.md
index a4531bc93..5654e93f0 100644
--- a/README.md
+++ b/README.md
@@ -34,11 +34,10 @@
***
- Helm in action searching with Grep Ag
-
+ Helm in action browsing images
-
+
[badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg
diff --git a/images/screenshot002.png b/images/screenshot002.png
new file mode 100644
index 0000000000000000000000000000000000000000..14a0f375739df6ae18eab06834fc058d475f48ce
GIT binary patch
literal 1490187
zcmc$_cU05Q);Mm(ZmdK%|NwRY1Bx=)H)PPy(V(5CNq0x&&+=Ier8XczAl)Yl$n%(fPh>}Q{9k&
z;BEu~!EFYTJ2y|*`TRcLeBAa{)p|~H^9mt(4J9CWK%k|r@;o5tPkZ2Ewed?VzN4yP
z4_ntX_~6as=Q*JHpJKhGszSwIdMgSY-VKD64h(;r^is{CGfFCeuS9seyq8UdeOUKY
ze=K