From 7028fe4466ad58cca88a6f2da4d48065d663b234 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Tue, 3 Aug 2021 17:56:04 +0200 Subject: [PATCH] update helm --- bba.org | 2 +- .../.dir-locals.el | 6 +- .../emacs-helm.sh | 0 .../helm-adaptive.el | 6 - .../helm-autoloads.el | 15 +- .../helm-bookmark.el | 10 +- .../helm-buffers.el | 32 +- .../helm-color.el | 9 +- .../helm-comint.el | 6 - .../helm-command.el | 75 +-- .../helm-config.el | 6 - .../helm-dabbrev.el | 6 - .../helm-easymenu.el | 6 - .../helm-elisp-package.el | 0 .../helm-elisp.el | 16 +- .../helm-epa.el | 43 +- .../helm-eshell.el | 27 +- .../helm-eval.el | 6 - .../helm-external.el | 6 - .../helm-fd.el | 19 +- .../helm-files.el | 551 ++++++++++++------ .../helm-find.el | 6 - .../helm-font.el | 20 +- .../helm-for-files.el | 10 +- .../helm-global-bindings.el | 6 - .../helm-grep.el | 22 +- .../helm-help.el | 450 +++++++------- .../helm-id-utils.el | 6 - .../helm-imenu.el | 12 +- .../helm-info.el | 10 +- .../helm-locate.el | 8 +- .../helm-man.el | 6 - .../helm-misc.el | 8 +- .../helm-mode.el | 132 +++-- .../helm-net.el | 14 +- .../helm-occur.el | 6 - .../helm-pkg.el | 6 +- .../helm-regexp.el | 6 - .../helm-ring.el | 10 +- .../helm-semantic.el | 6 - .../helm-shell.el | 6 - .../helm-sys.el | 10 +- .../helm-tags.el | 6 - .../helm-types.el | 43 +- .../helm-utils.el | 15 +- .../helm-x-files.el | 10 +- 46 files changed, 903 insertions(+), 778 deletions(-) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/.dir-locals.el (61%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/emacs-helm.sh (100%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-adaptive.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-autoloads.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-bookmark.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-buffers.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-color.el (97%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-comint.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-command.el (85%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-config.el (91%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-dabbrev.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-easymenu.el (96%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-elisp-package.el (100%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-elisp.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-epa.el (86%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-eshell.el (96%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-eval.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-external.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-fd.el (89%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-files.el (93%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-find.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-font.el (96%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-for-files.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-global-bindings.el (97%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-grep.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-help.el (85%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-id-utils.el (97%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-imenu.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-info.el (97%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-locate.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-man.el (97%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-misc.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-mode.el (95%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-net.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-occur.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-pkg.el (67%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-regexp.el (97%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-ring.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-semantic.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-shell.el (91%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-sys.el (98%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-tags.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-types.el (90%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-utils.el (99%) rename elpa/{helm-20210131.1946 => helm-20210729.1510}/helm-x-files.el (95%) diff --git a/bba.org b/bba.org index e5fa63dd..b85c806f 100644 --- a/bba.org +++ b/bba.org @@ -3936,7 +3936,7 @@ Some links you might check out: (if (>= emacs-major-version 24) (progn (add-to-list 'load-path - "~/.emacs.d/elpa/helm-20210131.1946") + "~/.emacs.d/elpa/helm-20210729.1510") (require 'helm) (helm-mode 1) (global-set-key (kbd "M-y") 'helm-show-kill-ring) diff --git a/elpa/helm-20210131.1946/.dir-locals.el b/elpa/helm-20210729.1510/.dir-locals.el similarity index 61% rename from elpa/helm-20210131.1946/.dir-locals.el rename to elpa/helm-20210729.1510/.dir-locals.el index 204ad156..d5693d6f 100644 --- a/elpa/helm-20210131.1946/.dir-locals.el +++ b/elpa/helm-20210729.1510/.dir-locals.el @@ -2,5 +2,7 @@ ;;; For more information see (info "(emacs) Directory Variables") ((nil . ((bug-reference-bug-regexp . "\\([Ii]ssue ?#?\\|[Bb]ug ?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)") - (bug-reference-url-format . "https://github.com/emacs-helm/helm/issues/%s"))) - (emacs-lisp-mode . ((mode . bug-reference-prog)))) + (bug-reference-url-format . "https://github.com/emacs-helm/helm/issues/%s") + (byte-compile-warnings . (not obsolete not docstrings)))) + (emacs-lisp-mode . ((mode . bug-reference-prog) + (indent-tabs-mode . nil)))) diff --git a/elpa/helm-20210131.1946/emacs-helm.sh b/elpa/helm-20210729.1510/emacs-helm.sh similarity index 100% rename from elpa/helm-20210131.1946/emacs-helm.sh rename to elpa/helm-20210729.1510/emacs-helm.sh diff --git a/elpa/helm-20210131.1946/helm-adaptive.el b/elpa/helm-20210729.1510/helm-adaptive.el similarity index 99% rename from elpa/helm-20210131.1946/helm-adaptive.el rename to elpa/helm-20210729.1510/helm-adaptive.el index 83b1da55..b3a272da 100644 --- a/elpa/helm-20210131.1946/helm-adaptive.el +++ b/elpa/helm-20210729.1510/helm-adaptive.el @@ -271,10 +271,4 @@ atoms." (provide 'helm-adaptive) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-adaptive.el ends here diff --git a/elpa/helm-20210131.1946/helm-autoloads.el b/elpa/helm-20210729.1510/helm-autoloads.el similarity index 98% rename from elpa/helm-20210131.1946/helm-autoloads.el rename to elpa/helm-20210729.1510/helm-autoloads.el index 91513aab..3bede507 100644 --- a/elpa/helm-20210131.1946/helm-autoloads.el +++ b/elpa/helm-20210729.1510/helm-autoloads.el @@ -318,7 +318,7 @@ files. Allow deleting tramp connection or marked tramp connections at once. This replace `tramp-cleanup-connection' which is partially broken -in Emacs < to 25.1.50.1 (See Emacs Bug#24432). +in Emacs < to 25.1.50.1 (See Emacs bug http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24432). It allows additionally to delete more than one connection at once." t nil) @@ -580,7 +580,9 @@ It is helm `completing-read' equivalent. - PROMPT is the prompt name to use. -- COLLECTION can be a list, vector, obarray or hash-table. +- COLLECTION can be a list, alist, vector, obarray or hash-table. + For alists and hash-tables their car are use as real value of + candidate unless ALISTP is non-nil. It can be also a function that receives three arguments: the values string, predicate and t. See `all-completions' for more details. @@ -654,7 +656,12 @@ Keys description: - NOMARK: When non--nil don't allow marking candidates. -- ALISTP: (default is non--nil) See `helm-comp-read-get-candidates'. +- ALISTP: + When non-nil (default) pass the value of (DISPLAY . REAL) + candidate in COLLECTION to action when COLLECTION is an alist or a + hash-table, otherwise DISPLAY is always returned as result on exit, + which is the default when using `completing-read'. + See `helm-comp-read-get-candidates'. - CANDIDATES-IN-BUFFER: when non--nil use a source build with `helm-source-in-buffer' which is much faster. @@ -801,7 +808,7 @@ Browse URL with conkeror browser. \(fn URL &optional IGNORE)" t nil) -(autoload 'helm-browse-url-next "helm-net" "\ +(autoload 'helm-browse-url-nyxt "helm-net" "\ Browse URL with next browser. \(fn URL &optional IGNORE)" t nil) diff --git a/elpa/helm-20210131.1946/helm-bookmark.el b/elpa/helm-20210729.1510/helm-bookmark.el similarity index 99% rename from elpa/helm-20210131.1946/helm-bookmark.el rename to elpa/helm-20210729.1510/helm-bookmark.el index 5d0d4ba9..aae92d22 100644 --- a/elpa/helm-20210131.1946/helm-bookmark.el +++ b/elpa/helm-20210729.1510/helm-bookmark.el @@ -464,9 +464,9 @@ If `browse-url-browser-function' is set to something else than (defclass helm-bookmark-override-inheritor (helm-source) ()) -(defmethod helm--setup-source ((source helm-bookmark-override-inheritor)) +(cl-defmethod helm--setup-source ((source helm-bookmark-override-inheritor)) ;; Ensure `helm-source-in-buffer' method is called. - (call-next-method) + (cl-call-next-method) (setf (slot-value source 'action) (helm-append-at-nth (cl-loop for (name . action) in helm-type-bookmark-actions @@ -737,10 +737,4 @@ if external addressbook-bookmark package is installed." (provide 'helm-bookmark) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-bookmark.el ends here diff --git a/elpa/helm-20210131.1946/helm-buffers.el b/elpa/helm-20210729.1510/helm-buffers.el similarity index 98% rename from elpa/helm-20210131.1946/helm-buffers.el rename to elpa/helm-20210729.1510/helm-buffers.el index 313fa87c..ad5443a8 100644 --- a/elpa/helm-20210131.1946/helm-buffers.el +++ b/elpa/helm-20210729.1510/helm-buffers.el @@ -180,6 +180,12 @@ you want to keep the recentest order when narrowing candidates." "Face used for modified buffers." :group 'helm-buffers-faces) +(defface helm-no-file-buffer-modified + `((t ,@(and (>= emacs-major-version 27) '(:extend t)) + :foreground "orange" :background "black")) + "Face used for modified buffers." + :group 'helm-buffers-faces) + (defface helm-buffer-size `((((background dark)) ,@(and (>= emacs-major-version 27) '(:extend t)) @@ -229,6 +235,8 @@ their buffers like this: (setq helm-buffers-tick-counter (buffer-modified-tick)) +See bug#1917. + Note that this variable is buffer-local.") (make-variable-buffer-local 'helm-buffers-tick-counter) @@ -275,11 +283,11 @@ Note that this variable is buffer-local.") (defun helm-buffers-list--init () (require 'dired) - ;; Issue #51 Create the list before `helm-buffer' creation. + ;; Bug#51 Create the list before `helm-buffer' creation. ;; We were using a global cache in the past and 'candidates was ;; bound to this cache, this was a problem when using more than one ;; source with a different 'buffer-list fn as the same cache was - ;; reused in each source (issue #1907), now 'candidates attr is set + ;; reused in each source (Bug#1907), now 'candidates attr is set ;; directly so that each list of candidates is local to source. (helm-set-attr 'candidates (funcall (helm-get-attr 'buffer-list))) (let ((result (cl-loop with allbufs = (memq 'helm-shadow-boring-buffers @@ -499,13 +507,13 @@ The list is reordered with `helm-buffer-list-reorder-fn'." (helm-buffer--show-details name name-prefix file-name size mode dir 'helm-buffer-file 'helm-buffer-process nil details 'filebuf)) - ;; A non-file, modified buffer + ;; A non-file, modified buffer See bug#1917 ((with-current-buffer name (and helm-buffers-tick-counter (/= helm-buffers-tick-counter (buffer-modified-tick)))) (helm-buffer--show-details name (and proc name-prefix) dir size mode dir - 'helm-buffer-modified 'helm-buffer-process proc details 'nofile-mod)) + 'helm-no-file-buffer-modified 'helm-buffer-process proc details 'nofile-mod)) ;; Any non--file buffer.=>italic (t (helm-buffer--show-details @@ -627,7 +635,8 @@ buffers)." (helm-mark-current-line) (helm-display-mode-line src t) (when helm-marked-candidates - (message "%s candidates marked" (length helm-marked-candidates)))))) + (message "%s candidates marked" (length helm-marked-candidates)) + (set-window-margins (selected-window) 1))))) (defun helm-buffers-mark-similar-buffers () "Mark All buffers that have same property `type' than current. @@ -948,9 +957,10 @@ If REGEXP-FLAG is given use `query-replace-regexp'." (put 'helm-buffer-switch-other-frame 'helm-only t) (defun helm-buffers-switch-to-buffer-other-tab (_candidate) - (let ((bufs (helm-marked-candidates))) - (cl-loop for buf in bufs - do (switch-to-buffer-other-tab buf)))) + (when (fboundp 'switch-to-buffer-other-tab) + (let ((bufs (helm-marked-candidates))) + (cl-loop for buf in bufs + do (switch-to-buffer-other-tab buf))))) (defun helm-buffers-switch-to-buffer-new-tab () "Run switch to buffer in other tab action from `helm-source-buffers-list'." @@ -1183,10 +1193,4 @@ displayed with the `file-name-shadow' face if available." (provide 'helm-buffers) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-buffers.el ends here diff --git a/elpa/helm-20210131.1946/helm-color.el b/elpa/helm-20210729.1510/helm-color.el similarity index 97% rename from elpa/helm-20210131.1946/helm-color.el rename to elpa/helm-20210729.1510/helm-color.el index 476f45a4..5e91e64d 100644 --- a/elpa/helm-20210131.1946/helm-color.el +++ b/elpa/helm-20210729.1510/helm-color.el @@ -21,6 +21,8 @@ (require 'helm-help) (require 'helm-elisp) +(declare-function list-colors-display "facemenu") + ;;; Customize Face ;; ;; @@ -59,6 +61,7 @@ ;; ;; (defun helm-colors-init () + (require 'facemenu) (unless (helm-candidate-buffer) (save-selected-window (list-colors-display) @@ -161,10 +164,4 @@ (provide 'helm-color) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-color.el ends here diff --git a/elpa/helm-20210131.1946/helm-comint.el b/elpa/helm-20210729.1510/helm-comint.el similarity index 98% rename from elpa/helm-20210131.1946/helm-comint.el rename to elpa/helm-20210729.1510/helm-comint.el index b8842a89..6f85249b 100644 --- a/elpa/helm-20210131.1946/helm-comint.el +++ b/elpa/helm-20210729.1510/helm-comint.el @@ -227,10 +227,4 @@ See `helm-comint-prompts-list'." (provide 'helm-comint) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-comint.el ends here diff --git a/elpa/helm-20210131.1946/helm-command.el b/elpa/helm-20210729.1510/helm-command.el similarity index 85% rename from elpa/helm-20210131.1946/helm-command.el rename to elpa/helm-20210729.1510/helm-command.el index 2858d963..c500779f 100644 --- a/elpa/helm-20210131.1946/helm-command.el +++ b/elpa/helm-20210729.1510/helm-command.el @@ -38,6 +38,10 @@ :group 'helm-command :type 'boolean) +(defcustom helm-M-x-fuzzy-match t + "Helm-M-x fuzzy matching when non nil." + :group 'helm-command + :type 'boolean) ;;; Faces ;; @@ -111,25 +115,25 @@ algorithm." for cand in candidates for local-key = (car (rassq cand local-map)) for key = (substitute-command-keys (format "\\[%s]" cand)) - for sym = (intern cand) + for sym = (intern (if (consp cand) (car cand) cand)) for disp = (if (or (eq sym major-mode) (and (memq sym minor-mode-list) (boundp sym) (buffer-local-value sym helm-current-buffer))) (propertize cand 'face 'helm-command-active-mode) cand) - unless (get (intern (if (consp cand) (car cand) cand)) 'helm-only) + unless (or (get sym 'helm-only) (get sym 'no-helm-mx)) collect (cons (cond ((and (string-match "^M-x" key) local-key) - (format "%s (%s)" + (format "%s %s" disp (propertize - local-key - 'face 'helm-M-x-key))) + " " 'display + (propertize local-key 'face 'helm-M-x-key)))) ((string-match "^M-x" key) disp) - (t (format "%s (%s)" + (t (format "%s %s" disp (propertize - key - 'face 'helm-M-x-key)))) + " " 'display + (propertize key 'face 'helm-M-x-key))))) cand) into ls finally return @@ -200,9 +204,8 @@ algorithm." (remove-hook 'helm-move-selection-after-hook 'helm-M-x--move-selection-after-hook)) -(defclass helm-M-x-class (helm-source-sync helm-type-command) - ((match-dynamic :initform t) - (requires-pattern :initform 0) +(defclass helm-M-x-class (helm-source-in-buffer helm-type-command) + ((requires-pattern :initform 0) (must-match :initform t) (filtered-candidate-transformer :initform 'helm-M-x-transformer-no-sort) (persistent-help :initform "Describe this command") @@ -213,9 +216,9 @@ algorithm." (defun helm-M-x-read-extended-command (collection &optional predicate history) "Read or execute action on command name in COLLECTION or HISTORY. -When `helm-M-x-use-completion-styles' is used, several actions as -of `helm-type-command' are used and executed from here, otherwise -this function returns the command as a symbol. +When `helm-M-x-use-completion-styles' is used, Emacs +`completion-styles' mechanism is used, otherwise standard helm +completion and helm fuzzy matching are used together. Helm completion is not provided when executing or defining kbd macros. @@ -225,23 +228,29 @@ suitable for `try-completion'. Arg PREDICATE is a function that default to `commandp' see also `try-completion'. Arg HISTORY default to `extended-command-history'." (let* ((helm--mode-line-display-prefarg t) - (minibuffer-completion-confirm t) (pred (or predicate #'commandp)) - (metadata (unless (assq 'flex completion-styles-alist) - '(metadata (display-sort-function - . - (lambda (candidates) - (sort candidates #'helm-generic-sort-fn)))))) + (helm-fuzzy-sort-fn (lambda (candidates _source) + ;; Sort on real candidate otherwise + ;; "symbol ()" is used when sorting. + (helm-fuzzy-matching-default-sort-fn-1 candidates t))) (sources `(,(helm-make-source "Emacs Commands history" 'helm-M-x-class - :candidates (helm-dynamic-completion - ;; A list of strings. - (or history extended-command-history) - (lambda (str) (funcall pred (intern-soft str))) - nil 'nosort t)) + :data (lambda () + (helm-comp-read-get-candidates + ;; History should be quoted to + ;; force `helm-comp-read-get-candidates' + ;; to use predicate against + ;; symbol and not string. + (or history 'extended-command-history) + ;; Ensure using empty string to + ;; not defeat helm matching fns [1] + pred nil nil "")) + :fuzzy-match helm-M-x-fuzzy-match) ,(helm-make-source "Emacs Commands" 'helm-M-x-class - :candidates (helm-dynamic-completion - collection pred - nil metadata t)))) + :data (lambda () + (helm-comp-read-get-candidates + ;; [1] Same comment as above. + collection pred nil nil "")) + :fuzzy-match helm-M-x-fuzzy-match))) (prompt (concat (cond ((eq helm-M-x-prefix-argument '-) "- ") ((and (consp helm-M-x-prefix-argument) @@ -253,7 +262,7 @@ default to `extended-command-history'." (format "%d " helm-M-x-prefix-argument))) "M-x "))) (setq helm-M-x--timer (run-at-time 1 0.1 'helm-M-x--notify-prefix-arg)) - ;; Fix Issue #2250, add `helm-move-selection-after-hook' which + ;; Fix Bug#2250, add `helm-move-selection-after-hook' which ;; reset prefix arg to nil only for this helm session. (add-hook 'helm-move-selection-after-hook 'helm-M-x--move-selection-after-hook) @@ -301,7 +310,7 @@ Save COMMAND to `extended-command-history'." (when command ;; Avoid having `this-command' set to *exit-minibuffer. (setq this-command command - ;; Handle C-x z (repeat) Issue #322 + ;; Handle C-x z (repeat) Bug#322 real-this-command command) ;; If helm-M-x is called with regular emacs completion (kmacro) ;; use the value of arg otherwise use helm-current-prefix-arg. @@ -351,10 +360,4 @@ You can get help on each command by persistent action." (provide 'helm-command) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-command.el ends here diff --git a/elpa/helm-20210131.1946/helm-config.el b/elpa/helm-20210729.1510/helm-config.el similarity index 91% rename from elpa/helm-20210131.1946/helm-config.el rename to elpa/helm-20210729.1510/helm-config.el index 4440e0d3..d9343b6b 100644 --- a/elpa/helm-20210131.1946/helm-config.el +++ b/elpa/helm-20210729.1510/helm-config.el @@ -31,10 +31,4 @@ (provide 'helm-config) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-config.el ends here diff --git a/elpa/helm-20210131.1946/helm-dabbrev.el b/elpa/helm-20210729.1510/helm-dabbrev.el similarity index 99% rename from elpa/helm-20210131.1946/helm-dabbrev.el rename to elpa/helm-20210729.1510/helm-dabbrev.el index 80c1accf..4cd36c89 100644 --- a/elpa/helm-20210131.1946/helm-dabbrev.el +++ b/elpa/helm-20210729.1510/helm-dabbrev.el @@ -393,10 +393,4 @@ finally removed." (provide 'helm-dabbrev) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-dabbrev.el ends here diff --git a/elpa/helm-20210131.1946/helm-easymenu.el b/elpa/helm-20210729.1510/helm-easymenu.el similarity index 96% rename from elpa/helm-20210131.1946/helm-easymenu.el rename to elpa/helm-20210729.1510/helm-easymenu.el index 7f717d08..c30bc05c 100644 --- a/elpa/helm-20210131.1946/helm-easymenu.el +++ b/elpa/helm-20210729.1510/helm-easymenu.el @@ -81,10 +81,4 @@ (provide 'helm-easymenu) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-easymenu.el ends here diff --git a/elpa/helm-20210131.1946/helm-elisp-package.el b/elpa/helm-20210729.1510/helm-elisp-package.el similarity index 100% rename from elpa/helm-20210131.1946/helm-elisp-package.el rename to elpa/helm-20210729.1510/helm-elisp-package.el diff --git a/elpa/helm-20210131.1946/helm-elisp.el b/elpa/helm-20210729.1510/helm-elisp.el similarity index 99% rename from elpa/helm-20210131.1946/helm-elisp.el rename to elpa/helm-20210729.1510/helm-elisp.el index b3269053..7bcf5f77 100644 --- a/elpa/helm-20210131.1946/helm-elisp.el +++ b/elpa/helm-20210729.1510/helm-elisp.el @@ -397,7 +397,7 @@ the same time to variable and a function." for annot = (cl-typecase sym (command " (Com)") (class " (Class)") - (generic " (Gen)") + (cl-generic " (Gen)") (fbound " (Fun)") (bound " (Var)") (face " (Face)")) @@ -625,6 +625,7 @@ double quote." :fuzzy-match helm-apropos-fuzzy-match :filtered-candidate-transformer (and (null helm-apropos-fuzzy-match) 'helm-apropos-default-sort-fn) + :display-to-real 'helm-symbolify :nomark t :persistent-action (lambda (candidate) (helm-elisp--persistent-help @@ -638,12 +639,13 @@ double quote." (helm-apropos-init (lambda (x) (and (fboundp x) (not (commandp x)) - (not (generic-p x)) + (not (cl-generic-p x)) (not (class-p x)))) default)) :fuzzy-match helm-apropos-fuzzy-match :filtered-candidate-transformer (and (null helm-apropos-fuzzy-match) 'helm-apropos-default-sort-fn) + :display-to-real 'helm-symbolify :persistent-action (lambda (candidate) (helm-elisp--persistent-help candidate 'helm-describe-function)) @@ -673,7 +675,7 @@ double quote." (helm-build-in-buffer-source "Generic functions" :init (lambda () (helm-apropos-init (lambda (x) - (generic-p x)) + (cl-generic-p x)) default)) :fuzzy-match helm-apropos-fuzzy-match :filtered-candidate-transformer (and (null helm-apropos-fuzzy-match) @@ -693,7 +695,7 @@ double quote." (cond ((class-p sym) (setq fn #'helm-describe-function src-name "Describe class")) - ((generic-p sym) + ((cl-generic-p sym) (setq fn #'helm-describe-function src-name "Describe generic function")) ((fboundp sym) @@ -968,10 +970,4 @@ a string, i.e. the `symbol-name' of any existing symbol." (provide 'helm-elisp) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-elisp.el ends here diff --git a/elpa/helm-20210131.1946/helm-epa.el b/elpa/helm-20210729.1510/helm-epa.el similarity index 86% rename from elpa/helm-20210131.1946/helm-epa.el rename to elpa/helm-20210729.1510/helm-epa.el index 412d0dc4..69ec62dd 100644 --- a/elpa/helm-20210131.1946/helm-epa.el +++ b/elpa/helm-20210729.1510/helm-epa.el @@ -116,6 +116,25 @@ ("c" 'clear) ("d" 'detached)))) +(defun helm-epa-collect-keys-from-candidates (candidates) + (cl-loop for c in candidates + collect (epg-sub-key-id + (car (epg-key-sub-key-list c))))) + +(defun helm-epa-collect-id-from-candidates (candidates) + (cl-loop for c in candidates + collect (epg-user-id-string + (car (epg-key-user-id-list c))))) + +(defun helm-epa-success-message (str keys ids) + (message str + (mapconcat (lambda (pair) + (concat (car pair) " " (cdr pair))) + (cl-loop for k in keys + for i in ids + collect (cons k i)) + "\n"))) + ;;;###autoload (define-minor-mode helm-epa-mode "Enable helm completion on gpg keys in epa functions." @@ -153,11 +172,13 @@ (defun helm-epa-encrypt-file (candidate) "Select a file to encrypt with key CANDIDATE." - (let ((file (helm-read-file-name "Encrypt file: ")) - (key (epg-sub-key-id (car (epg-key-sub-key-list candidate)))) - (id (epg-user-id-string (car (epg-key-user-id-list candidate))))) - (epa-encrypt-file file candidate) - (message "File encrypted with key `%s %s'" key id))) + (let* ((file (helm-read-file-name "Encrypt file: ")) + (cands (helm-marked-candidates)) + (keys (helm-epa-collect-keys-from-candidates cands)) + (ids (helm-epa-collect-id-from-candidates cands))) + (epa-encrypt-file file cands) + (helm-epa-success-message "File encrypted with key(s):\n %s" + keys ids))) (defun helm-epa-kill-keys-armor (_candidate) "Copy marked keys to kill ring." @@ -197,7 +218,8 @@ (defun helm-epa-mail-encrypt (candidate) "Encrypt email with key CANDIDATE." - (let (start end) + (let ((cands (helm-marked-candidates)) + start end) (save-excursion (goto-char (point-min)) (when (search-forward mail-header-separator nil t) @@ -209,11 +231,12 @@ (select-safe-coding-system start end)))) ;; Don't let some read-only text stop us from encrypting. (let ((inhibit-read-only t) - (key (epg-sub-key-id (car (epg-key-sub-key-list candidate)))) - (id (epg-user-id-string (car (epg-key-user-id-list candidate))))) + (keys (helm-epa-collect-keys-from-candidates cands)) + (ids (helm-epa-collect-id-from-candidates cands))) (with-no-warnings - (epa-encrypt-region start end candidate nil nil)) - (message "Mail encrypted with key `%s %s'" key id)))) + (epa-encrypt-region start end cands nil nil)) + (helm-epa-success-message "Mail encrypted with key(s):\n %s" + keys ids)))) ;;;###autoload (defun helm-epa-list-keys () diff --git a/elpa/helm-20210131.1946/helm-eshell.el b/elpa/helm-20210729.1510/helm-eshell.el similarity index 96% rename from elpa/helm-20210131.1946/helm-eshell.el rename to elpa/helm-20210729.1510/helm-eshell.el index 6eb58cdd..359f5f50 100644 --- a/elpa/helm-20210131.1946/helm-eshell.el +++ b/elpa/helm-20210729.1510/helm-eshell.el @@ -92,7 +92,7 @@ at point." (lambda (x) (cond ((string-match "\\`~/" helm-ec-target) ;; Strip out the first escape char added by - ;; `comint-quote-filename' before "~" (Issue #1803). + ;; `comint-quote-filename' before "~" (Bug#1803). (substring (comint-quote-filename (abbreviate-file-name x)) 1)) ((string-match "\\`/" helm-ec-target) (comint-quote-filename x)) @@ -154,15 +154,18 @@ at point." with comps = (all-completions pcomplete-stub table) unless comps return (prog1 nil ;; Don't add final space when - ;; there is no completion (issue #1990). + ;; there is no completion (Bug#1990). (setq helm-eshell--quit-flag t) (message "No completions of %s" pcomplete-stub)) for i in comps - ;; Transform the related names to abs names. + ;; Transform the relative names to abs names. for file-cand = (and exp-entry (if (file-remote-p i) i (expand-file-name - i (file-name-directory entry)))) + i (file-name-directory + (if (directory-name-p pcomplete-stub) + entry + (directory-file-name entry)))))) ;; Compare them to avoid dups. for file-entry-p = (and (stringp exp-entry) (stringp file-cand) @@ -204,7 +207,11 @@ at point." (lambda () (with-helm-current-buffer (cl-loop for c from 0 to (ring-length eshell-history-ring) - collect (eshell-get-history c))))) + for elm = (eshell-get-history c) + unless (and (member elm lst) + eshell-hist-ignoredups) + collect elm into lst + finally return lst)))) (nomark :initform t) (multiline :initform t) (keymap :initform helm-eshell-history-map) @@ -219,7 +226,7 @@ at point." (if (and (stringp last) (not (string= last "")) (not users-comp) - ;; Fix completion on "../" see #1832. + ;; Fix completion on "../" see Bug#1832. (or (file-exists-p last) (helm-aand (file-name-directory last) @@ -318,7 +325,7 @@ at point." ;; global to pass it to `helm-quit-hook', this ;; space is added when point is just after ;; previous completion and there is no - ;; more completion, see issue #1832. + ;; more completion, see Bug#1832. (unless (or helm-eshell--quit-flag (looking-back "/\\'" (1- (point)))) (prog1 t (insert " "))) @@ -492,10 +499,4 @@ See `helm-eshell-prompts-list'." (provide 'helm-eshell) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-eshell ends here diff --git a/elpa/helm-20210131.1946/helm-eval.el b/elpa/helm-20210729.1510/helm-eval.el similarity index 98% rename from elpa/helm-20210131.1946/helm-eval.el rename to elpa/helm-20210729.1510/helm-eval.el index cee29752..8b07d65f 100644 --- a/elpa/helm-20210131.1946/helm-eval.el +++ b/elpa/helm-20210729.1510/helm-eval.el @@ -199,10 +199,4 @@ Should take one arg: the string to display." (provide 'helm-eval) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-eval.el ends here diff --git a/elpa/helm-20210131.1946/helm-external.el b/elpa/helm-20210729.1510/helm-external.el similarity index 98% rename from elpa/helm-20210131.1946/helm-external.el rename to elpa/helm-20210729.1510/helm-external.el index a7c25827..7dad6f41 100644 --- a/elpa/helm-20210131.1946/helm-external.el +++ b/elpa/helm-20210729.1510/helm-external.el @@ -208,10 +208,4 @@ You can set your own list of commands with (provide 'helm-external) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-external ends here diff --git a/elpa/helm-20210131.1946/helm-fd.el b/elpa/helm-20210729.1510/helm-fd.el similarity index 89% rename from elpa/helm-20210131.1946/helm-fd.el rename to elpa/helm-20210729.1510/helm-fd.el index d54d7e87..3d620efd 100644 --- a/elpa/helm-20210131.1946/helm-fd.el +++ b/elpa/helm-20210729.1510/helm-fd.el @@ -23,7 +23,7 @@ (defvar helm-fd-executable "fd" "The fd shell command executable.") -(defcustom helm-fd-switches '("--hidden" "--type" "f" "--type" "d" "--color" "always") +(defcustom helm-fd-switches '("--no-ignore" "--hidden" "--type" "f" "--type" "d" "--color" "always") "A list of options to pass to fd shell command." :type '(repeat string) :group 'helm-files) @@ -77,9 +77,13 @@ "Initialize fd process in an helm async source." (let* (process-connection-type (cmd (append helm-fd-switches (split-string helm-pattern " "))) - (proc (apply #'start-process "fd" nil "fd" cmd)) - (start-time (float-time))) + (proc (apply #'start-process "fd" nil helm-fd-executable cmd)) + (start-time (float-time)) + (fd-version (replace-regexp-in-string + "\n" "" + (shell-command-to-string (concat helm-fd-executable " --version"))))) (helm-log "Fd command:\nfd %s" (mapconcat 'identity cmd " ")) + (helm-log "VERSION: %s" fd-version) (prog1 proc (set-process-sentinel @@ -91,7 +95,8 @@ (:eval (format "L%s" (helm-candidate-number-at-point))) " " (:eval (propertize (format - "[fd process finished in %.2fs - (%s results)] " + "[%s process finished in %.2fs - (%s results)] " + ,fd-version ,(- (float-time) start-time) (helm-get-candidate-number)) 'face 'helm-fd-finish)))) @@ -118,10 +123,4 @@ (provide 'helm-fd) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-fd.el ends here diff --git a/elpa/helm-20210131.1946/helm-files.el b/elpa/helm-20210729.1510/helm-files.el similarity index 93% rename from elpa/helm-20210131.1946/helm-files.el rename to elpa/helm-20210729.1510/helm-files.el index 4aaec1d9..44cba9b2 100644 --- a/elpa/helm-20210131.1946/helm-files.el +++ b/elpa/helm-20210729.1510/helm-files.el @@ -84,6 +84,7 @@ (declare-function tramp-buffer-name "tramp") (declare-function tramp-make-tramp-file-name "tramp") (declare-function tramp-cleanup-connection "tramp-cmds") +(declare-function dired-async-processes "ext:dired-async.el") (defvar term-char-mode-point-at-process-mark) (defvar term-char-mode-buffer-read-only) @@ -94,7 +95,7 @@ (defvar eshell-current-command) (defvar eshell-debug-command) (defvar eshell-current-command) - +(defvar tramp-archive-enabled) (defgroup helm-files nil @@ -284,7 +285,7 @@ variable." :type 'boolean) (defcustom helm-ff-allow-non-existing-file-at-point nil - "Use file-at-point as initial input in `helm-find-files' even if it doesn't exists." + "Use non existing file-at-point as initial input in `helm-find-files'." :group 'helm-files :type 'boolean) @@ -493,6 +494,17 @@ currently transfered in an help-echo in mode-line, if you use "Percentage unicode sign to use in Rsync reporter." :type 'string :group 'helm-files) + +(defcustom helm-trash-default-directory nil + "The default trash directory. +You probably don't need to set this when using a Linux system using +standard settings. +Should be the directory file name i.e. don't add final slash. +When nil helm will compute a default value according to freedesktop +specs. +It is generally \"~/.local/share/Trash\"." + :type 'string + :group 'helm-files) ;;; Faces ;; @@ -757,14 +769,16 @@ When nil always delete char backward." :group 'helm-files :type 'boolean) -(defcustom helm-ff-display-image-native (>= emacs-major-version 27) +(defcustom helm-ff-display-image-native nil "Use native `image-mode' when non nil. You should use this only with Emacs>= 27 and `image-auto-resize' enabled to have images resized properly. When this is enabled, you have new commands to zoom in/out images. See `image-transform-resize' and `image-auto-resize'. Otherwise, -when nil `image-dired' is used, using imagemagick as backend." +when nil `image-dired' is used, using imagemagick as backend. +NOTE: If you see image-mode is eating too much memory, you better have +to set this to nil (default)." :group 'helm-files :type 'boolean) @@ -818,6 +832,9 @@ than `helm-candidate-number-limit'.") (defvar helm-ff--trash-directory-regexp "\\.?Trash[/0-9]+files/?\\'") (defvar helm-ff--show-directories-only nil) (defvar helm-ff--show-files-only nil) +(defvar helm-ff--trashed-files nil + "[INTERNAL] Files already trashed are stored here during file deletion. +This is used only as a let binding.") ;;; Helm-find-files ;; @@ -970,23 +987,29 @@ Should not be used among other sources.") Define the directory where you want to start navigating for the target directory when copying, renaming, etc.. You can use the -`default-directory' of `next-window', the current -`default-directory' or have completion on all the directories -belonging to each window." +`default-directory' of `next-window', the visited directory, the +current `default-directory' or have completion on all the +directories belonging to each visible windows." :group 'helm-files :type '(radio :tag "Define default target directory for file actions." - (const :tag "Directory belonging to next window" next-window) - (const :tag "Completion on directories belonging to each window" completion) - (const :tag "Use initial directory or `default-directory'" nil))) + (const :tag "Directory belonging to next window" + next-window) + (const :tag "Completion on directories belonging to each window" + completion) + (const :tag "Use initial directory or `default-directory'" + default-directory) + (const :tag "Use visited directory" + nil))) (defun helm-dwim-target-directory () "Try to return a suitable directory according to `helm-dwim-target'." - (with-helm-current-buffer - (let* ((wins (remove (get-buffer-window helm-marked-buffer-name) - (window-list))) - (num-windows (length wins))) + (with-selected-window (get-buffer-window helm-current-buffer) + (let ((wins (remove (get-buffer-window helm-marked-buffer-name) + (window-list)))) (expand-file-name - (cond ((and (> num-windows 1) + (cond (;; Provide completion on all the directory belonging to + ;; visible windows if some. + (and (cdr wins) (eq helm-dwim-target 'completion)) (helm-comp-read "Browse target starting from: " (append (list (or (car-safe helm-ff-history) @@ -995,11 +1018,17 @@ belonging to each window." (cl-loop for w in wins collect (with-selected-window w default-directory))))) - ((and (> num-windows 1) + ;; Use default-directory of next-window. + ((and (cdr wins) (eq helm-dwim-target 'next-window)) (with-selected-window (next-window) default-directory)) - ((or (= num-windows 1) + ;; Always use default-directory when only one window. + ((and (null (cdr wins)) + (eq helm-dwim-target 'default-directory)) + default-directory) + ;; Use the visited directory. + ((or (null (cdr wins)) (null helm-dwim-target)) ;; Using the car of *ff-history allow ;; staying in the directory visited instead of @@ -1022,7 +1051,7 @@ belonging to each window." else collect k))) -(defun helm-find-files-do-action (action) +(defun helm-find-files-do-action (action &optional target) "Generic function for creating actions from `helm-source-find-files'. ACTION can be `rsync' or any action supported by `helm-dired-action'." (require 'dired-async) @@ -1060,20 +1089,21 @@ ACTION can be `rsync' or any action supported by `helm-dired-action'." ;; If HFF is using a frame use a frame as well. (helm-actions-inherit-frame-settings t) helm-use-frame-when-more-than-two-windows - (dest (with-helm-display-marked-candidates - helm-marked-buffer-name - (helm-ff--count-and-collect-dups ifiles) - (with-helm-current-buffer - (helm-read-file-name - prompt - :preselect (unless (cdr ifiles) - (concat - "^" - (regexp-quote - (if helm-ff-transformer-show-only-basename - (helm-basename cand) cand)))) - :initial-input (helm-dwim-target-directory) - :history (helm-find-files-history nil :comp-read nil))))) + (dest (or target + (with-helm-display-marked-candidates + helm-marked-buffer-name + (helm-ff--count-and-collect-dups ifiles) + (with-helm-current-buffer + (helm-read-file-name + prompt + :preselect (unless (cdr ifiles) + (concat + "^" + (regexp-quote + (if helm-ff-transformer-show-only-basename + (helm-basename cand) cand)))) + :initial-input (helm-dwim-target-directory) + :history (helm-find-files-history nil :comp-read nil)))))) (dest-dir-p (file-directory-p dest)) (dest-dir (helm-basedir dest))) (unless (or dest-dir-p (file-directory-p dest-dir)) @@ -1439,7 +1469,7 @@ this working." "Command: " (cl-loop for (a c) in (eshell-read-aliases-list) ;; Positional arguments may be double - ;; quoted (Issue #1881). + ;; quoted (Bug#1881). when (string-match "[\"]?.*\\(\\$1\\|\\$\\*\\)[\"]?\\s-*&?\\'" c) collect (propertize a 'help-echo c) into ls finally return (sort ls 'string<)) @@ -1503,7 +1533,8 @@ this working." for fcmd = (replace-regexp-in-string "\\\\@" (regexp-quote (file-name-sans-extension file)) (replace-regexp-in-string - "\\\\#" (format "%03d" n) command)) + "\\\\#" (format "%03d" n) command t t) + t t) for com = (if (string-match "%s" fcmd) ;; [1] This allow to enter other args AFTER filename ;; i.e @@ -2523,7 +2554,7 @@ Emacs and even the whole system as it eats all memory." finally return (or result (expand-file-name "/")))) (defun helm-reduce-file-name-2 (fname level) - ;; This version comes from issue #2004 (UNC paths) and should fix + ;; This version comes from Bug#2004 (UNC paths) and should fix ;; it. It works with local files and remote files as well but not ;; with ftp, see helm-reduce-file-name-1. (while (> level 0) @@ -2643,7 +2674,7 @@ hitting C-j on \"..\"." (helm-aif (and (helm-file-completion-source-p src) (not (helm-empty-source-p)) ;; Prevent dired commands moving to first real - ;; (Issue #910). + ;; (Bug#910). (or (memq (intern-soft name) helm-ff-goto-first-real-dired-exceptions) (not (string-match "\\`[Dd]ired-" name))) @@ -2704,12 +2735,12 @@ when `helm-pattern' is equal to \"~/\"." ;; but not when renaming, copying etc..., ;; so for this use ;; `helm-ff-move-to-first-real-candidate' - ;; instead of `helm-next-line' (Issue #910). + ;; instead of `helm-next-line' (Bug#910). (helm-ff-move-to-first-real-candidate)) (helm-get-selection nil nil src)))) (when (and (or (and helm-ff-auto-update-flag (null helm-ff--deleting-char-backward) - ;; Issue #295 + ;; Bug#295 ;; File predicates are returning t ;; with paths like //home/foo. ;; So check it is not the case by regexp @@ -2717,7 +2748,7 @@ when `helm-pattern' is equal to \"~/\"." ;; entering a tramp method e.g /sudo::. (not (string-match "\\`//" helm-pattern)) (not (eq last-command 'helm-yank-text-at-point))) - ;; Fix issue #542. + ;; Fix Bug#542. (string= helm-pattern "~/") ;; Only one remaining directory, expand it. (and (= candnum 1) @@ -2799,7 +2830,7 @@ avoid errors when called outside helm for debugging purpose." (if (file-directory-p sub) sub (replace-regexp-in-string "/\\'" "" sub)))) (t (helm-ff--expand-substitued-pattern pattern))))) - ;; `file-directory-p' returns t on "/home/me/." (issue #1844). + ;; `file-directory-p' returns t on "/home/me/." (Bug#1844). (if (and (file-directory-p input) (not (string-match-p "[^.]\\.\\'" input))) (progn @@ -2821,7 +2852,7 @@ avoid errors when called outside helm for debugging purpose." (defun helm-ff--expand-file-name-no-dot (name &optional directory) "Prevent expanding \"/home/user/.\" to \"/home/user\"." - ;; Issue #1844 - If user enter "~/." to type an hidden filename + ;; Bug#1844 - If user enter "~/." to type an hidden filename ;; don't expand to /home/him e.g. ;; (expand-file-name "~/.") =>"/home/thierry" ;; (helm-ff--expand-substitued-pattern "~/.") =>"/home/thierry/." @@ -2835,11 +2866,11 @@ avoid errors when called outside helm for debugging purpose." (getenv "SystemDrive"))) (subst (helm-substitute-in-filename pattern)) ;; On Windows use a simple call to `expand-file-name' to - ;; avoid Issue #2004. + ;; avoid Bug#2004. (expand-fn (if directory #'expand-file-name #'helm-ff--expand-file-name-no-dot))) - ;; Fix issue #2223 with tilde in directory names e.g. "~/tmp/~test/". + ;; Fix Bug#2223 with tilde in directory names e.g. "~/tmp/~test/". (funcall expand-fn (if (string-match-p "\\`~[^/]" subst) pattern subst) ;; directory is nil on Nix. @@ -2864,7 +2895,7 @@ and should be used carefully elsewhere, or not at all, using (insert fname) (goto-char (point-min)) (when (memq system-type '(windows-nt ms-dos)) - (skip-chars-forward "/")) ;; Avoid infloop in UNC paths Issue #424 + (skip-chars-forward "/")) ;; Avoid infloop in UNC paths Bug#424 (if (re-search-forward "~.*/?\\|//\\|/[[:alpha:]]:/" nil t) (let ((match (match-string 0))) (goto-char (if (or (string= match "//") @@ -3034,7 +3065,7 @@ debugging purpose." (when (string-match "\\`/\\(-\\):" pattern) (setq pattern (replace-match tramp-default-method t t pattern 1))) ;; In some rare cases tramp can return a nil input, - ;; so be sure pattern is a string for safety (Issue #476). + ;; so be sure pattern is a string for safety (Bug#476). (unless pattern (setq pattern "")) (cond ((string-match helm-ff-url-regexp pattern) pattern) ((string-match "\\`\\$" pattern) @@ -3042,7 +3073,7 @@ debugging purpose." ((string= pattern "") "") ((string-match "\\`[.]\\{1,2\\}/\\'" pattern) (expand-file-name pattern)) - ;; Directories ending by a dot (issue #1940) + ;; Directories ending by a dot (Bug#1940) ((string-match "[^/][.]/\\'" pattern) (expand-file-name pattern)) ((string-match ".*\\(~?/?[.]\\{1\\}/\\)\\'" pattern) @@ -3099,7 +3130,7 @@ debugging purpose." ;; connection and may send a file-error. (setq helm--ignore-errors (file-remote-p path)) (set-text-properties 0 (length path) nil path) - ;; Issue #118 allow creation of newdir+newfile. + ;; Bug#118 allow creation of newdir+newfile. (unless (or ;; A tramp file name not completed. (string= path "@@TRAMP@@") @@ -3164,12 +3195,14 @@ debugging purpose." invalid-basedir (and (not (file-exists-p path)) (string-match "/$" path)) (and helm--url-regexp (string-match helm--url-regexp path))) - ;; Do NOT filter boring files here (issue #2330). + ;; Do NOT filter boring files here (Bug#2330). (list (helm-ff-filter-candidate-one-by-one path nil t))) ((string= path "") (helm-ff-directory-files "/")) ;; Check here if directory is accessible (not working on Windows). ((and (file-directory-p path) (not (file-readable-p path))) - (list (cons (format "file-error: Opening directory permission denied `%s'" path) + ;; Prefix error message with @@@@ for safety + ;; (some files may match file-error See bug#2400) + (list (cons (format "@@@@file-error: Opening directory permission denied `%s'" path) path))) ;; A fast expansion of PATH is made only if `helm-ff-auto-update-flag' ;; is enabled. @@ -3196,7 +3229,7 @@ debugging purpose." ;; disabled, whe don't want PATH to be added on top ;; if it is a directory. dir-p) - ;; Do NOT filter boring files here (issue #2330). + ;; Do NOT filter boring files here (Bug#2330). (list (helm-ff-filter-candidate-one-by-one path nil t))) (helm-ff-directory-files basedir)))))) @@ -3295,6 +3328,18 @@ later in the transformer." (add-text-properties (point-min) (point-max) '(helm-ff-file t)) (split-string (buffer-string) "\n" t))))) +(defcustom helm-ff-use-notify t + "Watch directories visited with `helm-find-files' when non nil. +If your system have no file notification package available turn this +to nil to avoid error messages when using `helm-find-files'." + :type 'boolean + :group 'helm-files + :set (lambda (var val) + (set-default var val) + (unless (symbol-value var) + (cl-loop for dir being the hash-keys of helm-ff--file-notify-watchers + do (remhash dir helm-ff--list-directory-cache))))) + (defun helm-ff-directory-files (directory &optional force-update) "List contents of DIRECTORY. Argument FULL mean absolute path. @@ -3318,9 +3363,11 @@ in cache." ;; `helm-find-files-get-candidates' by `file-readable-p'. (file-error (prog1 - (list (format "%s:%s" - (car err) - (mapconcat 'identity (cdr err) " "))) + ;; Prefix error message with @@@@ for safety + ;; (some files may match file-error See bug#2400) + (list (format "@@@@%s:%s" + (car err) + (mapconcat 'identity (cdr err) " "))) (setq file-error t))))) (dot (concat directory ".")) (dot2 (concat directory "..")) @@ -3333,13 +3380,16 @@ in cache." collect it) helm-ff--list-directory-cache) ;; Put an inotify watcher to check directory modifications. - (unless (gethash directory helm-ff--file-notify-watchers) - (puthash directory - (file-notify-add-watch - directory - '(change attribute-change) - (helm-ff--inotify-make-callback directory)) - helm-ff--file-notify-watchers)))))) + (unless (or (null helm-ff-use-notify) + (gethash directory helm-ff--file-notify-watchers)) + (condition-case-unless-debug err + (puthash directory + (file-notify-add-watch + directory + '(change attribute-change) + (helm-ff--inotify-make-callback directory)) + helm-ff--file-notify-watchers) + (file-notify-error (user-error "Error: %S %S" (car err) (cdr err))))))))) (defun helm-ff--inotify-make-callback (directory) "Return a callback for `file-notify-add-watch'." @@ -3391,14 +3441,14 @@ If PATTERN is a valid directory name, return PATTERN unchanged." ((or (and dir-p tramp-p (string-match ":\\'" pattern)) (string= pattern "") (and dir-p (<= (length bn) 2)) - ;; Fix Issue #541 when BD have a subdir similar + ;; Fix Bug#541 when BD have a subdir similar ;; to BN, don't switch to match plugin ;; which will match both. (and dir-p (string-match (regexp-quote bn) bd))) ;; Use full PATTERN on e.g "/ssh:host:". (regexp-quote pattern)) ;; Prefixing BN with a space call multi-match completion. - ;; This allow showing all files/dirs matching BN (Issue #518). + ;; This allow showing all files/dirs matching BN (Bug#518). ;; FIXME: some multi-match methods may not work here. (dir-p (concat (regexp-quote bd) " " (regexp-quote bn))) ((or (not (helm-ff-fuzzy-matching-p)) @@ -3460,7 +3510,7 @@ Note that only existing directories are saved here." (defun helm-ff-valid-symlink-p (file) (helm-aif (condition-case-unless-debug nil ;; `file-truename' send error - ;; on cyclic symlinks (Issue #692). + ;; on cyclic symlinks (Bug#692). (file-truename file) (error nil)) (file-exists-p it))) @@ -3721,7 +3771,7 @@ If SKIP-BORING-CHECK is non nil don't filter boring files." (backup (backup-file-name-p disp))) ;; We want to filter boring files only on the files coming ;; from the output of helm-ff-directory-files not on single - ;; candidate (issue #2330). + ;; candidate (Bug#2330). (unless (and (not skip-boring-check) (or (helm-ff-boring-file-p basename) (helm-ff-git-ignored-p file))) @@ -3770,10 +3820,21 @@ If SKIP-BORING-CHECK is non nil don't filter boring files." ;; Highlight local files showing everything, symlinks, exe, ;; dirs etc... - (let* ((attr (file-attributes file)) + (let* ((attr (condition-case err + (file-attributes file) + (file-error + ;; Possible error not happening during listing + ;; but when calling file-attributes see error + ;; with sshfs bug#2405 + (message "%s:%s" (car err) (cdr err)) nil))) (type (car attr)) x-bit) - (cond ((string-match "file-error" file) file) + (cond (;; Not a file but the message error printed in + ;; helm-buffer. Such a message should not have a + ;; subdir so matching on bol should suffice, but to + ;; be sure use @@@@ as prefix in file-error message + ;; to be safe bug#2400. + (string-match "\\`@@@@file-error:" file) file) (;; A dead symlink. (and (stringp type) (not (helm-ff-valid-symlink-p file)) @@ -3843,7 +3904,8 @@ If SKIP-BORING-CHECK is non nil don't filter boring files." (setq actions (helm-append-at-nth actions '(("Checksum File" . helm-ff-checksum)) 4))) (cond ((and (file-exists-p candidate) - (string-match helm-ff--trash-directory-regexp (helm-basedir candidate)) + (string-match helm-ff--trash-directory-regexp + (helm-basedir (expand-file-name candidate))) (not (member (helm-basename candidate) '("." ".."))) (executable-find "trash")) (helm-append-at-nth @@ -3894,10 +3956,20 @@ E.g. '(\"delete\" \"deleting\") ARGS are other arguments to be passed to FN." (let ((mkd (helm-marked-candidates)) - errors) + errors aborted) (with-helm-display-marked-candidates helm-marked-buffer-name - (helm-ff--count-and-collect-dups (mapcar 'helm-basename mkd)) + (if (and args (string= (car names) "restore")) + (cl-loop for f in mkd + for bd = (helm-basename f) + for assoc = (assoc bd (car args)) + when assoc + collect (concat (truncate-string-to-width + (car assoc) 40 nil nil t) + " -> " + (truncate-string-to-width + (helm-basedir (cdr assoc)) 40 nil nil t))) + (helm-ff--count-and-collect-dups (mapcar 'helm-basename mkd))) (if (y-or-n-p (format "%s %s files from trash? " (capitalize (car names)) (length mkd))) @@ -3907,22 +3979,29 @@ ARGS are other arguments to be passed to FN." (condition-case err (apply fn f args) (error (push (format "%s" (cadr err)) errors) - nil))) - (if errors - (display-warning 'helm - (with-temp-buffer - (insert (format-time-string "%Y-%m-%d %H:%M:%S\n" - (current-time))) - (insert (format - "Failed to %s %s/%s files from trash\n" - (car names) (length errors) (length mkd))) - (insert (mapconcat 'identity errors "\n") "\n ") - (buffer-string)) - :error - "*helm restore warnings*") - (message "%s %s files from trash done" - (capitalize (cadr names)) (length mkd)))) - (message "Restoring files from trash aborted"))))) + nil)))) + (message "%s files from trash aborted" (capitalize (cadr names))) + (setq aborted t))) + ;; Handle errors from outside the + ;; with-helm-display-marked-candidates block otherwise warning is + ;; never displayed. + (if errors + (progn + (display-warning 'helm + (with-temp-buffer + (insert (format-time-string "%Y-%m-%d %H:%M:%S\n" + (current-time))) + (insert (format + "Failed to %s %s/%s files from trash\n" + (car names) (length errors) (length mkd))) + (insert (mapconcat 'identity errors "\n") "\n ") + (buffer-string)) + :error + "*helm restore warnings*") + (message "%s files from trash aborted" (capitalize (cadr names)))) + (unless aborted + (message "%s %s files from trash done" + (capitalize (cadr names)) (length mkd)))))) (defun helm-ff-trash-rm (_candidate) "Delete marked-files from a Trash directory. @@ -3953,7 +4032,7 @@ Trash/info directory." The Trash directory should be a directory compliant with and each -file should have its '*.trashinfo' correspondent file in +file should have its '*.trashinfo' corresponding file in Trash/info directory." (let* ((default-directory (file-name-as-directory helm-ff-default-directory)) @@ -3993,35 +4072,42 @@ with `helm-ff-trash-list'." (defun helm-ff--get-dest-file-from-trash (trashed-files file) (assoc-default (helm-basename file) trashed-files)) -(defun helm-ff-trash-list () - "Return an alist of trashed files basename and dest name." - ;; Files owned by root are trashed in /root/.local/share/Trash. - ;; Files owned by user and trashed by root are trashed in - ;; /home/.Trash. - ;; Files owned by user and trashed by user are trashed in - ;; ~/.local/share/Trash. - (cl-loop for f in (directory-files - (expand-file-name - ;; helm-ff-default-directory is actually the - ;; trash directory. - "info" (helm-basedir (directory-file-name helm-ff-default-directory))) - t directory-files-no-dot-files-regexp) - collect (cons (helm-basename (replace-regexp-in-string "\\.trashinfo\\'" "" f)) - (with-temp-buffer - (save-excursion - (insert-file-contents f)) - (when (re-search-forward "^path=" nil t) - (let ((path (helm-url-unhex-string - (buffer-substring-no-properties - (point) (point-at-eol))))) - (if (string-match "\\`/" path) - ;; path is absolute - path - ;; When path is relative, assume the - ;; trash directory is located at - ;; /home/.Trash and path is the - ;; relative name of file from /home. - (expand-file-name path "/home")))))))) +(defun helm-ff-trash-list (&optional trash-dir) + "Return an alist of trashed files basename and dest name. +Assume the trash system in use is freedesktop compatible, see + +This function is intended to be used from a trash directory i.e. it +use `helm-ff-default-directory', but it may be used elsewhere by +specifying the trash directory with TRASH-DIR arg." + (unless (fboundp 'system-move-file-to-trash) + ;; Files owned by root are trashed in /root/.local/share/Trash. + ;; Files owned by user and trashed by root are trashed in + ;; /home/.Trash. + ;; Files owned by user and trashed by user are trashed in + ;; ~/.local/share/Trash. + (cl-loop for f in (directory-files + (expand-file-name + ;; helm-ff-default-directory is actually the + ;; trash directory. + "info" (helm-basedir (directory-file-name + (or trash-dir helm-ff-default-directory)))) + t directory-files-no-dot-files-regexp) + collect (cons (helm-basename (replace-regexp-in-string "\\.trashinfo\\'" "" f)) + (with-temp-buffer + (save-excursion + (insert-file-contents f)) + (when (re-search-forward "^path=" nil t) + (let ((path (helm-url-unhex-string + (buffer-substring-no-properties + (point) (point-at-eol))))) + (if (string-match "\\`/" path) + ;; path is absolute + path + ;; When path is relative, assume the + ;; trash directory is located at + ;; /home/.Trash and path is the + ;; relative name of file from /home. + (expand-file-name path "/home"))))))))) (defun helm-ff-goto-linum (candidate) "Find file CANDIDATE and maybe jump to line number found in fname at point. @@ -4093,7 +4179,9 @@ E.g. \"foo:12\"." ;; When rotation fails fallback to `image-rotate' with no ;; transformation of file. (with-selected-window (helm-persistent-action-display-window) - (image-rotate angle)) + (condition-case _err + (with-no-warnings (image-rotate angle)) + (wrong-number-of-arguments (image-rotate)))) (helm-ff--display-image-native file)) ;; Use image-dired to display image. (when rotation-failed @@ -4525,6 +4613,40 @@ Show the first `helm-ff-history-max-length' elements of helm-ff-history)))) (put 'helm-find-files-history 'helm-only t) +(defvar helm-ff-drag-mouse-1-default-action 'copy + "Default action when dragging files. +Possible values are `copy', `rsync' or `rename'.") + +(defun helm-ff-drag-mouse-1-fn (event) + (interactive "e") + (cl-assert (memq helm-ff-drag-mouse-1-default-action + '(copy rsync rename))) + (let* ((win-or-frame (posn-window (event-end event))) + (target-frame (when (framep win-or-frame) + helm-initial-frame)) + (target (with-selected-window + (if target-frame + (frame-selected-window target-frame) + win-or-frame) + default-directory)) + win-list + (ask (and target-frame + (cdr (setq win-list (window-list target-frame 1)))))) + (when ask + (setq target (x-popup-menu + t (list "Choose target" + (cons "" + (cl-loop for win in win-list + for dir = (with-selected-window + win default-directory) + collect (cons dir dir))))))) + (if (memq helm-ff-drag-mouse-1-default-action '(copy rsync)) + (helm-find-files-do-action + helm-ff-drag-mouse-1-default-action target) + (helm-run-after-exit + #'helm-find-files-do-action + helm-ff-drag-mouse-1-default-action target)))) + (defun helm-find-files-1 (fname &optional preselect) "Find FNAME filename with PRESELECT filename preselected. @@ -4534,7 +4656,7 @@ Use it for non-interactive calls of `helm-find-files'." ;; [FIXME] When `helm-find-files-1' is used directly from lisp ;; and FNAME is an abbreviated path, for some reasons ;; `helm-update' is called many times before resolving - ;; the abbreviated path (Issue #1939) so be sure to pass a + ;; the abbreviated path (Bug#1939) so be sure to pass a ;; full path to helm-find-files-1. (unless (string-match-p helm-ff-url-regexp fname) (setq fname (expand-file-name (substitute-in-file-name fname)))) @@ -4548,7 +4670,8 @@ Use it for non-interactive calls of `helm-find-files'." (tap (thing-at-point 'filename)) (def (and tap (or (file-remote-p tap) (expand-file-name tap))))) - (helm-set-local-variable 'helm-follow-mode-persistent nil) + (helm-set-local-variable 'helm-follow-mode-persistent nil + 'helm-drag-mouse-1-fn 'helm-ff-drag-mouse-1-fn) (unless helm-source-find-files (setq helm-source-find-files (helm-make-source "Find Files" 'helm-source-ffiles))) @@ -4624,27 +4747,30 @@ source is `helm-source-find-files'." ("" nil) (t it)))) (unless (eq major-mode 'image-mode) - (or (and input (or (and (file-remote-p input) input) - (expand-file-name input))) - (helm-find-files-input - (if (and helm-ff-allow-non-existing-file-at-point - guesser - (not (string-match ffap-url-regexp guesser))) - ;; Keep the ability of jumping to numbered lines even - ;; when allowing non existing filenames at point. - (helm-aand guesser - (thing-at-point 'filename) - (replace-regexp-in-string - ":[0-9]+\\'" "" it)) - guesser) - (thing-at-point 'filename)))))) + (if input + (if (or (file-remote-p input) + (string-match helm-ff-url-regexp input)) + input + (expand-file-name input)) + (helm-find-files-input + (if (and helm-ff-allow-non-existing-file-at-point + guesser + (not (string-match ffap-url-regexp guesser))) + ;; Keep the ability of jumping to numbered lines even + ;; when allowing non existing filenames at point. + (helm-aand guesser + (thing-at-point 'filename) + (replace-regexp-in-string + ":[0-9]+\\'" "" it)) + guesser) + (thing-at-point 'filename)))))) (defun helm-ffap-guesser () "Same as `ffap-guesser' but without gopher and machine support." (require 'ffap) ;; Avoid "Stack overflow in regexp matcher" error ;; in evil `ffap-guesser' by removing crap `ffap-gopher-at-point' - ;; (bug fixed in emacs-26 #25391) . + ;; (bug fixed in emacs-26 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25391) . ;; `ffap-machine-at-point' have been removed too as it was anyway ;; disabled with `ffap-machine-p-known' bound to 'reject. ;; `ffap-file-at-point' can be neutralized with @@ -4764,13 +4890,13 @@ Find inside `require' and `declare-function' sexp." when (eq (car (file-attributes cd)) t) return cd))) -(cl-defun helm-dired-action (candidate +(cl-defun helm-dired-action (destination &key action follow (files (dired-get-marked-files))) - "Execute ACTION on FILES to CANDIDATE. + "Execute ACTION on FILES to DESTINATION. Where ACTION is a symbol that can be one of: 'copy, 'rename, 'symlink,'relsymlink, 'hardlink or 'backup. Argument FOLLOW when non-nil specifies to follow FILES to -destination for the actions copy and rename." +DESTINATION for the actions copy and rename." (require 'dired-async) (require 'dired-x) ; For dired-keep-marker-relsymlink (when (get-buffer dired-log-buffer) (kill-buffer dired-log-buffer)) @@ -4793,51 +4919,55 @@ destination for the actions copy and rename." (hardlink dired-keep-marker-hardlink))) (dirflag (and (= (length files) 1) (file-directory-p (car files)) - (not (file-directory-p candidate)))) + (not (file-directory-p destination)))) (dired-async-state (if (and (boundp 'dired-async-mode) dired-async-mode) 1 -1))) (and follow (fboundp 'dired-async-mode) (dired-async-mode -1)) - (when (and (cdr files) (not (file-directory-p candidate))) - (error "%s: target `%s' is not a directory" action candidate)) + (when (and (cdr files) (not (file-directory-p destination))) + (error "%s: target `%s' is not a directory" action destination)) (unwind-protect (dired-create-files fn (symbol-name action) files - ;; CANDIDATE is the destination. - (if (file-directory-p candidate) - ;; When CANDIDATE is a directory, build file-name in this directory. - ;; Else we use CANDIDATE. + (if (file-directory-p destination) + ;; When DESTINATION is a directory, build file-name in this directory. + ;; Else we use DESTINATION. (lambda (from) - (expand-file-name (file-name-nondirectory from) candidate)) - (lambda (_from) candidate)) + (expand-file-name (file-name-nondirectory from) destination)) + (lambda (_from) destination)) marker) (and (fboundp 'dired-async-mode) (dired-async-mode dired-async-state))) (push (file-name-as-directory - (if (file-directory-p candidate) - (expand-file-name candidate) - (file-name-directory candidate))) + (if (file-directory-p destination) + (expand-file-name destination) + (file-name-directory destination))) helm-ff-history) ;; If follow is non--nil we should not be in async mode. (when (and follow (not (memq action '(symlink relsymlink hardlink))) (not (get-buffer dired-log-buffer))) - (let ((target (directory-file-name candidate))) + (let ((target (directory-file-name destination))) (unwind-protect (progn (setq helm-ff-cand-to-mark - (helm-get-dest-fnames-from-list files candidate dirflag)) + (helm-get-dest-fnames-from-list files destination dirflag)) (with-helm-after-update-hook (helm-ff-maybe-mark-candidates)) - ;; Refresh directory even if helm-ff-cache-mode is - ;; enabled, it will not have the time to update - ;; destination directory. - (helm-ff-directory-files candidate t) - (if (and dirflag (eq action 'rename)) - (helm-find-files-1 (file-name-directory target) - (if helm-ff-transformer-show-only-basename - (helm-basename target) target)) - (helm-find-files-1 (file-name-as-directory - (expand-file-name candidate))))) + ;; Wait for the notify callback ends before calling HFF. + (run-at-time + 0.1 nil + (lambda () + (if (and dirflag (eq action 'rename)) + (helm-find-files-1 (file-name-directory target) + (if helm-ff-transformer-show-only-basename + (helm-basename target) target)) + (helm-find-files-1 (if (file-directory-p destination) + (file-name-as-directory + (expand-file-name destination)) + (expand-file-name (helm-basedir destination))) + (if helm-ff-transformer-show-only-basename + (helm-basename (car files)) + (car files))))))) (setq helm-ff-cand-to-mark nil)))))) (defun helm-get-dest-fnames-from-list (flist dest-cand rename-dir-flag) @@ -4904,16 +5034,41 @@ Return non-nil when FILE needs to be trashed." (or (and remote helm-trash-remote-files) (null remote)))))) +(defun helm-trash-directory () + "Try to find a trash directory. +Return the files subdirectory of trash directory. +When `helm-trash-default-directory' is set use it as trash directory." + (let ((xdg-data-dir + (or helm-trash-default-directory + (directory-file-name + (expand-file-name "Trash" + (or (getenv "XDG_DATA_HOME") + "~/.local/share")))))) + (expand-file-name "files" xdg-data-dir))) + +(defun helm-ff-file-already-trashed (file &optional trash-alist) + "Return FILE when it is already in trash. + +Optional arg TRASH-ALIST should be an alist as what +`helm-ff-trash-list' returns." + (unless (fboundp 'system-move-file-to-trash) + (let ((trash-files-dir (helm-trash-directory))) + (cl-loop for (_bn . fn) in (or trash-alist + (helm-ff-trash-list trash-files-dir)) + thereis (file-equal-p file fn))))) + (defun helm-ff-quick-delete (_candidate) "Delete file CANDIDATE without quitting. When a prefix arg is given, meaning of `delete-by-moving-to-trash' is the opposite." (with-helm-window - (let ((marked (helm-marked-candidates))) + (let* ((marked (helm-marked-candidates)) + (trash (helm-ff--delete-by-moving-to-trash (car marked))) + (helm-ff--trashed-files + (and trash (helm-ff-trash-list (helm-trash-directory))))) (unwind-protect - (cl-loop with trash = (helm-ff--delete-by-moving-to-trash (car marked)) - for c in marked do + (cl-loop for c in marked do (progn (helm-preselect (concat "^" (regexp-quote (if (and helm-ff-transformer-show-only-basename @@ -4923,9 +5078,16 @@ When a prefix arg is given, meaning of (format "Really %s file `%s'? " (if trash "Trash" "Delete") (abbreviate-file-name c))) - (helm-delete-file - c helm-ff-signal-error-on-dot-files 'synchro trash) - (helm-delete-current-selection) + (helm-acase (helm-delete-file + c helm-ff-signal-error-on-dot-files 'synchro trash) + (skip + ;; This happens only when trying to + ;; trash a file already trashed. + (helm-delete-visible-mark (helm-this-visible-mark)) + (if (helm-end-of-source-p) + (helm-previous-line) + (helm-next-line))) + (t (helm-delete-current-selection))) (message nil) (helm--remove-marked-and-update-mode-line c)))) (setq helm-marked-candidates nil @@ -4964,9 +5126,18 @@ is nil." (helm--reading-passwd-or-string t) (file-attrs (file-attributes file)) (trash (or trash (helm-ff--delete-by-moving-to-trash file))) - (delete-by-moving-to-trash trash)) - (cond ((and (eq (nth 0 file-attrs) t) - (directory-files file t dired-re-no-dot)) + (delete-by-moving-to-trash trash) + (already-trashed + (and trash (helm-ff-file-already-trashed + file helm-ff--trashed-files)))) + (cond (already-trashed + ;; We use message here to avoid exiting loop when + ;; deleting more than one file. + (message "User error: `%s' is already trashed" file) + (sit-for 1.5) + (cl-return 'skip)) + ((and (eq (nth 0 file-attrs) t) + (directory-files file t directory-files-no-dot-files-regexp)) ;; Synchro means persistent deletion from HFF. (if synchro (when (or helm-ff-allow-recursive-deletes @@ -5008,6 +5179,8 @@ When a prefix arg is given, meaning of (let* ((files (helm-marked-candidates :with-wildcard t)) (len 0) (trash (helm-ff--delete-by-moving-to-trash (car files))) + (helm-ff--trashed-files + (and trash (helm-ff-trash-list (helm-trash-directory)))) (prmt (if trash "Trash" "Delete")) (old--allow-recursive-deletes helm-ff-allow-recursive-deletes)) (with-helm-display-marked-candidates @@ -5066,6 +5239,15 @@ When a prefix arg is given, meaning of (sit-for 3) (force-mode-line-update))) +(defun helm-delete-async-kill-process () + "Kill async process created by helm delete files async." + (interactive) + (let* ((processes (dired-async-processes)) + (proc (car (last processes)))) + (and proc (delete-process proc)) + (unless (> (length processes) 1) + (helm-ff--delete-async-modeline-mode -1)))) + (defun helm-delete-marked-files-async (_ignore) "Same as `helm-delete-marked-files' but async. @@ -5109,7 +5291,13 @@ directories are always deleted with no warnings." result (length files)))))) ;; Workaround emacs-26 bug with tramp see ;; https://github.com/jwiegley/emacs-async/issues/80. - (async-quiet-switch "-q")) + (async-quiet-switch "-q") + (trash-alist (and trash (helm-ff-trash-list (helm-trash-directory)))) + (already-trashed + (and trash + (cl-loop for f in files + when (helm-ff-file-already-trashed f trash-alist) + collect f)))) (setq helm-ff--trash-flag trash) (with-helm-display-marked-candidates helm-marked-buffer-name @@ -5118,6 +5306,7 @@ directories are always deleted with no warnings." (message "(No deletions performed)") (async-start `(lambda () + (require 'cl-lib) ;; `delete-by-moving-to-trash' have to be set globally, ;; using the TRASH argument of delete-file or ;; delete-directory is not enough. @@ -5125,7 +5314,11 @@ directories are always deleted with no warnings." (let ((result 0)) (dolist (file ',files result) (condition-case err - (cond ((eq (nth 0 (file-attributes file)) t) + (cond ((and ,trash + (cl-loop for f in ',already-trashed + thereis (file-equal-p f file))) + (error (format "`%s' is already trashed" file))) + ((eq (nth 0 (file-attributes file)) t) (delete-directory file 'recursive ,trash) (setq result (1+ result))) (t (delete-file file ,trash) @@ -5459,7 +5652,7 @@ Use FD as backend." "Class to define a source in `helm-browse-project' handling non VC handled directories.") -(defmethod helm--setup-source :after ((source helm-browse-project-override-inheritor)) +(cl-defmethod helm--setup-source :after ((source helm-browse-project-override-inheritor)) (let ((actions (slot-value source 'action))) (setf (slot-value source 'action) (helm-append-at-nth @@ -5612,7 +5805,9 @@ Don't call it from programs, use `helm-find-files-1' instead. This is the starting point for nearly all actions you can do on files." (interactive "P") - (let* ((hist (and arg helm-ff-history (helm-find-files-history nil))) + (let* (tramp-archive-enabled ; Disable tramp-archive which is + ; kicking in unexpectedly. + (hist (and arg helm-ff-history (helm-find-files-history nil))) (smart-input (or hist (helm-find-files-initial-input))) (default-input (expand-file-name (helm-current-directory))) (input (cond ((and (null hist) @@ -5628,7 +5823,7 @@ files." ((and (not (string= smart-input "")) smart-input)) (t default-input))) - (input-as-presel (null (nth 0 (file-attributes input)))) + (input-as-presel (null (file-directory-p input))) (presel (helm-aif (or hist (and input-as-presel input) (buffer-file-name (current-buffer)) @@ -5661,7 +5856,7 @@ files." "Allow deleting tramp connection or marked tramp connections at once. This replace `tramp-cleanup-connection' which is partially broken -in Emacs < to 25.1.50.1 (See Emacs Bug#24432). +in Emacs < to 25.1.50.1 (See Emacs bug http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24432). It allows additionally to delete more than one connection at once." @@ -5690,10 +5885,4 @@ once." (provide 'helm-files) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-files.el ends here diff --git a/elpa/helm-20210131.1946/helm-find.el b/elpa/helm-20210729.1510/helm-find.el similarity index 98% rename from elpa/helm-20210131.1946/helm-find.el rename to elpa/helm-20210729.1510/helm-find.el index 4c9637dd..748d7021 100644 --- a/elpa/helm-20210131.1946/helm-find.el +++ b/elpa/helm-20210729.1510/helm-find.el @@ -167,10 +167,4 @@ are passed to \"find\" literally." (provide 'helm-find) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-find.el ends here diff --git a/elpa/helm-20210131.1946/helm-font.el b/elpa/helm-20210729.1510/helm-font.el similarity index 96% rename from elpa/helm-20210131.1946/helm-font.el rename to elpa/helm-20210729.1510/helm-font.el index 064f2901..76e0154a 100644 --- a/elpa/helm-20210131.1946/helm-font.el +++ b/elpa/helm-20210729.1510/helm-font.el @@ -38,7 +38,8 @@ ("Insert character code in hex" . helm-ucs-insert-code) ("Kill marked characters" . helm-ucs-kill-char) ("Kill name" . helm-ucs-kill-name) - ("Kill code" . helm-ucs-kill-code)) + ("Kill code" . helm-ucs-kill-code) + ("Describe char" . helm-ucs-describe-char)) "Actions for `helm-source-ucs'." :group 'helm-font :type '(alist :key-type string :value-type function)) @@ -238,6 +239,13 @@ name." (helm-ucs-save-recentest candidate) (kill-new (helm-ucs-match candidate 3))) +;; Describe char +(defun helm-ucs-describe-char (candidate) + "Describe char CANDIDATE." + (with-temp-buffer + (insert (helm-ucs-match candidate 2)) + (describe-char (point-min)))) + ;; Navigation in current-buffer (persistent) (defun helm-ucs-forward-char (_candidate) @@ -285,7 +293,7 @@ name." (defvar helm-source-ucs-recent (helm-build-sync-source "Recent UCS" - :action helm-ucs-actions + :action 'helm-ucs-actions :candidates (lambda () helm-ucs-recent) :help-message helm-ucs-help-message :keymap helm-ucs-map @@ -298,7 +306,7 @@ name." :help-message 'helm-ucs-help-message :filtered-candidate-transformer (lambda (candidates _source) (sort candidates #'helm-generic-sort-fn)) - :action helm-ucs-actions + :action 'helm-ucs-actions :persistent-action (lambda (candidate) (helm-ucs-insert-char candidate) (helm-force-update)) @@ -330,10 +338,4 @@ Called with a prefix arg force reloading cache." (provide 'helm-font) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-font.el ends here diff --git a/elpa/helm-20210131.1946/helm-for-files.el b/elpa/helm-20210729.1510/helm-for-files.el similarity index 98% rename from elpa/helm-20210131.1946/helm-for-files.el rename to elpa/helm-20210729.1510/helm-for-files.el index e442b3e9..a0c0f61e 100644 --- a/elpa/helm-20210131.1946/helm-for-files.el +++ b/elpa/helm-20210729.1510/helm-for-files.el @@ -128,7 +128,7 @@ Be aware that a nil value will make tramp display very slow." (migemo :initform t) (persistent-action :initform 'helm-ff-kill-or-find-buffer-fname))) -(defmethod helm--setup-source :after ((source helm-recentf-source)) +(cl-defmethod helm--setup-source :after ((source helm-recentf-source)) (setf (slot-value source 'action) (append (symbol-value (helm-actions-from-type-file)) '(("Delete file(s) from recentf" . @@ -174,7 +174,7 @@ Colorize only symlinks, directories and files." ;; Call file-attributes only if: ;; - file is not remote ;; - helm-for-files--tramp-not-fancy is nil and file is remote AND - ;; connected. (Issue #1679) + ;; connected. (Bug#1679) for type = (and (or (null isremote) (and (null helm-for-files-tramp-not-fancy) (file-remote-p i nil t))) @@ -300,10 +300,4 @@ searching for is already found." (provide 'helm-for-files) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-for-files.el ends here diff --git a/elpa/helm-20210131.1946/helm-global-bindings.el b/elpa/helm-20210729.1510/helm-global-bindings.el similarity index 97% rename from elpa/helm-20210131.1946/helm-global-bindings.el rename to elpa/helm-20210729.1510/helm-global-bindings.el index 35182509..1f4dd044 100644 --- a/elpa/helm-20210131.1946/helm-global-bindings.el +++ b/elpa/helm-20210729.1510/helm-global-bindings.el @@ -119,10 +119,4 @@ (provide 'helm-global-bindings) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-global-bindings.el ends here diff --git a/elpa/helm-20210131.1946/helm-grep.el b/elpa/helm-20210729.1510/helm-grep.el similarity index 99% rename from elpa/helm-20210131.1946/helm-grep.el rename to elpa/helm-20210729.1510/helm-grep.el index 4f9ab18c..3547ee35 100644 --- a/elpa/helm-20210131.1946/helm-grep.el +++ b/elpa/helm-20210729.1510/helm-grep.el @@ -434,7 +434,7 @@ It is intended to use as a let-bound variable, DON'T set this globaly.") ;; When user mark files and use recursion with grep ;; backend enabled, the loop collect on each marked ;; candidate its `file-name-directory' and we endup with - ;; duplicates (Issue #1714). FIXME: For now as a quick fix + ;; duplicates (Bug#1714). FIXME: For now as a quick fix ;; I just remove dups here but I should handle this inside ;; the cond above. (setq files (helm-fast-remove-dups files :test 'equal)) @@ -954,7 +954,7 @@ Special commands: "Return a list of known ack-grep types." (with-temp-buffer ;; "--help-types" works with both 1.96 and 2.1+, while - ;; "--help types" works only with 1.96 Issue #422. + ;; "--help types" works only with 1.96 Bug#422. ;; `helm-grep-command' should return the ack executable ;; when this function is used in the right context ;; i.e After checking is we are using ack-grep with @@ -1075,8 +1075,8 @@ of grep." (defvar helm-source-grep nil) -(defmethod helm--setup-source ((source helm-grep-class)) - (call-next-method) +(cl-defmethod helm--setup-source ((source helm-grep-class)) + (cl-call-next-method) (helm-aif (and helm-follow-mode-persistent (if (eq (slot-value source 'backend) 'git) helm-source-grep-git @@ -1220,7 +1220,7 @@ matching `helm-zgrep-file-extension-regexp' only." ;; Filename should always be provided as a local ;; path, if the root directory is remote, the ;; tramp prefix will be added before executing - ;; action, see `helm-grep-action' and issue #2032. + ;; action, see `helm-grep-action' and Bug#2032. (expand-file-name (car split) (or (file-remote-p root 'localname) root)) @@ -1274,7 +1274,7 @@ matching `helm-zgrep-file-extension-regexp' only." (let (beg end) (condition-case-unless-debug nil (with-temp-buffer - (insert (propertize str 'read-only nil)) ; Fix (#1176) + (insert (propertize str 'read-only nil)) ; Fix bug#1176 (goto-char (point-min)) (cl-loop for reg in (cl-loop for r in (helm-mm-split-pattern @@ -1624,8 +1624,8 @@ returns if available with current AG version." (defvar helm-source-grep-ag nil) -(defmethod helm--setup-source ((source helm-grep-ag-class)) - (call-next-method) +(cl-defmethod helm--setup-source ((source helm-grep-ag-class)) + (cl-call-next-method) (helm-aif (and helm-follow-mode-persistent helm-source-grep-ag (assoc-default 'follow helm-source-grep-ag)) @@ -1721,10 +1721,4 @@ With a prefix arg ARG git-grep the whole repository." (provide 'helm-grep) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-grep.el ends here diff --git a/elpa/helm-20210131.1946/helm-help.el b/elpa/helm-20210729.1510/helm-help.el similarity index 85% rename from elpa/helm-20210131.1946/helm-help.el rename to elpa/helm-20210729.1510/helm-help.el index daa4bc9b..097e6ae2 100644 --- a/elpa/helm-20210131.1946/helm-help.el +++ b/elpa/helm-20210729.1510/helm-help.el @@ -67,9 +67,10 @@ Find here the documentation of all documented sources." (set-buffer buf) (let ((inhibit-read-only t)) (erase-buffer) - (cl-loop for elm in helm-help--string-list - for str = (helm-interpret-value elm) - do (insert (substitute-command-keys str) "\n\n")) + (save-excursion + (cl-loop for elm in helm-help--string-list + for str = (helm-interpret-value elm) + do (insert (substitute-command-keys str) "\n\n"))) (org-mode)) (setq buffer-read-only t) (view-mode))) @@ -133,9 +134,11 @@ Starting from Helm v1.6.8, you can specify more than one directory. **** Fuzzy matching -`helm-buffers-fuzzy-matching' turns on fuzzy matching on buffer names, but not -on directory names or major modes. A pattern starting with \"^\" disables fuzzy -matching and matches by exact regexp. +`helm-buffers-fuzzy-matching' turns on fuzzy matching on buffer +names, but not on directory names or major modes. A pattern +starting with \"^\" disables fuzzy matching and matching is done +litteraly IOW do not use regexps (\"^\" or whatever special +regexp character) when you want to fuzzy match. **** Examples @@ -209,27 +212,29 @@ Yellow => Tramp archive buffer. ** Commands \\ -\\[helm-buffer-run-zgrep]\t\tGrep Buffer(s) works as zgrep too (`\\[universal-argument]' to grep all buffers but non-file buffers). -\\[helm-buffers-run-multi-occur]\t\tMulti-Occur buffer or marked buffers (`\\[universal-argument]' to toggle force-searching current-buffer). -\\[helm-buffer-switch-other-window]\t\tSwitch to other window. -\\[helm-buffer-switch-other-frame]\t\tSwitch to other frame. -\\[helm-buffers-run-browse-project]\t\tBrowse project from buffer. -\\[helm-buffer-run-query-replace-regexp]\t\tQuery-replace-regexp in marked buffers. -\\[helm-buffer-run-query-replace]\t\tQuery-replace in marked buffers. -\\[helm-buffer-run-ediff]\t\tEdiff current buffer with candidate. With two marked buffers, ediff those buffers. -\\[helm-buffer-run-ediff-merge]\t\tEdiff-merge current buffer with candidate. With two marked buffers, ediff-merge those buffers. -\\[helm-buffer-diff-persistent]\t\tToggle Diff-buffer with saved file without leaving Helm. -\\[helm-buffer-revert-persistent]\t\tRevert buffer without leaving Helm. -\\[helm-buffer-save-persistent]\t\tSave buffer without leaving Helm. -\\[helm-buffer-run-save-some-buffers]\t\tSave all unsaved buffers. -\\[helm-buffer-run-kill-buffers]\t\tDelete marked buffers and leave Helm. -\\[helm-buffer-run-kill-persistent]\t\tDelete buffer without leaving Helm. -\\[helm-buffer-run-rename-buffer]\t\tRename buffer. -\\[helm-toggle-all-marks]\t\tToggle all marks. -\\[helm-mark-all]\t\tMark all. -\\[helm-toggle-buffers-details]\t\tToggle details. -\\[helm-buffers-toggle-show-hidden-buffers]\t\tShow hidden buffers. -\\[helm-buffers-mark-similar-buffers]\t\tMark all buffers of the same type (color) as current buffer.") +|Keys|Description| +|-------------+----------| +|\\[helm-buffer-run-zgrep]|Grep Buffer(s) works as zgrep too (`\\[universal-argument]' to grep all buffers but non-file buffers). +|\\[helm-buffers-run-occur]|Multi-Occur buffer or marked buffers (`\\[universal-argument]' to toggle force-searching current-buffer). +|\\[helm-buffer-switch-other-window]|Switch to other window. +|\\[helm-buffer-switch-other-frame]|Switch to other frame. +|\\[helm-buffers-run-browse-project]|Browse project from buffer. +|\\[helm-buffer-run-query-replace-regexp]|Query-replace-regexp in marked buffers. +|\\[helm-buffer-run-query-replace]|Query-replace in marked buffers. +|\\[helm-buffer-run-ediff]|Ediff current buffer with candidate. With two marked buffers, ediff those buffers. +|\\[helm-buffer-run-ediff-merge]|Ediff-merge current buffer with candidate. With two marked buffers, ediff-merge those buffers. +|\\[helm-buffer-diff-persistent]|Toggle Diff-buffer with saved file without leaving Helm. +|\\[helm-buffer-revert-persistent]|Revert buffer without leaving Helm. +|\\[helm-buffer-save-persistent]|Save buffer without leaving Helm. +|\\[helm-buffer-run-save-some-buffers]|Save all unsaved buffers. +|\\[helm-buffer-run-kill-buffers]|Delete marked buffers and leave Helm. +|\\[helm-buffer-run-kill-persistent]|Delete buffer without leaving Helm. +|\\[helm-buffer-run-rename-buffer]|Rename buffer. +|\\[helm-toggle-all-marks]|Toggle all marks. +|\\[helm-mark-all]|Mark all. +|\\[helm-toggle-buffers-details]|Toggle details. +|\\[helm-buffers-toggle-show-hidden-buffers]|Show hidden buffers. +|\\[helm-buffers-mark-similar-buffers]|Mark all buffers of the same type (color) as current buffer.") ;;; Find files help (`helm-find-files') ;; @@ -273,7 +278,7 @@ Note that when deleting char backward, Helm takes care of disabling update giving you the opportunity to edit your pattern for e.g. renaming a file or creating a new file or directory. When `helm-ff-auto-update-initial-value' is non nil you may want to -disable it temporarily, see [[Toggle auto-completion with `C-c DEL'][Toggle auto-completion with `C-c DEL']] for this. +disable it temporarily, see [[Toggle auto-completion][Toggle auto-completion]] for this. **** Use `\\\\[helm-find-files-down-last-level]' to walk back the resulting tree of all the `\\\\[helm-find-files-up-one-level]' or DEL you did @@ -807,7 +812,10 @@ If Rsync is available, you can use it to copy/sync files or directories with some restrictions though: - Copying from/to tramp sudo method may not work (permissions). -- Copying from remote to remote is not supported (rsync restriction). +- Copying from remote to remote is not supported (rsync restriction) +however you can mount a remote with sshfs and copy to it (best), otherwise you have to modify +the command line with a prefix arg, see [[https://unix.stackexchange.com/questions/183504/how-to-rsync-files-between-two-remotes][how-to-rsync-files-between-two-remotes]] +for the command line to use. This command is mostly useful when copying large files as it is fast, asynchronous and provide a progress bar in mode-line. Each @@ -1119,65 +1127,75 @@ You may have in some rare cases to refresh directory manually with `\\ for example when helm-find-files session is running and a file is modified/deleted in current visited directory by an external command from outside Emacs. +NOTE: Helm is using file-notify to watch visited directories, +nowaday most systems come with a notify package but if your +system doesn't support this, you can turn off file notifications +by customizing the variable `helm-ff-use-notify'. In this case +you will have to refresh manually directories when needed with `\\\\[helm-refresh]'. + ** Commands \\ -\\[helm-ff-run-locate]\t\tRun `locate' (`\\[universal-argument]' to specify locate database, `M-n' to insert basename of candidate). -\\[helm-ff-run-browse-project]\t\tBrowse project (`\\[universal-argument]' to recurse, `\\[universal-argument] \\[universal-argument]' to recurse and refresh database). -\\[helm-ff-run-find-sh-command]\t\tRun `find' shell command from this directory. -\\[helm-ff-run-grep]\t\tRun Grep (`\\[universal-argument]' to recurse). -\\[helm-ff-run-pdfgrep]\t\tRun Pdfgrep on marked files. -\\[helm-ff-run-zgrep]\t\tRun zgrep (`\\[universal-argument]' to recurse). -\\[helm-ff-run-grep-ag]\t\tRun AG grep on current directory. -\\[helm-ff-run-git-grep]\t\tRun git-grep on current directory. -\\[helm-ff-run-gid]\t\tRun gid (id-utils). -\\[helm-ff-run-etags]\t\tRun Etags (`\\[universal-argument]' to use thing-at-point, `\\[universal-argument] \\[universal-argument]' to reload cache). -\\[helm-ff-run-rename-file]\t\tRename Files (`\\[universal-argument]' to follow). -\\[helm-ff-run-query-replace-fnames-on-marked]\t\tQuery replace on marked files. -\\[helm-ff-run-copy-file]\t\tCopy Files (`\\[universal-argument]' to follow). -\\[helm-ff-run-rsync-file]\t\tRsync Files (`\\[universal-argument]' to edit command). -\\[helm-ff-run-byte-compile-file]\t\tByte Compile Files (`\\[universal-argument]' to load). -\\[helm-ff-run-load-file]\t\tLoad Files. -\\[helm-ff-run-symlink-file]\t\tSymlink Files. -\\[helm-ff-run-hardlink-file]\t\tHardlink files. -\\[helm-ff-run-relsymlink-file]\t\tRelative symlink Files. -\\[helm-ff-run-delete-file]\t\tDelete Files. -\\[helm-ff-run-touch-files]\t\tTouch files. -\\[helm-ff-run-kill-buffer-persistent]\t\tKill buffer candidate without leaving Helm. -\\[helm-ff-persistent-delete]\t\tDelete file without leaving Helm. -\\[helm-ff-run-switch-to-shell]\t\tSwitch to prefered shell. -\\[helm-ff-run-eshell-command-on-file]\t\tEshell command on file (`\\[universal-argument]' to apply on marked files, otherwise treat them sequentially). -\\[helm-ff-run-ediff-file]\t\tEdiff file. -\\[helm-ff-run-ediff-merge-file]\t\tEdiff merge file. -\\[helm-ff-run-complete-fn-at-point]\t\tComplete file name at point. -\\[helm-ff-run-switch-other-window]\t\tSwitch to other window. -\\[helm-ff-run-switch-other-frame]\t\tSwitch to other frame. -\\[helm-ff-run-open-file-externally]\t\tOpen file with external program (`\\[universal-argument]' to choose). -\\[helm-ff-run-preview-file-externally]\t\tPreview file with external program. -\\[helm-ff-run-open-file-with-default-tool]\t\tOpen file externally with default tool. -\\[helm-ff-rotate-left-persistent]\t\tRotate image left. -\\[helm-ff-rotate-right-persistent]\t\tRotate image right. -\\[helm-ff-increase-image-size-persistent]\t\tZoom in image. -\\[helm-ff-decrease-image-size-persistent]\t\tZoom out image. -\\[helm-find-files-up-one-level]\t\tGo to parent directory. -\\[helm-find-files-history]\t\tSwitch to the visited-directory history. -\\[helm-ff-file-name-history]\t\tSwitch to file name history. -\\[helm-ff-properties-persistent]\t\tShow file properties in a tooltip. -\\[helm-mark-all]\t\tMark all visible candidates. -\\[helm-ff-run-toggle-auto-update]\t\tToggle auto-expansion of directories. -\\[helm-unmark-all]\t\tUnmark all candidates, visible and invisible ones. -\\[helm-ff-run-mail-attach-files]\t\tAttach files to message buffer. -\\[helm-ff-run-print-file]\t\tPrint file, (`\\[universal-argument]' to refresh printer list). -\\[helm-enlarge-window]\t\tEnlarge Helm window. -\\[helm-narrow-window]\t\tNarrow Helm window. -\\[helm-ff-run-toggle-basename]\t\tToggle basename/fullpath. -\\[helm-ff-run-find-file-as-root]\t\tFind file as root. -\\[helm-ff-run-find-alternate-file]\t\tFind alternate file. -\\[helm-ff-run-insert-org-link]\t\tInsert org link. -\\[helm-ff-bookmark-set]\t\tSet bookmark to current directory. -\\[helm-find-files-switch-to-bookmark]\t\tJump to bookmark list. -\\[helm-ff-sort-alpha]\t\tSort alphabetically -\\[helm-ff-sort-by-newest]\t\tSort by newest -\\[helm-ff-sort-by-size]\t\tSort by size") +|Keys|Description +|-----------+----------| +|\\[helm-ff-run-locate]|Run `locate' (`\\[universal-argument]' to specify locate database, `M-n' to insert basename of candidate). +|\\[helm-ff-run-browse-project]|Browse project (`\\[universal-argument]' to recurse, `\\[universal-argument] \\[universal-argument]' to recurse and refresh database). +|\\[helm-ff-run-find-sh-command]|Run `find' shell command from this directory. +|\\[helm-ff-run-grep]|Run Grep (`\\[universal-argument]' to recurse). +|\\[helm-ff-run-pdfgrep]|Run Pdfgrep on marked files. +|\\[helm-ff-run-zgrep]|Run zgrep (`\\[universal-argument]' to recurse). +|\\[helm-ff-run-grep-ag]|Run AG grep on current directory. +|\\[helm-ff-run-git-grep]|Run git-grep on current directory. +|\\[helm-ff-run-gid]|Run gid (id-utils). +|\\[helm-ff-run-etags]|Run Etags (`\\[universal-argument]' to use thing-at-point, `\\[universal-argument] \\[universal-argument]' to reload cache). +|\\[helm-ff-run-rename-file]|Rename Files (`\\[universal-argument]' to follow). +|\\[helm-ff-run-query-replace-fnames-on-marked]|Query replace on marked files. +|\\[helm-ff-run-copy-file]|Copy Files (`\\[universal-argument]' to follow). +|\\[helm-ff-run-rsync-file]|Rsync Files (`\\[universal-argument]' to edit command). +|\\[helm-ff-run-byte-compile-file]|Byte Compile Files (`\\[universal-argument]' to load). +|\\[helm-ff-run-load-file]|Load Files. +|\\[helm-ff-run-symlink-file]|Symlink Files. +|\\[helm-ff-run-hardlink-file]|Hardlink files. +|\\[helm-ff-run-relsymlink-file]|Relative symlink Files. +|\\[helm-ff-run-delete-file]|Delete Files. +|\\[helm-ff-run-touch-files]|Touch files. +|\\[helm-ff-run-kill-buffer-persistent]|Kill buffer candidate without leaving Helm. +|\\[helm-ff-persistent-delete]|Delete file without leaving Helm. +|\\[helm-ff-run-switch-to-shell]|Switch to prefered shell. +|\\[helm-ff-run-eshell-command-on-file]|Eshell command on file (`\\[universal-argument]' to apply on marked files, otherwise treat them sequentially). +|\\[helm-ff-run-ediff-file]|Ediff file. +|\\[helm-ff-run-ediff-merge-file]|Ediff merge file. +|\\[helm-ff-run-complete-fn-at-point]|Complete file name at point. +|\\[helm-ff-run-switch-other-window]|Switch to other window. +|\\[helm-ff-run-switch-other-frame]|Switch to other frame. +|\\[helm-ff-run-open-file-externally]|Open file with external program (`\\[universal-argument]' to choose). +|\\[helm-ff-run-preview-file-externally]|Preview file with external program. +|\\[helm-ff-run-open-file-with-default-tool]|Open file externally with default tool. +|\\[helm-ff-rotate-left-persistent]|Rotate image left. +|\\[helm-ff-rotate-right-persistent]|Rotate image right. +|\\[helm-ff-increase-image-size-persistent]|Zoom in image. +|\\[helm-ff-decrease-image-size-persistent]|Zoom out image. +|\\[helm-find-files-up-one-level]|Go to parent directory. +|\\[helm-find-files-history]|Switch to the visited-directory history. +|\\[helm-ff-file-name-history]|Switch to file name history. +|\\[helm-ff-properties-persistent]|Show file properties in a tooltip. +|\\[helm-mark-all]|Mark all visible candidates. +|\\[helm-ff-run-toggle-auto-update]|Toggle auto-expansion of directories. +|\\[helm-unmark-all]|Unmark all candidates, visible and invisible ones. +|\\[helm-ff-run-mail-attach-files]|Attach files to message buffer. +|\\[helm-ff-run-print-file]|Print file, (`\\[universal-argument]' to refresh printer list). +|\\[helm-enlarge-window]|Enlarge Helm window. +|\\[helm-narrow-window]|Narrow Helm window. +|\\[helm-ff-run-toggle-basename]|Toggle basename/fullpath. +|\\[helm-ff-run-find-file-as-root]|Find file as root. +|\\[helm-ff-run-find-alternate-file]|Find alternate file. +|\\[helm-ff-run-insert-org-link]|Insert org link. +|\\[helm-ff-bookmark-set]|Set bookmark to current directory. +|\\[helm-find-files-switch-to-bookmark]|Jump to bookmark list. +|\\[helm-ff-sort-alpha]|Sort alphabetically +|\\[helm-ff-sort-by-newest]|Sort by newest +|\\[helm-ff-sort-by-size]|Sort by size +|\\[helm-ff-toggle-dirs-only]|Show only directories +|\\[helm-ff-toggle-files-only]|Show only files") ;;; Help for file-name-history ;; @@ -1193,7 +1211,7 @@ You can toggle the view of deleted files, see commands below. ** Commands \\ -\\[helm-file-name-history-show-or-hide-deleted]\t\tToggle deleted files view.") +\\[helm-file-name-history-show-or-hide-deleted]|Toggle deleted files view.") ;;; Help for `helm-read-file-name' ;; @@ -1283,13 +1301,15 @@ It is useful when some commands are prompting continuously until you enter an em ** Commands \\ -\\[helm-find-files-up-one-level]\t\tGo to parent directory. -\\[helm-ff-run-toggle-auto-update]\t\tToggle auto-expansion of directories. -\\[helm-ff-run-toggle-basename]\t\tToggle basename. -\\[helm-ff-file-name-history]\t\tFile name history. -C/\\[helm-cr-empty-string]\t\tReturn empty string unless `must-match' is non-nil. -\\[helm-next-source]\t\tGo to next source. -\\[helm-previous-source]\t\tGo to previous source." +|Keys|Description +|-----------+----------| +|\\[helm-find-files-up-one-level]|Go to parent directory. +|\\[helm-ff-run-toggle-auto-update]|Toggle auto-expansion of directories. +|\\[helm-ff-run-toggle-basename]|Toggle basename. +|\\[helm-ff-file-name-history]|File name history. +|C/\\[helm-cr-empty-string]|Return empty string unless `must-match' is non-nil. +|\\[helm-next-source]|Go to next source. +|\\[helm-previous-source]|Go to previous source." name name))) ;;; FD help @@ -1306,9 +1326,18 @@ hard drive cache is \"cold\", then once the cache is initialized searchs are very fast. You can pass any [[https://github.com/sharkdp/fd#command-line-options][Fd options]] before pattern, e.g. \"-e py foo\". The [[https://github.com/sharkdp/fd][Fd]] command line can be customized with `helm-fd-switches' user variable. -Always use --color always as option otherwise you will have no colors. +Always use =--color always= as option otherwise you will have no colors. To customize colors see [[https://github.com/sharkdp/fd#colorized-output][Fd colorized output]]. +NOTE: +Starting from fd version 8.2.1, you have to provide the env var +LS_COLORS to Emacs to have a colorized output, the easiest way is +to add to your =~/.profile= file =eval $(dircolors)=. +Another way is using =setenv= in your init file. +This is not needed when running Emacs from a terminal either with =emacs -nw= +or =emacs= because emacs inherit the env vars of this terminal. +See [[https://github.com/sharkdp/fd/issues/725][fd bugref#725]] + Search is (pcre) regexp based (see [[https://docs.rs/regex/1.0.0/regex/#syntax][Regexp syntax]]), multi patterns are _not_ supported. ** Man page @@ -1568,25 +1597,27 @@ OPTIONS ** Commands \\ -\\[helm-ff-run-grep]\t\tRun grep (`\\[universal-argument]' to recurse). -\\[helm-ff-run-zgrep]\t\tRun zgrep. -\\[helm-ff-run-pdfgrep]\t\tRun PDFgrep on marked files. -\\[helm-ff-run-copy-file]\t\tCopy file(s) -\\[helm-ff-run-rename-file]\t\tRename file(s). -\\[helm-ff-run-symlink-file]\t\tSymlink file(s). -\\[helm-ff-run-hardlink-file]\t\tHardlink file(s). -\\[helm-ff-run-delete-file]\t\tDelete file(s). -\\[helm-ff-run-byte-compile-file]\t\tByte compile Elisp file(s) (`\\[universal-argument]' to load). -\\[helm-ff-run-load-file]\t\tLoad Elisp file(s). -\\[helm-ff-run-ediff-file]\t\tEdiff file. -\\[helm-ff-run-ediff-merge-file]\t\tEdiff-merge file. -\\[helm-ff-run-switch-other-window]\t\tSwitch to other window. -\\[helm-ff-properties-persistent]\t\tShow file properties. -\\[helm-ff-run-open-file-externally]\t\tOpen file with external program (`\\[universal-argument]' to choose). -\\[helm-ff-run-open-file-with-default-tool]\t\tOpen file externally with default tool. -\\[helm-ff-run-insert-org-link]\t\tInsert org link. -\\[helm-fd-previous-directory]\t\tMove to previous directory. -\\[helm-fd-next-directory]\tMove to next directory.") +|Keys|Description +|-----------+----------| +|\\[helm-ff-run-grep]|Run grep (`\\[universal-argument]' to recurse). +|\\[helm-ff-run-zgrep]|Run zgrep. +|\\[helm-ff-run-pdfgrep]|Run PDFgrep on marked files. +|\\[helm-ff-run-copy-file]|Copy file(s) +|\\[helm-ff-run-rename-file]|Rename file(s). +|\\[helm-ff-run-symlink-file]|Symlink file(s). +|\\[helm-ff-run-hardlink-file]|Hardlink file(s). +|\\[helm-ff-run-delete-file]|Delete file(s). +|\\[helm-ff-run-byte-compile-file]|Byte compile Elisp file(s) (`\\[universal-argument]' to load). +|\\[helm-ff-run-load-file]|Load Elisp file(s). +|\\[helm-ff-run-ediff-file]|Ediff file. +|\\[helm-ff-run-ediff-merge-file]|Ediff-merge file. +|\\[helm-ff-run-switch-other-window]|Switch to other window. +|\\[helm-ff-properties-persistent]|Show file properties. +|\\[helm-ff-run-open-file-externally]|Open file with external program (`\\[universal-argument]' to choose). +|\\[helm-ff-run-open-file-with-default-tool]|Open file externally with default tool. +|\\[helm-ff-run-insert-org-link]|Insert org link. +|\\[helm-fd-previous-directory]|Move to previous directory. +|\\[helm-fd-next-directory]|Move to next directory.") ;;; Generic file help - Used by locate. ;; @@ -1636,24 +1667,26 @@ than 1 megabyte: ** Commands \\ -\\[helm-ff-run-toggle-basename]\t\tToggle basename. -\\[helm-ff-run-grep]\t\tRun grep (`\\[universal-argument]' to recurse). -\\[helm-ff-run-zgrep]\t\tRun zgrep. -\\[helm-ff-run-pdfgrep]\t\tRun PDFgrep on marked files. -\\[helm-ff-run-copy-file]\t\tCopy file(s) -\\[helm-ff-run-rename-file]\t\tRename file(s). -\\[helm-ff-run-symlink-file]\t\tSymlink file(s). -\\[helm-ff-run-hardlink-file]\t\tHardlink file(s). -\\[helm-ff-run-delete-file]\t\tDelete file(s). -\\[helm-ff-run-byte-compile-file]\t\tByte compile Elisp file(s) (`\\[universal-argument]' to load). -\\[helm-ff-run-load-file]\t\tLoad Elisp file(s). -\\[helm-ff-run-ediff-file]\t\tEdiff file. -\\[helm-ff-run-ediff-merge-file]\t\tEdiff-merge file. -\\[helm-ff-run-switch-other-window]\t\tSwitch to other window. -\\[helm-ff-properties-persistent]\t\tShow file properties. -\\[helm-ff-run-open-file-externally]\t\tOpen file with external program (`\\[universal-argument]' to choose). -\\[helm-ff-run-open-file-with-default-tool]\t\tOpen file externally with default tool. -\\[helm-ff-run-insert-org-link]\t\tInsert org link.") +|Keys|Description +|-----------+----------| +|\\[helm-ff-run-toggle-basename]|Toggle basename. +|\\[helm-ff-run-grep]|Run grep (`\\[universal-argument]' to recurse). +|\\[helm-ff-run-zgrep]|Run zgrep. +|\\[helm-ff-run-pdfgrep]|Run PDFgrep on marked files. +|\\[helm-ff-run-copy-file]|Copy file(s) +|\\[helm-ff-run-rename-file]|Rename file(s). +|\\[helm-ff-run-symlink-file]|Symlink file(s). +|\\[helm-ff-run-hardlink-file]|Hardlink file(s). +|\\[helm-ff-run-delete-file]|Delete file(s). +|\\[helm-ff-run-byte-compile-file]|Byte compile Elisp file(s) (`\\[universal-argument]' to load). +|\\[helm-ff-run-load-file]|Load Elisp file(s). +|\\[helm-ff-run-ediff-file]|Ediff file. +|\\[helm-ff-run-ediff-merge-file]|Ediff-merge file. +|\\[helm-ff-run-switch-other-window]|Switch to other window. +|\\[helm-ff-properties-persistent]|Show file properties. +|\\[helm-ff-run-open-file-externally]|Open file with external program (`\\[universal-argument]' to choose). +|\\[helm-ff-run-open-file-with-default-tool]|Open file externally with default tool. +|\\[helm-ff-run-insert-org-link]|Insert org link.") ;;; Grep help ;; @@ -1790,13 +1823,15 @@ use a prefix argument. ** Commands \\ -\\[helm-goto-next-file]\t\tNext File. -\\[helm-goto-precedent-file]\t\tPrevious File. -\\[helm-yank-text-at-point]\t\tYank text at point in minibuffer. -\\[helm-grep-run-other-window-action]\t\tJump to other window. -\\[helm-grep-run-other-frame-action]\t\tJump to other frame. -\\[helm-grep-run-default-action]\t\tRun default action (same as `RET'). -\\[helm-grep-run-save-buffer]\t\tSave to a `helm-grep-mode' enabled buffer.") +|Keys|Description +|-----------+----------| +|\\[helm-goto-next-file]|Next File. +|\\[helm-goto-precedent-file]|Previous File. +|\\[helm-yank-text-at-point]|Yank text at point in minibuffer. +|\\[helm-grep-run-other-window-action]|Jump to other window. +|\\[helm-grep-run-other-frame-action]|Jump to other frame. +|\\[helm-grep-run-default-action]|Run default action (same as `RET'). +|\\[helm-grep-run-save-buffer]|Save to a `helm-grep-mode' enabled buffer.") ;;; PDF grep help ;; @@ -1806,9 +1841,11 @@ use a prefix argument. ** Commands \\ -\\[helm-goto-next-file]\t\tNext file. -\\[helm-goto-precedent-file]\t\tPrevious file. -\\[helm-yank-text-at-point]\t\tYank text at point in minibuffer.") +|Keys|Description +|-----------+----------| +|\\[helm-goto-next-file]|Next file. +|\\[helm-goto-precedent-file]|Previous file. +|\\[helm-yank-text-at-point]|Yank text at point in minibuffer.") ;;; Etags help ;; @@ -1818,9 +1855,11 @@ use a prefix argument. ** Commands \\ -\\[helm-goto-next-file]\t\tNext file. -\\[helm-goto-precedent-file]\t\tPrevious file. -\\[helm-yank-text-at-point]\t\tYank text at point in minibuffer.") +|Keys|Description +|-----------+----------| +|\\[helm-goto-next-file]|Next file. +|\\[helm-goto-precedent-file]|Previous file. +|\\[helm-yank-text-at-point]|Yank text at point in minibuffer.") ;;; UCS help ;; @@ -1835,11 +1874,13 @@ leaving Helm. ** Commands \\ -\\[helm-ucs-persistent-insert]\t\tInsert character. -\\[helm-ucs-persistent-forward]\t\tForward character. -\\[helm-ucs-persistent-backward]\t\tBackward character. -\\[helm-ucs-persistent-delete]\t\tDelete character backward. -\\[helm-ucs-persistent-insert-space]\t\tInsert space.") +|Keys|Description +|-----------+----------| +|\\[helm-ucs-persistent-insert]|Insert character. +|\\[helm-ucs-persistent-forward]|Forward character. +|\\[helm-ucs-persistent-backward]|Backward character. +|\\[helm-ucs-persistent-delete]|Delete character backward. +|\\[helm-ucs-persistent-insert-space]|Insert space.") ;;; Bookmark help ;; @@ -1849,10 +1890,12 @@ leaving Helm. ** Commands \\ -\\[helm-bookmark-run-jump-other-window]\t\tJump other window. -\\[helm-bookmark-run-delete]\t\tDelete bookmark. -\\[helm-bookmark-run-edit]\t\tEdit bookmark. -\\[helm-bookmark-toggle-filename]\t\tToggle bookmark location visibility.") +|Keys|Description +|-----------+----------| +|\\[helm-bookmark-run-jump-other-window]|Jump other window. +|\\[helm-bookmark-run-delete]|Delete bookmark. +|\\[helm-bookmark-run-edit]|Edit bookmark. +|\\[helm-bookmark-toggle-filename]|Toggle bookmark location visibility.") ;;; Eshell command on file help ;; @@ -1946,12 +1989,14 @@ prefix arg to ensure you run only one command on all marked async. ** Commands \\ -\\[helm-ff-run-switch-other-window]\t\tSwitch to other window. -\\[helm-ff-run-switch-other-frame]\t\tSwitch to other frame. -\\[helm-ff-run-grep]\t\tGrep file. -\\[helm-ff-run-zgrep]\t\tZgrep file. -\\[helm-ff-run-delete-file]\t\tDelete file. -\\[helm-ff-run-open-file-externally]\t\tOpen file externally.") +|Keys|Description +|-----------+----------| +|\\[helm-ff-run-switch-other-window]|Switch to other window. +|\\[helm-ff-run-switch-other-frame]|Switch to other frame. +|\\[helm-ff-run-grep]|Grep file. +|\\[helm-ff-run-zgrep]|Zgrep file. +|\\[helm-ff-run-delete-file]|Delete file. +|\\[helm-ff-run-open-file-externally]|Open file externally.") ;;; Moccur help ;; @@ -2050,9 +2095,11 @@ See [[Moving in `helm-buffer'][Moving in `helm-buffer']]. ** Commands \\ -\\[helm-occur-run-goto-line-ow]\t\tGo to line in other window. -\\[helm-occur-run-goto-line-of]\t\tGo to line in new frame. -\\[helm-occur-run-save-buffer]\t\tSave results in new buffer.") +|Keys|Description +|-----------+----------| +|\\[helm-occur-run-goto-line-ow]|Go to line in other window. +|\\[helm-occur-run-goto-line-of]|Go to line in new frame. +|\\[helm-occur-run-save-buffer]|Save results in new buffer.") ;;; Helm Top ;; ;; @@ -2061,10 +2108,12 @@ See [[Moving in `helm-buffer'][Moving in `helm-buffer']]. ** Commands \\ -\\[helm-top-run-sort-by-com]\t\tSort by commands. -\\[helm-top-run-sort-by-cpu]\t\tSort by CPU usage. -\\[helm-top-run-sort-by-user]\t\tSort alphabetically by user. -\\[helm-top-run-sort-by-mem]\t\tSort by memory.") +|Keys|Description +|-----------+----------| +|\\[helm-top-run-sort-by-com]|Sort by commands. +|\\[helm-top-run-sort-by-cpu]|Sort by CPU usage. +|\\[helm-top-run-sort-by-user]|Sort alphabetically by user. +|\\[helm-top-run-sort-by-mem]|Sort by memory.") ;;; Helm Elisp package ;; @@ -2112,17 +2161,19 @@ marking it (`C-c u' or `RET') . ** Commands \\ -\\[helm-el-package-show-all]\t\tShow all packages. -\\[helm-el-package-show-installed]\t\tShow installed packages only. -\\[helm-el-package-show-uninstalled]\t\tShow non-installed packages only. -\\[helm-el-package-show-upgrade]\t\tShow upgradable packages only. -\\[helm-el-package-show-built-in]\t\tShow built-in packages only. -\\[helm-el-run-package-install]\t\tInstall package(s). -\\[helm-el-run-package-reinstall]\t\tReinstall package(s). -\\[helm-el-run-package-uninstall]\t\tUninstall package(s). -\\[helm-el-run-package-upgrade]\t\tUpgrade package(s). -\\[helm-el-run-package-upgrade-all]\t\tUpgrade all packages. -\\[helm-el-run-visit-homepage]\t\tVisit package homepage.") +|Keys|Description +|-----------+----------| +|\\[helm-el-package-show-all]|Show all packages. +|\\[helm-el-package-show-installed]|Show installed packages only. +|\\[helm-el-package-show-uninstalled]|Show non-installed packages only. +|\\[helm-el-package-show-upgrade]|Show upgradable packages only. +|\\[helm-el-package-show-built-in]|Show built-in packages only. +|\\[helm-el-run-package-install]|Install package(s). +|\\[helm-el-run-package-reinstall]|Reinstall package(s). +|\\[helm-el-run-package-uninstall]|Uninstall package(s). +|\\[helm-el-run-package-upgrade]|Upgrade package(s). +|\\[helm-el-run-package-upgrade-all]|Upgrade all packages. +|\\[helm-el-run-visit-homepage]|Visit package homepage.") ;;; Helm M-x ;; @@ -2150,11 +2201,6 @@ prefix arg will apply to `self-insert-command' (e.g. if you type `C-u e' \"eeee\" will be inserted in prompt) so select the command you want to execute before specifying prefix arg. -*** Completion styles in helm-M-x - -By default helm-M-x use 'helm completion style, if you want to enable fuzzy matching aka flex, -see [[Completion-styles][Completion-styles]]. - *** Duplicate entries in helm-M-x history helm-M-x history obey to history variables, if you have @@ -2168,8 +2214,10 @@ duplicates in your helm-M-x history set `history-delete-duplicates' to non nil." ** Commands \\ -\\[helm-imenu-next-section]\t\tGo to next section. -\\[helm-imenu-previous-section]\t\tGo to previous section.") +|Keys|Description +|-----------+----------| +|\\[helm-imenu-next-section]|Go to next section. +|\\[helm-imenu-previous-section]|Go to previous section.") ;;; Helm colors ;; @@ -2179,10 +2227,12 @@ duplicates in your helm-M-x history set `history-delete-duplicates' to non nil." ** Commands \\ -\\[helm-color-run-insert-name]\t\tInsert the entry name. -\\[helm-color-run-kill-name]\t\tKill the entry name. -\\[helm-color-run-insert-rgb]\t\tInsert entry in RGB format. -\\[helm-color-run-kill-rgb]\t\tKill entry in RGB format.") +|Keys|Description +|-----------+----------| +|\\[helm-color-run-insert-name]|Insert the entry name. +|\\[helm-color-run-kill-name]|Kill the entry name. +|\\[helm-color-run-insert-rgb]|Insert entry in RGB format. +|\\[helm-color-run-kill-rgb]|Kill entry in RGB format.") ;;; Helm Semantic ;; @@ -2259,11 +2309,13 @@ by using a prefix argument, i.e. `C-u RET', like the regular `yank' command does ** Commands \\ -\\[helm-next-line]\t\tNext line. -\\[helm-previous-line]\t\tPrevious line. -\\[helm-kill-ring-delete]\t\tDelete entry. -\\[helm-kill-ring-toggle-truncated]\t\tToggle truncated view of candidate. -\\[helm-kill-ring-kill-selection]\t\tKill non-truncated of selection.") +|Keys|Description +|-----------+----------| +|\\[helm-next-line]|Next line. +|\\[helm-previous-line]|Previous line. +|\\[helm-kill-ring-delete]|Delete entry. +|\\[helm-kill-ring-toggle-truncated]|Toggle truncated view of candidate. +|\\[helm-kill-ring-kill-selection]|Kill non-truncated of selection.") ;;; Completing-read ;; @@ -2289,7 +2341,9 @@ It is useful when some commands are prompting continuously until you enter an em ** Commands \\ -\\[helm-cr-empty-string]\t\tExit minibuffer with empty string." +|Keys|Description +|-----------+----------| +|\\[helm-cr-empty-string]|Exit minibuffer with empty string." com com))) @@ -2335,10 +2389,4 @@ f1/f2/f-n:NthAct \ (provide 'helm-help) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-help.el ends here diff --git a/elpa/helm-20210131.1946/helm-id-utils.el b/elpa/helm-20210729.1510/helm-id-utils.el similarity index 97% rename from elpa/helm-20210131.1946/helm-id-utils.el rename to elpa/helm-20210729.1510/helm-id-utils.el index 90e9f8b9..05673582 100644 --- a/elpa/helm-20210131.1946/helm-id-utils.el +++ b/elpa/helm-20210729.1510/helm-id-utils.el @@ -122,10 +122,4 @@ See ." (provide 'helm-id-utils) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-id-utils ends here diff --git a/elpa/helm-20210131.1946/helm-imenu.el b/elpa/helm-20210729.1510/helm-imenu.el similarity index 98% rename from elpa/helm-20210131.1946/helm-imenu.el rename to elpa/helm-20210729.1510/helm-imenu.el index 5a0d9cd0..89607668 100644 --- a/elpa/helm-20210131.1946/helm-imenu.el +++ b/elpa/helm-20210729.1510/helm-imenu.el @@ -258,7 +258,7 @@ string." ;; If value is an integer, convert it ;; to a marker, otherwise it is a cons cell ;; and it will be converted on next recursions. - ;; (Issue #1060) [1]. + ;; (Bug#1060) [1]. (if (integerp v) (copy-marker v) v))))) ((listp (cdr elm)) (and elm (list elm))) @@ -266,7 +266,7 @@ string." ;; bug in imenu, should not be needed. (and (cdr elm) ;; Semantic uses overlays whereas imenu uses - ;; markers (issue #1706). + ;; markers (Bug#1706). (setcdr elm (pcase (cdr elm) ; Same as [1]. ((and ov (pred overlayp)) (copy-overlay ov)) @@ -351,7 +351,7 @@ i.e. `derived-mode-p' or it have an association in :init (lambda () ;; Use a cache to avoid repeatedly sending ;; progress-reporter message when updating - ;; (Issue #1704). + ;; (Bug#1704). (setq helm-imenu--in-all-buffers-cache (helm-imenu-candidates-in-all-buffers))) :candidates 'helm-imenu--in-all-buffers-cache @@ -377,10 +377,4 @@ i.e. `derived-mode-p' or it have an association in (provide 'helm-imenu) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-imenu.el ends here diff --git a/elpa/helm-20210131.1946/helm-info.el b/elpa/helm-20210729.1510/helm-info.el similarity index 97% rename from elpa/helm-20210131.1946/helm-info.el rename to elpa/helm-20210729.1510/helm-info.el index 5b343ad7..883e7f5f 100644 --- a/elpa/helm-20210131.1946/helm-info.el +++ b/elpa/helm-20210729.1510/helm-info.el @@ -67,7 +67,7 @@ files with `helm-info-at-point'." (while (search-forward "\n* " nil t) (unless (search-forward "Menu:\n" (1+ (point-at-eol)) t) (setq start (point-at-bol) - ;; Fix issue #1503 by getting the invisible + ;; Fix Bug#1503 by getting the invisible ;; info displayed on next line in long strings. ;; e.g "* Foo.\n (line 12)" instead of ;; "* Foo.(line 12)" @@ -154,7 +154,7 @@ Elements of the list are strings of Info file names without extensions (e.g., \"emacs\" for file \"emacs.info.gz\"). Info files are found by searching directories in `Info-directory-list'." - (info-initialize) ; Build Info-directory-list from INFOPATH (Issue #2118) + (info-initialize) ; Build Info-directory-list from INFOPATH (Bug#2118) (let ((files (cl-loop for d in (or Info-directory-list Info-default-directory-list) when (file-directory-p d) @@ -265,10 +265,4 @@ Info files are made available." (provide 'helm-info) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-info.el ends here diff --git a/elpa/helm-20210131.1946/helm-locate.el b/elpa/helm-20210729.1510/helm-locate.el similarity index 99% rename from elpa/helm-20210131.1946/helm-locate.el rename to elpa/helm-20210729.1510/helm-locate.el index 6448a56d..3e1eddef 100644 --- a/elpa/helm-20210131.1946/helm-locate.el +++ b/elpa/helm-20210729.1510/helm-locate.el @@ -356,7 +356,7 @@ Sort is done on basename of CANDIDATES." (group :initform 'helm-locate))) ;; Override helm-type-file class keymap. -(defmethod helm--setup-source :after ((source helm-locate-override-inheritor)) +(cl-defmethod helm--setup-source :after ((source helm-locate-override-inheritor)) (setf (slot-value source 'keymap) helm-locate-map)) (defvar helm-source-locate @@ -473,10 +473,4 @@ Where db_path is a filename matched by (provide 'helm-locate) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-locate.el ends here diff --git a/elpa/helm-20210131.1946/helm-man.el b/elpa/helm-20210729.1510/helm-man.el similarity index 97% rename from elpa/helm-20210131.1946/helm-man.el rename to elpa/helm-20210729.1510/helm-man.el index 5f1d7608..5e37dfb8 100644 --- a/elpa/helm-20210131.1946/helm-man.el +++ b/elpa/helm-20210729.1510/helm-man.el @@ -111,10 +111,4 @@ With a prefix arg reinitialize the cache." (provide 'helm-man) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-man.el ends here diff --git a/elpa/helm-20210131.1946/helm-misc.el b/elpa/helm-20210729.1510/helm-misc.el similarity index 98% rename from elpa/helm-20210131.1946/helm-misc.el rename to elpa/helm-20210729.1510/helm-misc.el index 6e754620..4a2bbf79 100644 --- a/elpa/helm-20210131.1946/helm-misc.el +++ b/elpa/helm-20210729.1510/helm-misc.el @@ -314,7 +314,7 @@ Default action change TZ environment variable locally to emacs." :multiline t :keymap helm-minibuffer-history-map :allow-nest t))) - ;; Fix issue #1667 with emacs-25+ `query-replace-from-to-separator'. + ;; Fix Bug#1667 with emacs-25+ `query-replace-from-to-separator'. (when (and (boundp 'query-replace-from-to-separator) query-replace-p) (let ((pos (string-match "\0" elm))) (and pos @@ -328,10 +328,4 @@ Default action change TZ environment variable locally to emacs." (provide 'helm-misc) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-misc.el ends here diff --git a/elpa/helm-20210131.1946/helm-mode.el b/elpa/helm-20210729.1510/helm-mode.el similarity index 95% rename from elpa/helm-20210131.1946/helm-mode.el rename to elpa/helm-20210729.1510/helm-mode.el index 0431f707..af1cd1ed 100644 --- a/elpa/helm-20210131.1946/helm-mode.el +++ b/elpa/helm-20210729.1510/helm-mode.el @@ -241,7 +241,7 @@ Second call deletes backward char in current-buffer and quits helm completion, letting the user start a new completion with a new prefix." '(helm-mode-delete-char-backward-1 helm-mode-delete-char-backward-2) 1) -(defcustom helm-completion-style 'emacs +(defcustom helm-completion-style 'helm "Style of completion to use in `completion-in-region'. This affects only `completion-at-point' and friends, and @@ -267,11 +267,16 @@ There are three possible values to use: is not available (Emacs<27) helm provides `helm-flex' style which is similar to `flex' and helm fuzzy matching. -For a better experience, if you don't know what to use, set +For a better experience with emacs style, if you don't know what to use, set `completion-styles' to '(flex) if you are using emacs-27 or to \'(helm-flex) if you are using emacs-26 and keep 'emacs as default value for `helm-completion-style'. Advanced users can also have a look to `completion-category-overrides' to set styles according to category. +You can as well use `helm-completion-styles-alist' to override +`helm-completion-style' in specific modes. + +Of course when using `helm' of `helm-fuzzy' as `helm-completion-style' +emacs `completion-styles' have no effect. Please use custom interface or `customize-set-variable' to set this, NOT `setq'." @@ -394,13 +399,17 @@ data would not be fully collected at init time. If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." ;; Ensure COLLECTION is computed from `helm-current-buffer' ;; because some functions used as COLLECTION work - ;; only in the context of current-buffer (Issue #1030) . + ;; only in the context of current-buffer (Bug#1030) . (with-helm-current-buffer (let ((cands - (cond ((vectorp collection) + (cond ((and alistp (hash-table-p collection)) + (cl-loop for k being the hash-keys of collection + using (hash-values v) + collect (cons k v))) + ((vectorp collection) (all-completions input collection test)) ((and (symbolp collection) (boundp collection) - ;; Issue #324 history is let-bounded and given + ;; Bug#324 history is let-bounded and given ;; quoted as hist argument of completing-read. ;; See example in `rcirc-browse-url'. (symbolp (symbol-value collection))) @@ -446,7 +455,7 @@ If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." (funcall collection input test t)) ((and alistp (null test)) collection) ;; Next test ensure circular objects are removed - ;; with `all-completions' (Issue #1530). + ;; with `all-completions' (Bug#1530). (t (all-completions input collection test))))) (if sort-fn (sort cands sort-fn) cands)))) @@ -468,7 +477,7 @@ If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." (setq candidates (append (list ;; Unquote helm-pattern ;; when it is added - ;; as candidate: Why? #2015 + ;; as candidate: Why? (Bug#2015) ;; (replace-regexp-in-string ;; "\\s\\" "" helm-pattern) helm-pattern) @@ -498,7 +507,7 @@ If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." (defun helm-comp-read--move-to-first-real-candidate () (helm-aif (helm-get-selection nil 'withprop) - ;; Avoid error with candidates with an image as display (#2296). + ;; Avoid error with candidates with an image as display (Bug#2296). (when (equal (get-text-property 0 'display it) "[?]") (helm-next-line)))) @@ -566,7 +575,9 @@ It is helm `completing-read' equivalent. - PROMPT is the prompt name to use. -- COLLECTION can be a list, vector, obarray or hash-table. +- COLLECTION can be a list, alist, vector, obarray or hash-table. + For alists and hash-tables their car are use as real value of + candidate unless ALISTP is non-nil. It can be also a function that receives three arguments: the values string, predicate and t. See `all-completions' for more details. @@ -640,7 +651,12 @@ Keys description: - NOMARK: When non--nil don't allow marking candidates. -- ALISTP: (default is non--nil) See `helm-comp-read-get-candidates'. +- ALISTP: + When non-nil (default) pass the value of (DISPLAY . REAL) + candidate in COLLECTION to action when COLLECTION is an alist or a + hash-table, otherwise DISPLAY is always returned as result on exit, + which is the default when using `completing-read'. + See `helm-comp-read-get-candidates'. - CANDIDATES-IN-BUFFER: when non--nil use a source build with `helm-source-in-buffer' which is much faster. @@ -687,7 +703,7 @@ that use `helm-comp-read'. See `helm-M-x' for example." ;; and :alistp is nil INPUT is passed to ;; `all-completions' which defeat helm ;; matching functions (multi match, fuzzy - ;; etc...) issue #2134. + ;; etc...) Bug#2134. collection test sort alistp (if (and match-dynamic (null candidates-in-buffer)) helm-pattern "")))) @@ -709,7 +725,7 @@ that use `helm-comp-read'. See `helm-M-x' for example." ;; Input is added to history in completing-read's ;; and may be regexp-quoted, so unquote it ;; but check if cand is a string (it may be at this stage - ;; a symbol or nil) Issue #1553. + ;; a symbol or nil) Bug#1553. when (stringp i) collect (replace-regexp-in-string "\\s\\" "" i)))) (and hist-fc-transformer (helm-mklist hist-fc-transformer))) @@ -793,7 +809,7 @@ that use `helm-comp-read'. See `helm-M-x' for example." ;; Avoid adding an incomplete input to history. (when (and result history del-input) (cond ((and (symbolp history) ; History is a symbol. - (not (symbolp (symbol-value history)))) ; Fix Issue #324. + (not (symbolp (symbol-value history)))) ; Fix Bug#324. ;; Be sure history is not a symbol with a nil value. (helm-aif (symbol-value history) (setcar it result))) ((consp history) ; A list with a non--nil value. @@ -1041,15 +1057,17 @@ This handler uses dynamic matching which allows honouring `completion-styles'." init hist default inherit-input-method name buffer) "Default `helm-mode' handler for all `completing-read'." - (let* ((standard (memq helm-completion-style '(helm helm-fuzzy))) + (let* (;; Standard will be used as CANDS-IN-BUFFER arg. + (standard (and (memq helm-completion-style '(helm helm-fuzzy)) t)) (fn (if standard #'helm-completing-read-default-1 #'helm-completing-read-default-2)) (helm-mode-fuzzy-match (eq helm-completion-style 'helm-fuzzy))) - (apply fn - prompt collection test require-match - init hist default inherit-input-method - name buffer standard))) + (funcall fn + prompt collection test require-match + init hist default inherit-input-method name buffer + ;; CANDS-IN-BUFFER + standard))) (defun helm-mode--read-buffer-to-switch (prompt) "[INTERNAL] This is used to advice `read-buffer-to-switch'. @@ -1083,7 +1101,9 @@ Don't use it directly, use instead `helm-comp-read' in your programs. See documentation of `completing-read' and `all-completions' for details." (let* ((current-command (or (helm-this-command) this-command)) - (str-command (helm-symbol-name current-command)) + (str-command (if current-command + (helm-symbol-name current-command) + "completing-read")) (buf-name (format "*helm-mode-%s*" str-command)) (entry (assq current-command helm-completing-read-handlers-alist)) @@ -1100,13 +1120,13 @@ See documentation of `completing-read' and `all-completions' for details." ;; Note: `minibuffer-with-setup-hook' may setup a lambda ;; calling `minibuffer-completion-help' or other minibuffer ;; functions we DONT WANT here, in these cases removing the hook - ;; (a symbol) have no effect. Issue #448. + ;; (a symbol) have no effect. Bug#448. ;; Because `minibuffer-completion-table' and ;; `minibuffer-completion-predicate' are not bound ;; anymore here, these functions should have no effect now, ;; except in some rare cases like in `woman-file-name', ;; so remove all incompatible functions - ;; from `minibuffer-setup-hook' (Issue #1205, #1240). + ;; from `minibuffer-setup-hook' (Bug#1205, Bug#1240). ;; otherwise helm have not the time to close its initial session. (minibuffer-setup-hook (cl-loop for h in minibuffer-setup-hook @@ -1330,7 +1350,9 @@ Keys description: (result (helm :sources (if helm-mode-reverse-history (reverse src-list) src-list) - :input (expand-file-name initial-input) + :input (if (string-match helm-ff-url-regexp initial-input) + initial-input + (expand-file-name initial-input)) :prompt prompt :candidate-number-limit candidate-number-limit :resume 'noresume @@ -1374,7 +1396,9 @@ Keys description: Don't use it directly, use instead `helm-read-file-name' in your programs." (let* ((init (or initial dir default-directory)) (current-command (or (helm-this-command) this-command)) - (str-command (helm-symbol-name current-command)) + (str-command (if current-command + (helm-symbol-name current-command) + "read-file-name")) (helm--file-completion-sources (cons str-command (remove str-command helm--file-completion-sources))) @@ -1466,7 +1490,9 @@ Don't use it directly, use instead `helm-read-file-name' in your programs." :buffer buf-name :default default-filename ;; Helm handlers should always have a non nil INITIAL arg. - :initial-input (expand-file-name init dir) + :initial-input (if (string-match helm-ff-url-regexp init) + init + (expand-file-name init dir)) :alistp nil :nomark (null helm-comp-read-use-marked) :marked-candidates helm-comp-read-use-marked @@ -1489,7 +1515,7 @@ Don't use it directly, use instead `helm-read-file-name' in your programs." (file-name-as-directory fname) fname))) -;; Read file name handler with history (issue #1652) +;; Read file name handler with history (Bug#1652) (defun helm-read-file-name-handler-1 (prompt dir default-filename mustmatch initial predicate name buffer) @@ -1581,8 +1607,9 @@ Actually does nothing." (defun helm-completion-all-completions (string table pred point) "The all completions function for `completing-styles-alist'." ;; FIXME: No need to bind all these value. - (cl-multiple-value-bind (all _pattern prefix _suffix _carbounds) - (helm-completion--multi-all-completions string table pred point) + ;; (cl-multiple-value-bind (all _pattern prefix _suffix _carbounds) + (pcase-let ((`(,all ,_pattern ,prefix ,_suffix ,_carbounds) + (helm-completion--multi-all-completions string table pred point))) (when all (nconc all (length prefix))))) (defun helm-completion--multi-all-completions-1 (string collection &optional predicate) @@ -1622,11 +1649,11 @@ Actually does nothing." (all-completions "" (or all collection) (lambda (x &optional _y) ;; Second arg _y is needed when - ;; COLLECTION is a hash-table issue - ;; #2231 (C-x 8 RET). + ;; COLLECTION is a hash-table (Bug#2231) + ;; (C-x 8 RET). ;; Elements of COLLECTION may be ;; lists or alists, in this case consider the - ;; car of element (issue #2219 org-refile). + ;; car of element (Bug#2219 org-refile). (let ((elm (if (listp x) (car x) x))) ;; PREDICATE have been already called in ;; initial all-completions, no need to call @@ -1649,7 +1676,12 @@ Actually does nothing." (prefix (substring beforepoint 0 (car bounds))) (suffix (substring afterpoint (cdr bounds))) (all (helm-completion--multi-all-completions-1 - (regexp-quote string) table pred))) + ;; Using `regexp-quote' on STRING fixes bug#2355 but + ;; breaks regexp matching in multi match, actually with + ;; Helm-3.7.1 and emacs-27+ it seems using plain STRING + ;; works for both so use it. + ;;(regexp-quote string) + string table pred))) (list all string prefix suffix point))) ;; The adjust-metadata functions run only in emacs-27, they are NOT @@ -1675,8 +1707,8 @@ Actually does nothing." ;; It is needed here to make minibuffer-complete work in emacs-26, ;; e.g. with regular M-x. (unless (string-match-p " " string) - (cl-multiple-value-bind (all pattern prefix suffix _carbounds) - (helm-completion--flex-all-completions string table pred point) + (pcase-let ((`(,all ,pattern ,prefix ,suffix ,_carbounds) + (helm-completion--flex-all-completions string table pred point))) (when minibuffer-completing-file-name (setq all (completion-pcm--filename-try-filter all))) (completion-pcm--merge-try pattern all prefix suffix)))) @@ -1685,10 +1717,10 @@ Actually does nothing." "The all completions function for `completing-styles-alist'." ;; FIXME: No need to bind all these value. (unless (string-match-p " " string) - (cl-multiple-value-bind (all pattern prefix _suffix _carbounds) - (helm-completion--flex-all-completions - string table pred point - #'helm-completion--flex-transform-pattern) + (pcase-let ((`(,all ,pattern ,prefix ,_suffix ,_carbounds) + (helm-completion--flex-all-completions + string table pred point + #'helm-completion--flex-transform-pattern))) (let ((regexp (completion-pcm--pattern->regex pattern 'group))) (when all (nconc (helm-flex-add-score-as-prop all regexp) (length prefix))))))) @@ -1760,7 +1792,7 @@ Can be used for `completion-in-region-function' by advicing it with an (if (cdr-safe it) (car it) it))) ;; This hook force usage of the display part of candidate with ;; its properties, this is needed for lsp-mode in its - ;; :exit-function see issue #2265. + ;; :exit-function see Bug#2265. (add-hook 'helm-before-action-hook 'helm-completion-in-region--selection) (unwind-protect (let* ((enable-recursive-minibuffers t) @@ -1794,7 +1826,7 @@ Can be used for `completion-in-region-function' by advicing it with an ;; `afun' is a closure to call against each string in `data'. ;; it provide the annotation info for each string. ;; e.g "foo" => "foo " where foo is a function. - ;; See Issue #407. + ;; See Bug#407. (afun (or (plist-get completion-extra-properties :annotation-function) (completion-metadata-get metadata 'annotation-function))) (init-space-suffix (unless (or (memq helm-completion-style '(helm-fuzzy emacs)) @@ -1912,11 +1944,11 @@ Can be used for `completion-in-region-function' by advicing it with an (setq string (copy-sequence result)) (helm-completion-in-region--insert-result result start point end base-size)) - ;; Allow running extra property `:exit-function' (Issues #2265, - ;; #2356). Function is called with 'exact if for a unique + ;; Allow running extra property `:exit-function' (Bug#2265, + ;; Bug#2356). Function is called with 'exact if for a unique ;; match which is exact, the return value of `try-completion' ;; is t or a string ending with "/" i.e. possibly a directory - ;; (issue #2274), + ;; (Bug#2274), ;; otherwise it is called with 'finished. (when (and (stringp string) exit-fun) (let ((tcomp (try-completion initial-input collection))) @@ -1946,7 +1978,7 @@ Be sure to know what you are doing when modifying this.") ;; When RESULT have annotation, annotation is displayed ;; in it with a display property attached to a space ;; added at end of string, take care of removing this - ;; space (issue #2360). However keep RESULT intact to + ;; space (Bug#2360). However keep RESULT intact to ;; pass it to `:exit-function' i.e. Don't store the ;; modified string in STRING. (choose-completion-string @@ -1965,7 +1997,7 @@ Be sure to know what you are doing when modifying this.") (let ((beg (+ start base-size)) (sep (or (and ;; If `crm-separator' is a string of length 1 - ;; assume it can be used as separator (#2298), + ;; assume it can be used as separator (Bug#2298), ;; otherwise it is a regexp and use the value ;; it matches or default to "," if no match. (eq (length crm-separator) 1) @@ -1975,7 +2007,7 @@ Be sure to know what you are doing when modifying this.") ;; regexp use the string the regexp is matching. ;; If SEP is not a string, it have been probably bound to a ;; symbol or nil through `helm-crm-default-separator' that serve - ;; as a flag to say "Please no separator" (Issue #2353 with + ;; as a flag to say "Please no separator" (Bug#2353 with ;; `magit-completing-read-multiple'). (if (stringp sep) (save-excursion @@ -2045,11 +2077,11 @@ Note: This mode is incompatible with Emacs23." #'helm--completion-in-region)) ;; If user have enabled ido-everywhere BEFORE enabling ;; helm-mode disable it and warn user about its - ;; incompatibility with helm-mode (issue #2085). + ;; incompatibility with helm-mode (Bug#2085). (helm-mode--disable-ido-maybe) ;; If ido-everywhere is not enabled yet anticipate and ;; disable it if user attempt to enable it while helm-mode - ;; is running (issue #2085). + ;; is running (Bug#2085). (add-hook 'ido-everywhere-hook #'helm-mode--ido-everywhere-hook) (when (fboundp 'ffap-read-file-or-url-internal) ;; `ffap-read-file-or-url-internal' have been removed in @@ -2069,10 +2101,4 @@ Note: This mode is incompatible with Emacs23." (provide 'helm-mode) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-mode.el ends here diff --git a/elpa/helm-20210131.1946/helm-net.el b/elpa/helm-20210729.1510/helm-net.el similarity index 98% rename from elpa/helm-20210131.1946/helm-net.el rename to elpa/helm-20210729.1510/helm-net.el index 895d3c7d..6af15523 100644 --- a/elpa/helm-20210131.1946/helm-net.el +++ b/elpa/helm-20210729.1510/helm-net.el @@ -241,7 +241,7 @@ Can be \"-new-tab\" (default) or \"-new-window\"." :candidates (lambda () (funcall helm-google-suggest-default-function)) :action 'helm-google-suggest-actions - :volatile t + :match-dynamic t :keymap helm-map :requires-pattern 3)) @@ -259,7 +259,7 @@ Can be \"-new-tab\" (default) or \"-new-window\"." (defvar helm-browse-url-chromium-program "chromium-browser") (defvar helm-browse-url-uzbl-program "uzbl-browser") -(defvar helm-browse-url-next-program "next") +(defvar helm-browse-url-nyxt-program "nyxt") (defvar helm-browse-url-conkeror-program "conkeror") (defvar helm-browse-url-opera-program "opera") (defvar helm-browse-url-default-browser-alist @@ -345,10 +345,10 @@ NOTE: Probably not supported on some systems (e.g., Windows)." (helm-generic-browser url helm-browse-url-conkeror-program)) ;;;###autoload -(defun helm-browse-url-next (url &optional _ignore) +(defun helm-browse-url-nyxt (url &optional _ignore) "Browse URL with next browser." (interactive "sURL: ") - (helm-generic-browser url helm-browse-url-next-program)) + (helm-generic-browser url helm-browse-url-nyxt-program)) (defun helm-browse-url-default-browser (url &rest args) "Find the first available browser and ask it to load URL." @@ -430,10 +430,4 @@ NOTE: Probably not supported on some systems (e.g., Windows)." (provide 'helm-net) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-net.el ends here diff --git a/elpa/helm-20210131.1946/helm-occur.el b/elpa/helm-20210729.1510/helm-occur.el similarity index 99% rename from elpa/helm-20210131.1946/helm-occur.el rename to elpa/helm-20210729.1510/helm-occur.el index d567c66c..40fa6180 100644 --- a/elpa/helm-20210131.1946/helm-occur.el +++ b/elpa/helm-20210729.1510/helm-occur.el @@ -783,10 +783,4 @@ To use this bind it to a key in `isearch-mode-map'." (provide 'helm-occur) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-occur.el ends here diff --git a/elpa/helm-20210131.1946/helm-pkg.el b/elpa/helm-20210729.1510/helm-pkg.el similarity index 67% rename from elpa/helm-20210131.1946/helm-pkg.el rename to elpa/helm-20210729.1510/helm-pkg.el index 55e156f5..d2771b7e 100644 --- a/elpa/helm-20210131.1946/helm-pkg.el +++ b/elpa/helm-20210729.1510/helm-pkg.el @@ -1,9 +1,9 @@ -(define-package "helm" "20210131.1946" "Helm is an Emacs incremental and narrowing framework" +(define-package "helm" "20210729.1510" "Helm is an Emacs incremental and narrowing framework" '((emacs "25.1") (async "1.9.4") (popup "0.5.3") - (helm-core "3.6.5")) - :commit "7023ed51ee839806adb07537e23351326ce04fd2" :authors + (helm-core "3.8.0")) + :commit "1b6ffb10b8cabf177664a34827961520fba88ebe" :authors '(("Thierry Volpiatto" . "thierry.volpiatto@gmail.com")) :maintainer '("Thierry Volpiatto" . "thierry.volpiatto@gmail.com") diff --git a/elpa/helm-20210131.1946/helm-regexp.el b/elpa/helm-20210729.1510/helm-regexp.el similarity index 97% rename from elpa/helm-20210131.1946/helm-regexp.el rename to elpa/helm-20210729.1510/helm-regexp.el index 61c5c3ca..f5dd4543 100644 --- a/elpa/helm-20210131.1946/helm-regexp.el +++ b/elpa/helm-20210729.1510/helm-regexp.el @@ -129,10 +129,4 @@ i.e. don't replace inside a word, regexp is surrounded with \\bregexp\\b." (provide 'helm-regexp) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-regexp.el ends here diff --git a/elpa/helm-20210131.1946/helm-ring.el b/elpa/helm-20210729.1510/helm-ring.el similarity index 99% rename from elpa/helm-20210131.1946/helm-ring.el rename to elpa/helm-20210729.1510/helm-ring.el index fbe2fef0..aa44e4e5 100644 --- a/elpa/helm-20210131.1946/helm-ring.el +++ b/elpa/helm-20210729.1510/helm-ring.el @@ -191,7 +191,7 @@ yanked string." ;; Adding a `delete-selection' property ;; to `helm-kill-ring-action' is not working ;; because `this-command' will be `helm-maybe-exit-minibuffer', - ;; so use this workaround (Issue #1520). + ;; so use this workaround (Bug#1520). (when (and (region-active-p) delete-selection-mode) (delete-region (region-beginning) (region-end))) (if (not (eq (helm-get-attr 'last-command helm-source-kill-ring) 'yank)) @@ -438,7 +438,7 @@ This is a command for `helm-kill-ring-map'." 'kill-new 'append-to-register 'prepend-to-register))) - unless (null string-actions) ; Fix Issue #1107. + unless (null string-actions) ; Fix Bug#1107. collect (cons (format "Register %3s:\n %s" key (car string-actions)) (cons char (cdr string-actions))))) @@ -600,10 +600,4 @@ This command is useful when used with persistent action." (provide 'helm-ring) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-ring.el ends here diff --git a/elpa/helm-20210131.1946/helm-semantic.el b/elpa/helm-20210729.1510/helm-semantic.el similarity index 98% rename from elpa/helm-20210131.1946/helm-semantic.el rename to elpa/helm-20210729.1510/helm-semantic.el index 3c277ac6..07d15082 100644 --- a/elpa/helm-20210131.1946/helm-semantic.el +++ b/elpa/helm-20210729.1510/helm-semantic.el @@ -229,10 +229,4 @@ Fill in the symbol at point by default." (provide 'helm-semantic) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-semantic.el ends here diff --git a/elpa/helm-20210131.1946/helm-shell.el b/elpa/helm-20210729.1510/helm-shell.el similarity index 91% rename from elpa/helm-20210131.1946/helm-shell.el rename to elpa/helm-20210729.1510/helm-shell.el index 7be64aa3..ce707517 100644 --- a/elpa/helm-20210131.1946/helm-shell.el +++ b/elpa/helm-20210729.1510/helm-shell.el @@ -35,10 +35,4 @@ (provide 'helm-shell) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-shell ends here diff --git a/elpa/helm-20210131.1946/helm-sys.el b/elpa/helm-20210729.1510/helm-sys.el similarity index 98% rename from elpa/helm-20210131.1946/helm-sys.el rename to elpa/helm-20210729.1510/helm-sys.el index 250ef97b..d4ec6053 100644 --- a/elpa/helm-20210131.1946/helm-sys.el +++ b/elpa/helm-20210729.1510/helm-sys.el @@ -119,7 +119,7 @@ This affects also sorting functions in the same way." (when (and (helm--alive-p) (null no-update)) ;; Fix quitting while process is running ;; by binding `with-local-quit' in init function - ;; Issue #1521. + ;; Bug#1521. (helm-force-update (cl-ecase helm-top-poll-preselection (candidate (replace-regexp-in-string @@ -340,7 +340,7 @@ Show actions only on line starting by a PID." (interactive) (helm-top-set-mode-line "CPU") ;; Force sorting by CPU even if some versions of top are using by - ;; default CPU sorting (Issue #1908). + ;; default CPU sorting (Bug#1908). (setq helm-top-sort-fn 'helm-top-sort-by-cpu) (helm-update (helm-top--preselect-fn))) @@ -453,10 +453,4 @@ Show actions only on line starting by a PID." (provide 'helm-sys) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-sys.el ends here diff --git a/elpa/helm-20210131.1946/helm-tags.el b/elpa/helm-20210729.1510/helm-tags.el similarity index 99% rename from elpa/helm-20210131.1946/helm-tags.el rename to elpa/helm-20210729.1510/helm-tags.el index 6b18811e..47a2ad82 100644 --- a/elpa/helm-20210131.1946/helm-tags.el +++ b/elpa/helm-20210729.1510/helm-tags.el @@ -343,10 +343,4 @@ Create with etags shell command, or visit with `find-tag' or `visit-tags-table'. (provide 'helm-tags) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-tags.el ends here diff --git a/elpa/helm-20210131.1946/helm-types.el b/elpa/helm-20210729.1510/helm-types.el similarity index 90% rename from elpa/helm-20210131.1946/helm-types.el rename to elpa/helm-20210729.1510/helm-types.el index cef1c64c..3ec05d90 100644 --- a/elpa/helm-20210131.1946/helm-types.el +++ b/elpa/helm-20210729.1510/helm-types.el @@ -23,6 +23,7 @@ (require 'cl-lib) (require 'eieio) +(eval-when-compile (require 'helm-source)) (defvar helm-map) (defvar helm-mode-line-string) @@ -36,7 +37,7 @@ (defclass helm-type-file (helm-source) () "A class to define helm type file.") -(defmethod helm-source-get-action-from-type ((object helm-type-file)) +(cl-defmethod helm-source-get-action-from-type ((object helm-type-file)) (slot-value object 'action)) (defun helm-actions-from-type-file () @@ -75,7 +76,7 @@ (defcustom helm-type-file-actions (helm-make-actions - "Find file" 'helm-find-many-files + "Find file" 'helm-find-file-or-marked "Find file as root" 'helm-find-file-as-root "Find file other window" 'helm-find-files-other-window "Find file other frame" 'find-file-other-frame @@ -105,9 +106,9 @@ :group 'helm-files :type '(alist :key-type string :value-type function)) -(defmethod helm--setup-source :primary ((_source helm-type-file))) +(cl-defmethod helm--setup-source ((_source helm-type-file))) -(defmethod helm--setup-source :before ((source helm-type-file)) +(cl-defmethod helm--setup-source :before ((source helm-type-file)) (setf (slot-value source 'action) 'helm-type-file-actions) (setf (slot-value source 'persistent-help) "Show this file") (setf (slot-value source 'action-transformer) @@ -145,12 +146,12 @@ :type '(alist :key-type string :value-type function)) -(defmethod helm-source-get-action-from-type ((object helm-type-bookmark)) +(cl-defmethod helm-source-get-action-from-type ((object helm-type-bookmark)) (slot-value object 'action)) -(defmethod helm--setup-source :primary ((_source helm-type-bookmark))) +(cl-defmethod helm--setup-source ((_source helm-type-bookmark))) -(defmethod helm--setup-source :before ((source helm-type-bookmark)) +(cl-defmethod helm--setup-source :before ((source helm-type-bookmark)) (setf (slot-value source 'action) 'helm-type-bookmark-actions) (setf (slot-value source 'keymap) helm-bookmark-map) (setf (slot-value source 'mode-line) (list "Bookmark(s)" helm-mode-line-string)) @@ -200,18 +201,18 @@ :group 'helm-buffers :type '(alist :key-type string :value-type function)) -(defmethod helm-source-get-action-from-type ((object helm-type-buffer)) +(cl-defmethod helm-source-get-action-from-type ((object helm-type-buffer)) (slot-value object 'action)) -(defmethod helm--setup-source :primary ((_source helm-type-buffer))) +(cl-defmethod helm--setup-source ((_source helm-type-buffer))) -(defmethod helm--setup-source :before ((source helm-type-buffer)) +(cl-defmethod helm--setup-source :before ((source helm-type-buffer)) (setf (slot-value source 'action) 'helm-type-buffer-actions) (setf (slot-value source 'persistent-help) "Show this buffer") (setf (slot-value source 'mode-line) ;; Use default-value of `helm-mode-line-string' in case user ;; starts with a helm buffer as current-buffer otherwise the - ;; local value of this helm buffer is used (issues #1517,#2377). + ;; local value of this helm buffer is used (bug#1517, bug#2377). (list "Buffer(s)" (default-value 'helm-mode-line-string))) (setf (slot-value source 'filtered-candidate-transformer) '(helm-skip-boring-buffers @@ -241,7 +242,7 @@ ;; autoloaded (like untrace-function). :type '(alist :key-type string :value-type symbol)) -(defmethod helm-source-get-action-from-type ((object helm-type-function)) +(cl-defmethod helm-source-get-action-from-type ((object helm-type-function)) (slot-value object 'action)) (defun helm-actions-from-type-function () @@ -249,9 +250,9 @@ (helm--setup-source source) (helm-source-get-action-from-type source))) -(defmethod helm--setup-source :primary ((_source helm-type-function))) +(cl-defmethod helm--setup-source ((_source helm-type-function))) -(defmethod helm--setup-source :before ((source helm-type-function)) +(cl-defmethod helm--setup-source :before ((source helm-type-function)) (setf (slot-value source 'action) 'helm-type-function-actions) (setf (slot-value source 'action-transformer) 'helm-transform-function-call-interactively) @@ -278,9 +279,9 @@ :group 'helm-command :type '(alist :key-type string :value-type symbol)) -(defmethod helm--setup-source :primary ((_source helm-type-command))) +(cl-defmethod helm--setup-source ((_source helm-type-command))) -(defmethod helm--setup-source :before ((source helm-type-command)) +(cl-defmethod helm--setup-source :before ((source helm-type-command)) (setf (slot-value source 'action) 'helm-type-command-actions) (setf (slot-value source 'coerce) 'helm-symbolify) (setf (slot-value source 'persistent-action) 'helm-M-x-persistent-action) @@ -308,9 +309,9 @@ :group 'helm-elisp :type '(alist :key-type string :value-type function)) -(defmethod helm--setup-source :primary ((_source helm-type-timers))) +(cl-defmethod helm--setup-source ((_source helm-type-timers))) -(defmethod helm--setup-source :before ((source helm-type-timers)) +(cl-defmethod helm--setup-source :before ((source helm-type-timers)) (setf (slot-value source 'action) 'helm-type-timers-actions) (setf (slot-value source 'persistent-action) (lambda (tm) @@ -330,10 +331,4 @@ (provide 'helm-types) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-types.el ends here diff --git a/elpa/helm-20210131.1946/helm-utils.el b/elpa/helm-20210729.1510/helm-utils.el similarity index 99% rename from elpa/helm-20210131.1946/helm-utils.el rename to elpa/helm-20210729.1510/helm-utils.el index bb2e2904..ca3cd905 100644 --- a/elpa/helm-20210131.1946/helm-utils.el +++ b/elpa/helm-20210729.1510/helm-utils.el @@ -97,8 +97,7 @@ Possible value are: :group 'helm-utils :type 'integer) -(defcustom helm-sources-using-help-echo-popup '("Moccur" "Imenu in all buffers" - "Ack-Grep" "AG" "RG" "Gid" "Git-Grep") +(defcustom helm-sources-using-help-echo-popup '("Ack-Grep" "AG" "RG" "Gid" "Git-Grep") "Show the buffer name or the filename in a popup at selection." :group 'helm-utils :type '(repeat (choice string))) @@ -143,6 +142,7 @@ last position is added to the register `helm-save-pos-before-jump-register'.") ("¦" . 166) ;; ¦ ("§" . 167) ;; § ("¨" . 32) ;; SPC + (" " . 160) ;;   (non breaking space) ("©" . 169) ;; © ("ª" . 97) ;; a ("«" . 171) ;; « @@ -231,7 +231,8 @@ last position is added to the register `helm-save-pos-before-jump-register'.") ("®" . 174) ;; ® ("­" . 173)) ;; ­ - "Table of html character entities and values.") + "Table of html character entities and values. +See https://www.freeformatter.com/html-entities.html") (defvar helm-find-many-files-after-hook nil "Hook that runs at end of `helm-find-many-files'.") @@ -492,7 +493,7 @@ Default is `helm-current-buffer'." #'markdown-show-entry))) (hs-show-hook (list (lambda () (goto-char loc))))) ;; outline may fail in some conditions e.g. with markdown enabled - ;; (issue #1919). + ;; (Bug#1919). (condition-case-unless-debug nil (and fn (funcall fn)) (error nil)))) @@ -1148,10 +1149,4 @@ When unable to decode ENTITY returns nil." (provide 'helm-utils) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-utils.el ends here diff --git a/elpa/helm-20210131.1946/helm-x-files.el b/elpa/helm-20210729.1510/helm-x-files.el similarity index 95% rename from elpa/helm-20210131.1946/helm-x-files.el rename to elpa/helm-20210729.1510/helm-x-files.el index a1c97275..dad5876e 100644 --- a/elpa/helm-20210131.1946/helm-x-files.el +++ b/elpa/helm-20210729.1510/helm-x-files.el @@ -26,7 +26,7 @@ ;; ;; (defvar dired-buffers) -(defvar dired-re-no-dot) +(defvar directory-files-no-dot-files-regexp) (defun helm-files-in-all-dired-candidates () "Return a list of files from live `dired' buffers." (save-excursion @@ -34,7 +34,7 @@ when (buffer-live-p b) append (let ((dir (with-current-buffer b dired-directory))) (if (listp dir) (cdr dir) - (directory-files f t dired-re-no-dot)))))) + (directory-files f t directory-files-no-dot-files-regexp)))))) ;; (dired '("~/" "~/.emacs.d/.emacs-custom.el" "~/.emacs.d/.emacs.bmk")) @@ -124,10 +124,4 @@ with the tracker desktop search.") (provide 'helm-x-files) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - ;;; helm-x-files.el ends here -- 2.47.3