From 0bd2efac752c78b9df13f8293df18c4d5d89baae Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Tue, 22 Jan 2019 16:29:35 +0100 Subject: [PATCH] Update helm. Signed-off-by: Andreas Gerler --- bba.org | 2 +- .../emacs-helm.sh | 0 .../helm-adaptive.el | 0 .../helm-autoloads.el | 2 +- .../helm-bookmark.el | 2 +- .../helm-buffers.el | 6 +- .../helm-color.el | 0 .../helm-command.el | 0 .../helm-config.el | 0 .../helm-dabbrev.el | 8 +- .../helm-easymenu.el | 0 .../helm-elisp-package.el | 4 +- .../helm-elisp.el | 0 .../helm-eshell.el | 0 .../helm-eval.el | 6 +- .../helm-external.el | 2 +- .../helm-files.el | 85 ++++--- .../helm-find.el | 9 +- .../helm-font.el | 0 .../helm-for-files.el | 0 .../helm-grep.el | 12 +- .../helm-help.el | 26 +- .../helm-id-utils.el | 2 +- .../helm-imenu.el | 2 +- .../helm-info.el | 1 + .../helm-locate.el | 42 +--- .../helm-man.el | 0 .../helm-misc.el | 2 +- .../helm-mode.el | 42 +++- .../helm-net.el | 4 +- .../helm-org.el | 0 .../helm-pkg.el | 2 +- .../helm-regexp.el | 3 +- .../helm-ring.el | 11 +- .../helm-semantic.el | 2 +- .../helm-sys.el | 0 .../helm-tags.el | 0 .../helm-types.el | 31 +++ .../helm-utils.el | 30 ++- .../helm-x-files.el | 0 .../helm-core-autoloads.el | 0 .../helm-core-pkg.el | 2 +- .../helm-lib.el | 19 +- .../helm-multi-match.el | 0 .../helm-source.el | 0 .../helm.el | 225 +++++++++++++----- 46 files changed, 391 insertions(+), 193 deletions(-) rename elpa/{helm-20181110.1615 => helm-20190122.549}/emacs-helm.sh (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-adaptive.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-autoloads.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-bookmark.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-buffers.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-color.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-command.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-config.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-dabbrev.el (98%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-easymenu.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-elisp-package.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-elisp.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-eshell.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-eval.el (98%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-external.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-files.el (98%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-find.el (96%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-font.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-for-files.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-grep.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-help.el (98%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-id-utils.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-imenu.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-info.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-locate.el (91%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-man.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-misc.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-mode.el (97%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-net.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-org.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-pkg.el (65%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-regexp.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-ring.el (98%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-semantic.el (99%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-sys.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-tags.el (100%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-types.el (86%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-utils.el (97%) rename elpa/{helm-20181110.1615 => helm-20190122.549}/helm-x-files.el (100%) rename elpa/{helm-core-20181110.1635 => helm-core-20190122.549}/helm-core-autoloads.el (100%) rename elpa/{helm-core-20181110.1635 => helm-core-20190122.549}/helm-core-pkg.el (64%) rename elpa/{helm-core-20181110.1635 => helm-core-20190122.549}/helm-lib.el (98%) rename elpa/{helm-core-20181110.1635 => helm-core-20190122.549}/helm-multi-match.el (100%) rename elpa/{helm-core-20181110.1635 => helm-core-20190122.549}/helm-source.el (100%) rename elpa/{helm-core-20181110.1635 => helm-core-20190122.549}/helm.el (97%) diff --git a/bba.org b/bba.org index a4ff0db3..de0c909d 100644 --- a/bba.org +++ b/bba.org @@ -3347,7 +3347,7 @@ Some links you might check out: (if (>= emacs-major-version 24) (progn (add-to-list 'load-path - "~/.emacs.d/elpa/helm-20181029.623") + "~/.emacs.d/elpa/helm-20190122.549") (require 'helm) (helm-mode 1) (global-set-key (kbd "M-y") 'helm-show-kill-ring) diff --git a/elpa/helm-20181110.1615/emacs-helm.sh b/elpa/helm-20190122.549/emacs-helm.sh similarity index 100% rename from elpa/helm-20181110.1615/emacs-helm.sh rename to elpa/helm-20190122.549/emacs-helm.sh diff --git a/elpa/helm-20181110.1615/helm-adaptive.el b/elpa/helm-20190122.549/helm-adaptive.el similarity index 100% rename from elpa/helm-20181110.1615/helm-adaptive.el rename to elpa/helm-20190122.549/helm-adaptive.el diff --git a/elpa/helm-20181110.1615/helm-autoloads.el b/elpa/helm-20190122.549/helm-autoloads.el similarity index 99% rename from elpa/helm-20181110.1615/helm-autoloads.el rename to elpa/helm-20190122.549/helm-autoloads.el index 6e4a3959..bd3b0498 100644 --- a/elpa/helm-20181110.1615/helm-autoloads.el +++ b/elpa/helm-20190122.549/helm-autoloads.el @@ -238,7 +238,7 @@ Preconfigured helm for `helm-source-evaluation-result'. \(fn ARG)" t nil) (autoload 'helm-eval-expression-with-eldoc "helm-eval" "\ -Preconfigured helm for `helm-source-evaluation-result' with `eldoc' support. +Preconfigured helm for `helm-source-evaluation-result' with `eldoc' support. \(fn)" t nil) diff --git a/elpa/helm-20181110.1615/helm-bookmark.el b/elpa/helm-20190122.549/helm-bookmark.el similarity index 99% rename from elpa/helm-20181110.1615/helm-bookmark.el rename to elpa/helm-20190122.549/helm-bookmark.el index 0c7af085..f36fffea 100644 --- a/elpa/helm-20181110.1615/helm-bookmark.el +++ b/elpa/helm-20190122.549/helm-bookmark.el @@ -245,7 +245,7 @@ BOOKMARK is a bookmark name or a bookmark record." BOOKMARK is a bookmark name or a bookmark record. This excludes bookmarks of a more specific kind (Info, Gnus, and W3m)." (let* ((filename (bookmark-get-filename bookmark)) - (isnonfile (equal filename helm-bookmark--non-file-filename))) + (isnonfile (equal filename helm-bookmark--non-file-filename))) (and filename (not isnonfile) (not (bookmark-get-handler bookmark))))) (defun helm-bookmark-org-file-p (bookmark) diff --git a/elpa/helm-20181110.1615/helm-buffers.el b/elpa/helm-20190122.549/helm-buffers.el similarity index 99% rename from elpa/helm-20181110.1615/helm-buffers.el rename to elpa/helm-20190122.549/helm-buffers.el index 65f37359..2ed8dd37 100644 --- a/elpa/helm-20181110.1615/helm-buffers.el +++ b/elpa/helm-20190122.549/helm-buffers.el @@ -711,7 +711,11 @@ If REGEXP-FLAG is given use `query-replace-regexp'." (helm-aif (get-buffer-window "*Diff*" 'visible) (progn (kill-buffer "*Diff*") (set-window-buffer it helm-current-buffer)) - (diff-buffer-with-file (get-buffer candidate)))) + (let ((buf (get-buffer candidate))) + (if (buffer-file-name buf) + (diff-buffer-with-file buf) + (user-error "Buffer `%s' is not associated to a file" + (buffer-name buf)))))) (defun helm-buffer-diff-persistent () "Toggle diff buffer without quitting helm." diff --git a/elpa/helm-20181110.1615/helm-color.el b/elpa/helm-20190122.549/helm-color.el similarity index 100% rename from elpa/helm-20181110.1615/helm-color.el rename to elpa/helm-20190122.549/helm-color.el diff --git a/elpa/helm-20181110.1615/helm-command.el b/elpa/helm-20190122.549/helm-command.el similarity index 100% rename from elpa/helm-20181110.1615/helm-command.el rename to elpa/helm-20190122.549/helm-command.el diff --git a/elpa/helm-20181110.1615/helm-config.el b/elpa/helm-20190122.549/helm-config.el similarity index 100% rename from elpa/helm-20181110.1615/helm-config.el rename to elpa/helm-20190122.549/helm-config.el diff --git a/elpa/helm-20181110.1615/helm-dabbrev.el b/elpa/helm-20190122.549/helm-dabbrev.el similarity index 98% rename from elpa/helm-20181110.1615/helm-dabbrev.el rename to elpa/helm-20190122.549/helm-dabbrev.el index 33617a36..2cb0e6ee 100644 --- a/elpa/helm-20181110.1615/helm-dabbrev.el +++ b/elpa/helm-20190122.549/helm-dabbrev.el @@ -60,7 +60,7 @@ When nil all buffers are considered related to `current-buffer'." :group 'helm-dabbrev :type 'function) -(defcustom helm-dabbrev-major-mode-assoc nil +(defcustom helm-dabbrev-major-mode-assoc nil "Major mode association alist. This allow helm-dabbrev searching in buffers with the associated `major-mode'. e.g \(emacs-lisp-mode . lisp-interaction-mode\) @@ -118,7 +118,7 @@ to use this." (defvaralias 'helm-dabbrev--regexp 'helm-dabbrev-separator-regexp) (make-obsolete-variable 'helm-dabbrev--regexp 'helm-dabbrev-separator-regexp "2.8.3") -;; Check for beginning of line should happen last (^\n\\|^). +;; Check for beginning of line should happen last (^\n\\|^). (defvar helm-dabbrev-separator-regexp "\\s-\\|\t\\|[(\\[\\{\"'`=<$;,@.#+]\\|\\s\\\\|^\n\\|^" "Regexp matching the start of a dabbrev candidate.") @@ -222,7 +222,7 @@ The search starts at (1- BEG) with a regexp starting with regexp matching syntactically any word or symbol. The possible false positives matching SEP-REGEXP at end are finally removed." - (let ((eol (point-at-eol))) + (let ((eol (point-at-eol))) (save-excursion (goto-char (1- beg)) (when (re-search-forward @@ -353,7 +353,7 @@ removed." (thread-alive-p helm-dabbrev--current-thread)) (thread-join helm-dabbrev--current-thread)) (when (and (null cycling-disabled-p) only-one) - (cl-return-from helm-dabbrev + (cl-return-from helm-dabbrev (message "[Helm-dabbrev: No expansion found]"))) (with-helm-show-completion (car limits) (cdr limits) (unwind-protect diff --git a/elpa/helm-20181110.1615/helm-easymenu.el b/elpa/helm-20190122.549/helm-easymenu.el similarity index 100% rename from elpa/helm-20181110.1615/helm-easymenu.el rename to elpa/helm-20190122.549/helm-easymenu.el diff --git a/elpa/helm-20181110.1615/helm-elisp-package.el b/elpa/helm-20190122.549/helm-elisp-package.el similarity index 99% rename from elpa/helm-20181110.1615/helm-elisp-package.el rename to elpa/helm-20190122.549/helm-elisp-package.el index be0de6b4..e5daff82 100644 --- a/elpa/helm-20181110.1615/helm-elisp-package.el +++ b/elpa/helm-20190122.549/helm-elisp-package.el @@ -69,7 +69,7 @@ ;; properly (empty buffer) when called from lisp ;; with 'no-fetch (emacs-25 WA). (package-show-package-list) - (when helm--force-updating-p (message "Refreshing packages list...")) + (when helm--force-updating-p (message "Refreshing packages list...")) (list-packages helm-el-package--initialized-p)) (setq helm-el-package--initialized-p t) (message nil)) @@ -404,7 +404,7 @@ (defun helm-el-package-recompile (_pkg) (cl-loop for p in (helm-marked-candidates) for pkg-desc = (get-text-property 0 'tabulated-list-id p) - for name = (package-desc-name pkg-desc) + for name = (package-desc-name pkg-desc) for dir = (package-desc-dir pkg-desc) do (if (fboundp 'async-byte-recompile-directory) (async-byte-recompile-directory dir) diff --git a/elpa/helm-20181110.1615/helm-elisp.el b/elpa/helm-20190122.549/helm-elisp.el similarity index 100% rename from elpa/helm-20181110.1615/helm-elisp.el rename to elpa/helm-20190122.549/helm-elisp.el diff --git a/elpa/helm-20181110.1615/helm-eshell.el b/elpa/helm-20190122.549/helm-eshell.el similarity index 100% rename from elpa/helm-20181110.1615/helm-eshell.el rename to elpa/helm-20190122.549/helm-eshell.el diff --git a/elpa/helm-20181110.1615/helm-eval.el b/elpa/helm-20190122.549/helm-eval.el similarity index 98% rename from elpa/helm-20181110.1615/helm-eval.el rename to elpa/helm-20190122.549/helm-eval.el index 06ffd081..f1844cf5 100644 --- a/elpa/helm-20181110.1615/helm-eval.el +++ b/elpa/helm-20190122.549/helm-eval.el @@ -48,9 +48,9 @@ Should take one arg: the string to display." (cl-loop for (f . a) in '((eldoc-current-symbol . elisp--current-symbol) (eldoc-fnsym-in-current-sexp . - elisp--fnsym-in-current-sexp) + elisp--fnsym-in-current-sexp) (eldoc-get-fnsym-args-string . - elisp-get-fnsym-args-string) + elisp-get-fnsym-args-string) (eldoc-get-var-docstring . elisp-get-var-docstring)) unless (fboundp f) @@ -173,7 +173,7 @@ Should take one arg: the string to display." (defvar eldoc-idle-delay) ;;;###autoload (defun helm-eval-expression-with-eldoc () - "Preconfigured helm for `helm-source-evaluation-result' with `eldoc' support. " + "Preconfigured helm for `helm-source-evaluation-result' with `eldoc' support." (interactive) (let ((timer (run-with-idle-timer eldoc-idle-delay 'repeat diff --git a/elpa/helm-20181110.1615/helm-external.el b/elpa/helm-20190122.549/helm-external.el similarity index 99% rename from elpa/helm-20181110.1615/helm-external.el rename to elpa/helm-20190122.549/helm-external.el index 5c9015ca..0238f4b0 100644 --- a/elpa/helm-20181110.1615/helm-external.el +++ b/elpa/helm-20190122.549/helm-external.el @@ -24,7 +24,7 @@ (defgroup helm-external nil - "External related Applications and libraries for Helm." + "External related Applications and libraries for Helm." :group 'helm) (defcustom helm-raise-command nil diff --git a/elpa/helm-20181110.1615/helm-files.el b/elpa/helm-20190122.549/helm-files.el similarity index 98% rename from elpa/helm-20181110.1615/helm-files.el rename to elpa/helm-20190122.549/helm-files.el index 18e16d0b..a3b1ac4e 100644 --- a/elpa/helm-20181110.1615/helm-files.el +++ b/elpa/helm-20190122.549/helm-files.el @@ -631,7 +631,7 @@ Don't set it directly, use instead `helm-ff-auto-update-initial-value'.") (if (eq helm-ff-delete-files-function 'helm-delete-marked-files-async) " async" ""))) - 'helm-delete-marked-files + 'helm-ff-delete-files "Touch File(s) `M-T'" 'helm-ff-touch-files "Copy file(s) `M-C, C-u to follow'" 'helm-find-files-copy "Rename file(s) `M-R, C-u to follow'" 'helm-find-files-rename @@ -1468,11 +1468,9 @@ This doesn't replace inside the files, only modify filenames." See `helm-ff-RET' for details. If MUST-MATCH is specified exit with `helm-confirm-and-exit-minibuffer' which handle must-match mechanism." - (let* ((cands (helm-marked-candidates)) - (sel (car cands))) + (let ((sel (helm-get-selection))) (cl-assert sel nil "Trying to exit with no candidates") - (if (and (not (cdr cands)) - (file-directory-p sel) + (if (and (file-directory-p sel) (not (string= "." (helm-basename sel)))) (helm-execute-persistent-action) (if must-match @@ -1486,10 +1484,10 @@ Behave differently depending of `helm-selection': - candidate basename is \".\" => open it in dired. - candidate is a directory => expand it. -- candidate is a file => open it. -- marked candidates (1+) => open them with default action." +- candidate is a file => open it." (interactive) (helm-ff-RET-1)) +(put 'helm-ff-RET 'helm-only t) (defun helm-ff-RET-must-match () "Same as `helm-ff-RET' but used in must-match map." @@ -2394,6 +2392,22 @@ purpose." ((and dir-p helm-ff-auto-update-flag) (helm-ff-directory-files path)) (t (append (unless (or require-match + ;; Check here if path is an existing + ;; file before adding it to + ;; candidates, it was previously done + ;; in the sort function but this + ;; create a bug with remote files + ;; when path is at the same time a + ;; pattern matching a candidate and a + ;; real candidate e.g. ack and + ;; ack-grep in /usr/bin. This is due + ;; presumably to a latency more + ;; important with remote files which + ;; lead to a confusion with the + ;; pattern matching one candidate and + ;; the real candidate which is same + ;; as pattern. + (file-exists-p path) ;; When `helm-ff-auto-update-flag' has been ;; disabled, whe don't want PATH to be added on top ;; if it is a directory. @@ -2765,27 +2779,23 @@ Return candidates prefixed with basename of INPUT first." (string-match "\\`\\$" input) (null candidates)) candidates - (let* ((c1 (car candidates)) - (cand1real (if (consp c1) (cdr c1) c1)) - (cand1 (unless (file-exists-p cand1real) c1)) - (rest-cand (if cand1 (cdr candidates) candidates)) - (memo-src (make-hash-table :test 'equal)) - (all (sort rest-cand - (lambda (s1 s2) - (let* ((score (lambda (str) - (helm-ff-score-candidate-for-pattern - str (helm-basename input)))) - (bn1 (helm-basename (if (consp s1) (cdr s1) s1))) - (bn2 (helm-basename (if (consp s2) (cdr s2) s2))) - (sc1 (or (gethash bn1 memo-src) - (puthash bn1 (funcall score bn1) memo-src))) - (sc2 (or (gethash bn2 memo-src) - (puthash bn2 (funcall score bn2) memo-src)))) - (cond ((= sc1 sc2) - (< (string-width bn1) - (string-width bn2))) - ((> sc1 sc2)))))))) - (if cand1 (cons cand1 all) all)))) + (let* ((memo-src (make-hash-table :test 'equal)) + (all (sort candidates + (lambda (s1 s2) + (let* ((score (lambda (str) + (helm-ff-score-candidate-for-pattern + str (helm-basename input)))) + (bn1 (helm-basename (if (consp s1) (cdr s1) s1))) + (bn2 (helm-basename (if (consp s2) (cdr s2) s2))) + (sc1 (or (gethash bn1 memo-src) + (puthash bn1 (funcall score bn1) memo-src))) + (sc2 (or (gethash bn2 memo-src) + (puthash bn2 (funcall score bn2) memo-src)))) + (cond ((= sc1 sc2) + (< (string-width bn1) + (string-width bn2))) + ((> sc1 sc2)))))))) + all))) (defun helm-ff-sort-candidates (candidates _source) "Sort function for `helm-source-find-files'. @@ -3213,13 +3223,14 @@ If a prefix arg is given or `helm-follow-mode' is on open file." ;; A symlink file, expand to it's true name. (first hit) ((and (file-symlink-p candidate) (not current-prefix-arg) (not follow)) (cons (lambda (_candidate) - (funcall insert-in-minibuffer (file-truename candidate))) + (funcall insert-in-minibuffer (file-truename candidate)) + (helm-check-minibuffer-input)) ; Force update. 'never-split)) ;; A regular file, expand it, (first hit) ((and (>= num-lines-buf 3) (not current-prefix-arg) (not follow)) (cons (lambda (_candidate) - (setq helm-pattern "") ; Force update. - (funcall insert-in-minibuffer new-pattern)) + (funcall insert-in-minibuffer new-pattern) + (helm-check-minibuffer-input)) ; Force update. 'never-split)) ;; An image file and it is the second hit on C-j, ;; show the file in `image-dired'. @@ -3410,11 +3421,11 @@ prefix arg, one prefix arg or two prefix arg." (abbreviate-file-name candidate)) (t (file-relative-name candidate))) (delete-region beg end)) - (cond ((equal helm-current-prefix-arg '(4)) - (abbreviate-file-name candidate)) - ((equal helm-current-prefix-arg '(16)) - (file-relative-name candidate)) - (t candidate)))) + (helm-acase helm-current-prefix-arg + ('(4) (abbreviate-file-name candidate)) + ('(16) (file-relative-name candidate)) + ('(64) (helm-basename candidate)) + (t candidate)))) (cl-defun helm-find-files-history (arg &key (comp-read t)) "The `helm-find-files' history. @@ -3588,7 +3599,7 @@ is helm-source-find-files." ;; "/", e.g. at a beginning of a patch (first bug) and make ;; `file-remote-p' returning an error (second bug), so in such ;; case returns the region itself instead of the region - ;; corrupted by ffap. + ;; corrupted by ffap. (if (and str ffap) str ffap))))) (defun helm-find-files-input (file-at-pt thing-at-pt) diff --git a/elpa/helm-20181110.1615/helm-find.el b/elpa/helm-20190122.549/helm-find.el similarity index 96% rename from elpa/helm-20181110.1615/helm-find.el rename to elpa/helm-20190122.549/helm-find.el index 196366c6..80b3ecc6 100644 --- a/elpa/helm-20181110.1615/helm-find.el +++ b/elpa/helm-20190122.549/helm-find.el @@ -31,6 +31,12 @@ I.e use the -path/ipath arguments of find instead of -name/iname." :group 'helm-files :type 'boolean) +(defvar helm-find-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-generic-files-map) + (define-key map (kbd "DEL") 'helm-delete-backward-no-update) + map)) + (defvar helm-source-findutils (helm-build-async-source "Find" :header-name (lambda (name) @@ -40,7 +46,8 @@ I.e use the -path/ipath arguments of find instead of -name/iname." :action-transformer 'helm-transform-file-load-el :persistent-action 'helm-ff-kill-or-find-buffer-fname :action 'helm-type-file-actions - :keymap helm-generic-files-map + :help-message 'helm-generic-file-help-message + :keymap helm-find-map :candidate-number-limit 9999 :requires-pattern 3)) diff --git a/elpa/helm-20181110.1615/helm-font.el b/elpa/helm-20190122.549/helm-font.el similarity index 100% rename from elpa/helm-20181110.1615/helm-font.el rename to elpa/helm-20190122.549/helm-font.el diff --git a/elpa/helm-20181110.1615/helm-for-files.el b/elpa/helm-20190122.549/helm-for-files.el similarity index 100% rename from elpa/helm-20181110.1615/helm-for-files.el rename to elpa/helm-20190122.549/helm-for-files.el diff --git a/elpa/helm-20181110.1615/helm-grep.el b/elpa/helm-20190122.549/helm-grep.el similarity index 99% rename from elpa/helm-20181110.1615/helm-grep.el rename to elpa/helm-20190122.549/helm-grep.el index 24451bd1..57217873 100644 --- a/elpa/helm-20181110.1615/helm-grep.el +++ b/elpa/helm-20190122.549/helm-grep.el @@ -237,6 +237,12 @@ You probably don't need to use this unless you know what you are doing." :group 'helm-grep :type 'string) +(defcustom helm-grep-input-idle-delay 0.6 + "Same as `helm-input-idle-delay' but for grep commands. +It have a higher value than `helm-input-idle-delay' to avoid +flickering when updating." + :group 'helm-grep + :type 'integer) ;;; Faces ;; @@ -287,6 +293,7 @@ Have no effect when grep backend use \"--color=\"." (define-key map (kbd "C-c o") 'helm-grep-run-other-window-action) (define-key map (kbd "C-c C-o") 'helm-grep-run-other-frame-action) (define-key map (kbd "C-x C-s") 'helm-grep-run-save-buffer) + (define-key map (kbd "DEL") 'helm-delete-backward-no-update) (when helm-grep-use-ioccur-style-keys (define-key map (kbd "") 'helm-execute-persistent-action) (define-key map (kbd "") 'helm-grep-run-default-action)) @@ -298,6 +305,7 @@ Have no effect when grep backend use \"--color=\"." (set-keymap-parent map helm-map) (define-key map (kbd "M-") 'helm-goto-next-file) (define-key map (kbd "M-") 'helm-goto-precedent-file) + (define-key map (kbd "DEL") 'helm-delete-backward-no-update) map) "Keymap used in pdfgrep.") @@ -1105,6 +1113,7 @@ in recurse, and ignore EXTS, search being made recursively on files matching 'helm-grep-in-recurse recurse 'helm-grep-use-zgrep (eq backend 'zgrep) 'helm-grep-default-command com + 'helm-input-idle-delay helm-grep-input-idle-delay 'default-directory helm-ff-default-directory) ;; [1] ;; Setup the source. (set source (helm-make-source src-name 'helm-grep-class @@ -1228,7 +1237,7 @@ in recurse, and ignore EXTS, search being made recursively on files matching (> (- (setq end (match-end 0)) (setq beg (match-beginning 0))) 0)) (helm-add-face-text-properties beg end 'helm-grep-match)) - do (goto-char (point-min))) + do (goto-char (point-min))) (buffer-string)) (error nil)))) @@ -1551,6 +1560,7 @@ if available with current AG version." name (abbreviate-file-name directory))) :candidates-process (lambda () (helm-grep-ag-init directory type)))) + (helm-set-local-variable 'helm-input-idle-delay helm-grep-input-idle-delay) (helm :sources 'helm-source-grep-ag :keymap helm-grep-map :history 'helm-grep-ag-history diff --git a/elpa/helm-20181110.1615/helm-help.el b/elpa/helm-20190122.549/helm-help.el similarity index 98% rename from elpa/helm-20181110.1615/helm-help.el rename to elpa/helm-20190122.549/helm-help.el index 935ddba8..39ae6972 100644 --- a/elpa/helm-20181110.1615/helm-help.el +++ b/elpa/helm-20190122.549/helm-help.el @@ -243,10 +243,17 @@ The tree is reinitialized each time you browse a new tree with It behaves differently depending on `helm-selection' (current candidate in helm-buffer): -- candidate basename is \".\" => Open it in dired. +- candidate basename is \".\" => Open it in dired. - candidate is a directory => Expand it. - candidate is a file => Open it. -- marked candidates (1+) => Open them with default action. + +If you have marked candidates and you press RET on a directory, +helm will navigate to this directory, if you want to exit with +RET with default action with these marked candidates, press RET +on a second time while you are on the root of this directory +e.g. \"/home/you/dir/.\" or press RET on any file which is not a +directory. You can also exit with default action at any moment +with `f1'. Note that when copying, renaming, etc. from `helm-find-files' the destination file is selected with `helm-read-file-name'. @@ -377,7 +384,7 @@ Same but the cache is refreshed. **** You can start a recursive search with \"locate\" or \"find\" -See \"Note\" in the [[Recusive completion on subdirectories][section on subdirectories]]. +See \"Note\" in the [[Recursive completion on subdirectories][section on subdirectories]]. Using \"locate\", you can enable the local database with a prefix argument. If the local database doesn't already exists, you will be prompted for its creation. @@ -422,6 +429,7 @@ On insertion (not on completion, i.e. there is nothing at point): - `\\[helm-ff-run-complete-fn-at-point]': insert absolute file name. - `\\[universal-argument] \\[helm-ff-run-complete-fn-at-point]': insert abbreviated file name. - `\\[universal-argument] \\[universal-argument] \\[helm-ff-run-complete-fn-at-point]': insert relative file name. +- `\\[universal-argument] \\[universal-argument] \\[universal-argument] \\[helm-ff-run-complete-fn-at-point]': insert basename. On completion: @@ -504,7 +512,7 @@ are available as`%u', `%d' and `%c' respectively. ***** Recursively rename all files with \".JPG\" extension to \".jpg\" -Use the `helm-file-globstar' feature described in [[Using wildcard to select multiple files][recursive globbing]] +Use the `helm-file-globstar' feature described in [[Use the wildcard to select multiple files][recursive globbing]] by entering \"**.JPG\" at the end of the Helm-find-files pattern, then hit \\\\[helm-ff-query-replace-on-filenames]: First \"JPG\", then \"jpg\" and hit `RET'. @@ -603,7 +611,7 @@ the current directory. As such, using \"\\#\" to serial-rename files only makes sense for files inside the same directory. It even keeps renaming files with an incremental number in the next directories. -*** Serial-rename +*** Serial renaming You can use the serial-rename actions to rename, copy or symlink marked files to a specific directory or in the current directory with all the files numbered @@ -752,7 +760,7 @@ For this you can use `helm-list-dir-external' as value for `helm-list-directory-function'. See `helm-list-directory-function' documentation for more infos. - + **** Completing host As soon as you enter the first \":\" after method e.g =/scp:= you will @@ -949,13 +957,13 @@ with trash-list until you log in as root. (let ((name (if helm-alive-p (assoc-default 'name (helm-get-current-source)) "generic"))) - (format + (format "* Helm `%s' read file name completion This is `%s' read file name completion that have been \"helmized\" because you have enabled [[Helm mode][helm-mode]]'. Don't confuse this with `helm-find-files' which is a native helm command, -see [[Helm functions vs helmized emacs functions]]. +see [[Helm functions vs helmized Emacs functions]]. ** Tips @@ -1145,7 +1153,7 @@ M-x helm-popup-tip-mode. The command \\\\[helm-grep-run-other-window-action] allow you to open file in other window horizontally or vertically if a prefix arg is supplied. - + *** Performance over TRAMP Grepping works but it is badly supported as TRAMP doesn't support multiple diff --git a/elpa/helm-20181110.1615/helm-id-utils.el b/elpa/helm-20190122.549/helm-id-utils.el similarity index 99% rename from elpa/helm-20181110.1615/helm-id-utils.el rename to elpa/helm-20190122.549/helm-id-utils.el index b01aea54..b3f564a8 100644 --- a/elpa/helm-20181110.1615/helm-id-utils.el +++ b/elpa/helm-20190122.549/helm-id-utils.el @@ -61,7 +61,7 @@ MacPorts to install id-utils, it should be `gid32'." '(" " mode-line-buffer-identification " " (:eval (format "L%s" (helm-candidate-number-at-point))) " " (:eval (propertize - (format "[Helm Gid process finished - (%s results)]" + (format "[Helm Gid process finished - (%s results)]" (max (1- (count-lines (point-min) (point-max))) 0)) diff --git a/elpa/helm-20181110.1615/helm-imenu.el b/elpa/helm-20190122.549/helm-imenu.el similarity index 99% rename from elpa/helm-20181110.1615/helm-imenu.el rename to elpa/helm-20190122.549/helm-imenu.el index 6ebac9e3..4493e366 100644 --- a/elpa/helm-20181110.1615/helm-imenu.el +++ b/elpa/helm-20190122.549/helm-imenu.el @@ -203,7 +203,7 @@ Each car is a regexp match pattern of the imenu type string." helm-cached-imenu-candidates (setq imenu--index-alist nil) (prog1 (setq helm-cached-imenu-candidates - (let ((index (imenu--make-index-alist t))) + (let ((index (imenu--make-index-alist t))) (helm-imenu--candidates-1 (delete (assoc "*Rescan*" index) index)))) (setq helm-cached-imenu-tick tick)))))) diff --git a/elpa/helm-20181110.1615/helm-info.el b/elpa/helm-20190122.549/helm-info.el similarity index 99% rename from elpa/helm-20181110.1615/helm-info.el rename to elpa/helm-20190122.549/helm-info.el index b5216c41..60c57c94 100644 --- a/elpa/helm-20181110.1615/helm-info.el +++ b/elpa/helm-20190122.549/helm-info.el @@ -149,6 +149,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) (let ((files (cl-loop for d in (or Info-directory-list Info-default-directory-list) when (file-directory-p d) diff --git a/elpa/helm-20181110.1615/helm-locate.el b/elpa/helm-20190122.549/helm-locate.el similarity index 91% rename from elpa/helm-20181110.1615/helm-locate.el rename to elpa/helm-20190122.549/helm-locate.el index a6793b47..a7ce7417 100644 --- a/elpa/helm-20181110.1615/helm-locate.el +++ b/elpa/helm-20190122.549/helm-locate.el @@ -127,37 +127,11 @@ help for more infos." :group 'helm-files) -(defvar helm-generic-files-map +(defvar helm-locate-map (let ((map (make-sparse-keymap))) - (set-keymap-parent map helm-map) - (define-key map (kbd "C-]") 'helm-ff-run-toggle-basename) - (define-key map (kbd "C-s") 'helm-ff-run-grep) - (define-key map (kbd "M-g s") 'helm-ff-run-grep) - (define-key map (kbd "M-g z") 'helm-ff-run-zgrep) - (define-key map (kbd "M-g p") 'helm-ff-run-pdfgrep) - (define-key map (kbd "C-c g") 'helm-ff-run-gid) - (define-key map (kbd "M-R") 'helm-ff-run-rename-file) - (define-key map (kbd "M-C") 'helm-ff-run-copy-file) - (define-key map (kbd "M-B") 'helm-ff-run-byte-compile-file) - (define-key map (kbd "M-L") 'helm-ff-run-load-file) - (define-key map (kbd "M-S") 'helm-ff-run-symlink-file) - (define-key map (kbd "M-H") 'helm-ff-run-hardlink-file) - (define-key map (kbd "M-D") 'helm-ff-run-delete-file) - (define-key map (kbd "C-=") 'helm-ff-run-ediff-file) - (define-key map (kbd "C-c =") 'helm-ff-run-ediff-merge-file) - (define-key map (kbd "C-c o") 'helm-ff-run-switch-other-window) - (define-key map (kbd "C-c r") 'helm-ff-run-find-file-as-root) - (define-key map (kbd "C-c C-o") 'helm-ff-run-switch-other-frame) - (define-key map (kbd "M-i") 'helm-ff-properties-persistent) - (define-key map (kbd "C-c C-x") 'helm-ff-run-open-file-externally) - (define-key map (kbd "C-c X") 'helm-ff-run-open-file-with-default-tool) - (define-key map (kbd "M-.") 'helm-ff-run-etags) - (define-key map (kbd "C-c @") 'helm-ff-run-insert-org-link) - (define-key map (kbd "C-x C-q") 'helm-ff-run-marked-files-in-dired) - (define-key map (kbd "C-c C-a") 'helm-ff-run-mail-attach-files) - map) - "Generic Keymap for files.") - + (set-keymap-parent map helm-generic-files-map) + (define-key map (kbd "DEL") 'helm-delete-backward-no-update) + map)) (defface helm-locate-finish '((t (:foreground "Green"))) @@ -355,7 +329,9 @@ See also `helm-locate'." Sort is done on basename of CANDIDATES." (helm-fuzzy-matching-default-sort-fn-1 candidates nil t)) -(defclass helm-locate-source (helm-source-async helm-type-file) +(defclass helm-locate-override-inheritor (helm-type-file) ()) + +(defclass helm-locate-source (helm-source-async helm-locate-override-inheritor) ((init :initform 'helm-locate-initial-setup) (candidates-process :initform 'helm-locate-init) (requires-pattern :initform 3) @@ -365,6 +341,10 @@ Sort is done on basename of CANDIDATES." (redisplay :initform (progn helm-locate-fuzzy-sort-fn)) (group :initform 'helm-locate))) +;; Override helm-type-file class keymap. +(defmethod helm--setup-source :after ((source helm-locate-override-inheritor)) + (setf (slot-value source 'keymap) helm-locate-map)) + (defvar helm-source-locate (helm-make-source "Locate" 'helm-locate-source :pattern-transformer 'helm-locate-pattern-transformer diff --git a/elpa/helm-20181110.1615/helm-man.el b/elpa/helm-20190122.549/helm-man.el similarity index 100% rename from elpa/helm-20181110.1615/helm-man.el rename to elpa/helm-20190122.549/helm-man.el diff --git a/elpa/helm-20181110.1615/helm-misc.el b/elpa/helm-20190122.549/helm-misc.el similarity index 99% rename from elpa/helm-20181110.1615/helm-misc.el rename to elpa/helm-20190122.549/helm-misc.el index 971650bf..9701e4e2 100644 --- a/elpa/helm-20181110.1615/helm-misc.el +++ b/elpa/helm-20190122.549/helm-misc.el @@ -136,7 +136,7 @@ (cl-loop for i in candidates for (z . p) in display-time-world-list collect - (cons + (cons (cond ((string-match (format-time-string "%H:%M" (current-time)) i) (propertize i 'face 'helm-time-zone-current)) ((string-match helm-time-zone-home-location i) diff --git a/elpa/helm-20181110.1615/helm-mode.el b/elpa/helm-20190122.549/helm-mode.el similarity index 97% rename from elpa/helm-20181110.1615/helm-mode.el rename to elpa/helm-20190122.549/helm-mode.el index 15ee93c0..f014d2dc 100644 --- a/elpa/helm-20181110.1615/helm-mode.el +++ b/elpa/helm-20190122.549/helm-mode.el @@ -23,7 +23,8 @@ (require 'helm-files) (defvar crm-separator) - +(defvar ido-everywhere) +(declare-function ido-mode "ido.el") (defgroup helm-mode nil "Enable helm completion." @@ -63,7 +64,7 @@ provide helm completion in each `completing-read' or `read-file-name' found, but other functions can be specified here for specific commands. This also allow disabling helm completion for some commands when needed. - + Each entry is a cons cell like (EMACS_COMMAND . COMPLETING-READ_HANDLER) where key and value are symbols. @@ -105,7 +106,7 @@ Example: We want here to make the regular `completing-read' in `foo/test' returns a list of candidate(s) instead of a single candidate. - + Note that this function will be reused for ALL the `completing-read' of this command, so it should handle all cases, e.g If first `completing-read' complete against symbols and @@ -902,7 +903,7 @@ See documentation of `completing-read' and `all-completions' for details." def-com (apply def-com def-args)) (;; Use by default a in-buffer handler unless - ;; COLLECTION is a function. + ;; COLLECTION is a function. t (funcall default-handler prompt collection predicate require-match @@ -1135,7 +1136,6 @@ Don't use it directly, use instead `helm-read-file-name' in your programs." ;; Append the two extra args needed to set the buffer and source name ;; in helm specialized functions. (any-args (append def-args (list str-command buf-name))) - (ido-state ido-mode) helm-completion-mode-start-message ; Be quiet helm-completion-mode-quit-message ; Same here fname) @@ -1151,7 +1151,7 @@ Don't use it directly, use instead `helm-read-file-name' in your programs." ;; we switch to `helm-read-file-name' and don't try to call it ;; with wrong number of args. (when (eq def-com 'ido) - (setq def-com 'ido-read-file-name) (ido-mode 1)) + (setq def-com 'ido-read-file-name)) (when (and def-com (> (length (help-function-arglist def-com)) 8)) (setq def-com 'incompatible)) (unless (or (not entry) def-com) @@ -1200,8 +1200,8 @@ Don't use it directly, use instead `helm-read-file-name' in your programs." :alistp nil :must-match mustmatch :test predicate)))) + (and ido-mode (ido-mode -1)) (helm-mode 1) - (ido-mode (if ido-state 1 -1)) ;; Same comment as in `helm--completing-read-default'. (setq this-command current-command)) (if (and @@ -1385,6 +1385,21 @@ Can be used as value for `completion-in-region-function'." (when (boundp 'completion-in-region-function) (defconst helm--old-completion-in-region-function completion-in-region-function)) +(defun helm-mode--disable-ido-maybe (&optional from-hook) + (when (and (boundp 'ido-everywhere) ido-everywhere) + (remove-function read-file-name-function #'ido-read-file-name) + (remove-function read-buffer-function #'ido-read-buffer) + (setq ido-everywhere nil) + (if from-hook + (user-error "Unable to turn on Ido-everywhere while Helm-mode is enabled") + (user-error "Helm-mode enabled (Ido-everywhere is incompatible with Helm-mode, disabling it)")))) + +(defun helm-mode--ido-everywhere-hook () + ;; Called only when user calls directly ido-everywhere + ;; and helm-mode is enabled. + (when helm-mode + (helm-mode--disable-ido-maybe t))) + ;;;###autoload (define-minor-mode helm-mode "Toggle generic helm completion. @@ -1431,7 +1446,15 @@ Note: This mode is incompatible with Emacs23." #'helm--generic-read-buffer) (when helm-mode-handle-completion-in-region (add-function :override completion-in-region-function - #'helm--completion-in-region))) + #'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). + (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). + (add-hook 'ido-everywhere-hook #'helm-mode--ido-everywhere-hook)) (setq completing-read-function 'helm--completing-read-default read-file-name-function 'helm--generic-read-file-name read-buffer-function 'helm--generic-read-buffer) @@ -1444,7 +1467,8 @@ Note: This mode is incompatible with Emacs23." (remove-function completing-read-function #'helm--completing-read-default) (remove-function read-file-name-function #'helm--generic-read-file-name) (remove-function read-buffer-function #'helm--generic-read-buffer) - (remove-function completion-in-region-function #'helm--completion-in-region)) + (remove-function completion-in-region-function #'helm--completion-in-region) + (remove-hook 'ido-everywhere-hook #'helm-mode--ido-everywhere-hook)) (setq completing-read-function (and (fboundp 'completing-read-default) 'completing-read-default) read-file-name-function (and (fboundp 'read-file-name-default) diff --git a/elpa/helm-20181110.1615/helm-net.el b/elpa/helm-20190122.549/helm-net.el similarity index 99% rename from elpa/helm-20181110.1615/helm-net.el rename to elpa/helm-20190122.549/helm-net.el index 9678f71c..560277d3 100644 --- a/elpa/helm-20181110.1615/helm-net.el +++ b/elpa/helm-20190122.549/helm-net.el @@ -175,7 +175,7 @@ Can be \"-new-tab\" (default) or \"-new-window\"." (defun helm-net--url-retrieve-sync (request parser) (if helm-net-prefer-curl (with-temp-buffer - (call-process "curl" nil t nil request) + (call-process "curl" nil t nil request "-L") (funcall parser)) (with-current-buffer (url-retrieve-synchronously request) (funcall parser)))) @@ -352,7 +352,7 @@ Follows any redirections from Wikipedia, and stores results in (when (or (string-match "\\(\n\\)?\n

" result) ;; otherwise just find the first paragraph (string-match "

" result)) - ;; remove cruft and do a simple formatting + ;; remove cruft and do a simple formatting (replace-regexp-in-string "Cite error: .*" "" (replace-regexp-in-string diff --git a/elpa/helm-20181110.1615/helm-org.el b/elpa/helm-20190122.549/helm-org.el similarity index 100% rename from elpa/helm-20181110.1615/helm-org.el rename to elpa/helm-20190122.549/helm-org.el diff --git a/elpa/helm-20181110.1615/helm-pkg.el b/elpa/helm-20190122.549/helm-pkg.el similarity index 65% rename from elpa/helm-20181110.1615/helm-pkg.el rename to elpa/helm-20190122.549/helm-pkg.el index 70023e7f..524303aa 100644 --- a/elpa/helm-20181110.1615/helm-pkg.el +++ b/elpa/helm-20190122.549/helm-pkg.el @@ -1,4 +1,4 @@ -(define-package "helm" "20181110.1615" "Helm is an Emacs incremental and narrowing framework" +(define-package "helm" "20190122.549" "Helm is an Emacs incremental and narrowing framework" '((emacs "24.4") (async "1.9.3") (popup "0.5.3") diff --git a/elpa/helm-20181110.1615/helm-regexp.el b/elpa/helm-20190122.549/helm-regexp.el similarity index 99% rename from elpa/helm-20181110.1615/helm-regexp.el rename to elpa/helm-20190122.549/helm-regexp.el index f0edbbcd..02b3d966 100644 --- a/elpa/helm-20181110.1615/helm-regexp.el +++ b/elpa/helm-20190122.549/helm-regexp.el @@ -55,7 +55,8 @@ Any other non--nil value update after confirmation." (defcustom helm-source-multi-occur-actions '(("Go to Line" . helm-moccur-goto-line) ("Goto line other window (C-u vertically)" . helm-moccur-goto-line-ow) - ("Goto line new frame" . helm-moccur-goto-line-of)) + ("Goto line new frame" . helm-moccur-goto-line-of) + ("Save buffer" . helm-moccur-save-results)) "Actions for helm-occur and helm-moccur." :group 'helm-regexp :type '(alist :key-type string :value-type function)) diff --git a/elpa/helm-20181110.1615/helm-ring.el b/elpa/helm-20190122.549/helm-ring.el similarity index 98% rename from elpa/helm-20181110.1615/helm-ring.el rename to elpa/helm-20190122.549/helm-ring.el index f744536b..f28a16ec 100644 --- a/elpa/helm-20181110.1615/helm-ring.el +++ b/elpa/helm-20190122.549/helm-ring.el @@ -95,10 +95,13 @@ will not have anymore separators between candidates." "Source for browse and insert contents of kill-ring.") (defun helm-kill-ring-candidates () - (cl-loop for kill in (helm-fast-remove-dups kill-ring :test 'equal) - unless (or (< (length kill) helm-kill-ring-threshold) - (string-match "\\`[\n[:blank:]]+\\'" kill)) - collect kill)) + (cl-loop with cands = (helm-fast-remove-dups kill-ring :test 'equal) + for kill in (if (eq (helm-attr 'last-command) 'yank) + (cdr cands) + cands) + unless (or (< (length kill) helm-kill-ring-threshold) + (string-match "\\`[\n[:blank:]]+\\'" kill)) + collect kill)) (defun helm-kill-ring-transformer (candidates _source) "Ensure CANDIDATES are not read-only." diff --git a/elpa/helm-20181110.1615/helm-semantic.el b/elpa/helm-20190122.549/helm-semantic.el similarity index 99% rename from elpa/helm-20181110.1615/helm-semantic.el rename to elpa/helm-20190122.549/helm-semantic.el index dcb55e09..402abb60 100644 --- a/elpa/helm-20181110.1615/helm-semantic.el +++ b/elpa/helm-20190122.549/helm-semantic.el @@ -118,7 +118,7 @@ you have completion on these functions with `C-M i' in the customize interface." (with-current-buffer helm-buffer (when (looking-at " ") (goto-char (next-single-property-change - (point-at-bol) 'semantic-tag nil (point-at-eol)))) + (point-at-bol) 'semantic-tag nil (point-at-eol)))) (let ((tag (get-text-property (point) 'semantic-tag))) (semantic-go-to-tag tag) (unless persistent diff --git a/elpa/helm-20181110.1615/helm-sys.el b/elpa/helm-20190122.549/helm-sys.el similarity index 100% rename from elpa/helm-20181110.1615/helm-sys.el rename to elpa/helm-20190122.549/helm-sys.el diff --git a/elpa/helm-20181110.1615/helm-tags.el b/elpa/helm-20190122.549/helm-tags.el similarity index 100% rename from elpa/helm-20181110.1615/helm-tags.el rename to elpa/helm-20190122.549/helm-tags.el diff --git a/elpa/helm-20181110.1615/helm-types.el b/elpa/helm-20190122.549/helm-types.el similarity index 86% rename from elpa/helm-20181110.1615/helm-types.el rename to elpa/helm-20190122.549/helm-types.el index 5eaacc78..15de27e7 100644 --- a/elpa/helm-20181110.1615/helm-types.el +++ b/elpa/helm-20190122.549/helm-types.el @@ -37,6 +37,37 @@ (helm--setup-source source) (helm-source-get-action-from-type source))) +(defvar helm-generic-files-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-]") 'helm-ff-run-toggle-basename) + (define-key map (kbd "C-s") 'helm-ff-run-grep) + (define-key map (kbd "M-g s") 'helm-ff-run-grep) + (define-key map (kbd "M-g z") 'helm-ff-run-zgrep) + (define-key map (kbd "M-g p") 'helm-ff-run-pdfgrep) + (define-key map (kbd "C-c g") 'helm-ff-run-gid) + (define-key map (kbd "M-R") 'helm-ff-run-rename-file) + (define-key map (kbd "M-C") 'helm-ff-run-copy-file) + (define-key map (kbd "M-B") 'helm-ff-run-byte-compile-file) + (define-key map (kbd "M-L") 'helm-ff-run-load-file) + (define-key map (kbd "M-S") 'helm-ff-run-symlink-file) + (define-key map (kbd "M-H") 'helm-ff-run-hardlink-file) + (define-key map (kbd "M-D") 'helm-ff-run-delete-file) + (define-key map (kbd "C-=") 'helm-ff-run-ediff-file) + (define-key map (kbd "C-c =") 'helm-ff-run-ediff-merge-file) + (define-key map (kbd "C-c o") 'helm-ff-run-switch-other-window) + (define-key map (kbd "C-c r") 'helm-ff-run-find-file-as-root) + (define-key map (kbd "C-c C-o") 'helm-ff-run-switch-other-frame) + (define-key map (kbd "M-i") 'helm-ff-properties-persistent) + (define-key map (kbd "C-c C-x") 'helm-ff-run-open-file-externally) + (define-key map (kbd "C-c X") 'helm-ff-run-open-file-with-default-tool) + (define-key map (kbd "M-.") 'helm-ff-run-etags) + (define-key map (kbd "C-c @") 'helm-ff-run-insert-org-link) + (define-key map (kbd "C-x C-q") 'helm-ff-run-marked-files-in-dired) + (define-key map (kbd "C-c C-a") 'helm-ff-run-mail-attach-files) + map) + "Generic Keymap for files.") + (defcustom helm-type-file-actions (helm-make-actions "Find file" 'helm-find-many-files diff --git a/elpa/helm-20181110.1615/helm-utils.el b/elpa/helm-20190122.549/helm-utils.el similarity index 97% rename from elpa/helm-20181110.1615/helm-utils.el rename to elpa/helm-20190122.549/helm-utils.el index bfa5e07a..0364aa27 100644 --- a/elpa/helm-20181110.1615/helm-utils.el +++ b/elpa/helm-20190122.549/helm-utils.el @@ -445,17 +445,24 @@ To use this add it to `helm-goto-line-before-hook'." (set-marker (mark-marker) (point)) (push-mark (point) 'nomsg)))) -(defun helm-show-all-in-this-source-only (arg) - "Show only current source of this helm session with all its candidates. -With a numeric prefix arg show only the ARG number of candidates." +(defun helm-show-all-candidates-in-source (arg) + "Toggle all or only candidate-number-limit cands in current source. +With a numeric prefix arg show only the ARG number of candidates. +The prefix arg have no effect when toggling to only +candidate-number-limit." (interactive "p") (with-helm-alive-p - (with-helm-window - (with-helm-default-directory (helm-default-directory) - (let ((helm-candidate-number-limit (and (> arg 1) arg))) - (helm-set-source-filter - (list (assoc-default 'name (helm-get-current-source))))))))) -(put 'helm-show-all-in-this-source-only 'helm-only t) + (with-helm-buffer + (if helm-source-filter + (progn + (setq-local helm-candidate-number-limit + (default-value 'helm-candidate-number-limit)) + (helm-set-source-filter nil)) + (with-helm-default-directory (helm-default-directory) + (setq-local helm-candidate-number-limit (and (> arg 1) arg)) + (helm-set-source-filter + (list (helm-get-current-source)))))))) +(put 'helm-show-all-candidates-in-source 'helm-only t) (defun helm-display-all-sources () "Display all sources previously hidden by `helm-set-source-filter'." @@ -514,6 +521,8 @@ from its directory." (bmk (and bmk-name (assoc bmk-name bookmark-alist))) (buf (helm-aif (and (bufferp sel) (get-buffer sel)) (buffer-name it))) + (pkg (and (stringp sel) + (get-text-property 0 'tabulated-list-id sel))) (default-preselection (or (buffer-file-name helm-current-buffer) default-directory))) (cond @@ -546,6 +555,9 @@ from its directory." (grep-line (with-current-buffer (get-buffer (car grep-line)) (expand-file-name (or (buffer-file-name) default-directory)))) + ;; Package (installed). + ((and pkg (package-installed-p pkg)) + (expand-file-name (package-desc-dir pkg))) ;; Url. ((and (stringp sel) helm--url-regexp (string-match helm--url-regexp sel)) sel) ;; Exit brutally from a `with-helm-show-completion' diff --git a/elpa/helm-20181110.1615/helm-x-files.el b/elpa/helm-20190122.549/helm-x-files.el similarity index 100% rename from elpa/helm-20181110.1615/helm-x-files.el rename to elpa/helm-20190122.549/helm-x-files.el diff --git a/elpa/helm-core-20181110.1635/helm-core-autoloads.el b/elpa/helm-core-20190122.549/helm-core-autoloads.el similarity index 100% rename from elpa/helm-core-20181110.1635/helm-core-autoloads.el rename to elpa/helm-core-20190122.549/helm-core-autoloads.el diff --git a/elpa/helm-core-20181110.1635/helm-core-pkg.el b/elpa/helm-core-20190122.549/helm-core-pkg.el similarity index 64% rename from elpa/helm-core-20181110.1635/helm-core-pkg.el rename to elpa/helm-core-20190122.549/helm-core-pkg.el index c8d0e81d..cd981568 100644 --- a/elpa/helm-core-20181110.1635/helm-core-pkg.el +++ b/elpa/helm-core-20190122.549/helm-core-pkg.el @@ -1,4 +1,4 @@ -(define-package "helm-core" "20181110.1635" "Development files for Helm" +(define-package "helm-core" "20190122.549" "Development files for Helm" '((emacs "24.4") (async "1.9.3")) :url "https://emacs-helm.github.io/helm/") diff --git a/elpa/helm-core-20181110.1635/helm-lib.el b/elpa/helm-core-20190122.549/helm-lib.el similarity index 98% rename from elpa/helm-core-20181110.1635/helm-lib.el rename to elpa/helm-core-20190122.549/helm-lib.el index 4c74a809..342b68c2 100644 --- a/elpa/helm-core-20181110.1635/helm-lib.el +++ b/elpa/helm-core-20190122.549/helm-lib.el @@ -1032,7 +1032,7 @@ Argument ALIST is an alist of associated major modes." ;; to determine if its `major-mode' is: ;; - same as the `cur-maj-mode' ;; - derived from `cur-maj-mode' and from - ;; START-BUFFER if its mode is derived from the one in START-BUFFER. + ;; START-BUFFER if its mode is derived from the one in START-BUFFER. ;; - have an assoc entry (major-mode . cur-maj-mode) ;; - have an rassoc entry (cur-maj-mode . major-mode) ;; - check if one of these entries inherit from another one in @@ -1153,22 +1153,25 @@ other candidate transformers." (char-equal (aref str (1- (length str))) ?/)) (cl-defun helm-walk-directory (directory &key (path 'basename) - directories - match skip-subdirs) + directories + match skip-subdirs + noerror) "Walk through DIRECTORY tree. Argument PATH can be one of basename, relative, full, or a function called on file name, default to basename. -Argument DIRECTORIES when non--nil (default) return also directories names, -otherwise skip directories names, with a value of 'only returns +Argument DIRECTORIES when `t' return also directories names, +otherwise skip directories names, with a value of `only' returns only subdirectories, i.e files are skipped. Argument MATCH is a regexp matching files or directories. Argument SKIP-SUBDIRS when `t' will skip `helm-walk-ignore-directories' otherwise if it is given as a list of directories, this list will be used -instead of `helm-walk-ignore-directories'." +instead of `helm-walk-ignore-directories'. + +Argument NOERROR when `t' will skip directories which are not accessible." (let ((fn (cl-case path (basename 'file-name-nondirectory) (relative 'file-relative-name) @@ -1188,7 +1191,9 @@ instead of `helm-walk-ignore-directories'." if (and (helm--dir-name-p f) (helm--dir-file-name f dir)) nconc - (unless (member f skip-subdirs) + (unless (or (member f skip-subdirs) + (and noerror + (not (file-accessible-directory-p it)))) (if (and directories (or (null match) (string-match match f))) diff --git a/elpa/helm-core-20181110.1635/helm-multi-match.el b/elpa/helm-core-20190122.549/helm-multi-match.el similarity index 100% rename from elpa/helm-core-20181110.1635/helm-multi-match.el rename to elpa/helm-core-20190122.549/helm-multi-match.el diff --git a/elpa/helm-core-20181110.1635/helm-source.el b/elpa/helm-core-20190122.549/helm-source.el similarity index 100% rename from elpa/helm-core-20181110.1635/helm-source.el rename to elpa/helm-core-20190122.549/helm-source.el diff --git a/elpa/helm-core-20181110.1635/helm.el b/elpa/helm-core-20190122.549/helm.el similarity index 97% rename from elpa/helm-core-20181110.1635/helm.el rename to elpa/helm-core-20190122.549/helm.el index 50ecc130..32cde471 100644 --- a/elpa/helm-core-20181110.1635/helm.el +++ b/elpa/helm-core-20190122.549/helm.el @@ -35,6 +35,8 @@ (require 'helm-multi-match) (require 'helm-source) +(declare-function 'helm-comp-read "helm-mode.el") + ;;; Multi keys ;; @@ -217,7 +219,7 @@ vectors, so don't use strings to define them." (define-key map (kbd "M-m") 'helm-toggle-all-marks) (define-key map (kbd "M-a") 'helm-mark-all) (define-key map (kbd "M-U") 'helm-unmark-all) - (define-key map (kbd "C-M-a") 'helm-show-all-in-this-source-only) + (define-key map (kbd "C-M-a") 'helm-show-all-candidates-in-source) (define-key map (kbd "C-M-e") 'helm-display-all-sources) (define-key map (kbd "C-s") 'undefined) (define-key map (kbd "M-s") 'undefined) @@ -401,7 +403,7 @@ If no local value found and current command is not one of `helm-commands-using-frame' use this default value. Function in charge of deciding which value use is `helm-resolve-display-function'. - + To set it locally to `helm-buffer' in helm sources use `helm-set-local-variable' in init function or use :display-function slot in `helm' call." @@ -763,13 +765,31 @@ you don't want to use this anymore." :group 'helm :type 'boolean) -(defcustom helm-use-undecorated-frame-option nil +(defcustom helm-use-undecorated-frame-option t "Display helm frame undecorated when non nil. This option have no effect with emacs versions lower than 26." :group 'helm :type 'boolean) +(defcustom helm-frame-background-color nil + "Background color for helm frames, a string. +Fallback to default face background when nil." + :group 'helm + :type 'string) + +(defcustom helm-frame-foreground-color nil + "Foreground color for helm frames, a string. +Fallback to default face foreground when nil" + :group 'helm + :type 'string) + +(defcustom helm-frame-alpha nil + "Alpha parameter for helm frames, an integer. +Fallback to 100 when nil." + :group 'helm + :type 'integer) + (defcustom helm-use-frame-when-more-than-two-windows nil "Display helm buffer in frame when more than two windows." :group 'helm @@ -1335,7 +1355,9 @@ to modify it.") (defvar helm-saved-selection nil "Value of the currently selected object when the action list is shown.") (defvar helm-sources nil - "[INTERNAL] Value of current sources in use, a list.") + "[INTERNAL] Value of current sources in use, a list of alists. +The list of sources (symbols or alists) is normalized to alists in +`helm-initialize'.") (defvar helm-buffer-file-name nil "Variable `buffer-file-name' when `helm' is invoked.") (defvar helm-candidate-cache (make-hash-table :test 'equal) @@ -1435,7 +1457,8 @@ This is only used when helm is using (defconst helm--frame-default-attributes '(width height tool-bar-lines left top title undecorated vertical-scroll-bars - visibility fullscreen menu-bar-lines undecorated) + visibility fullscreen menu-bar-lines undecorated + alpha foreground-color background-color) "Frame parameters to save in `helm--last-frame-parameters'.") (defvar helm--last-frame-parameters nil "Frame parameters to save for later resuming. @@ -1446,6 +1469,7 @@ This may be let bounded in other places to notify the display function to reuse the same frame parameters as the previous helm session just like resume would do.") (defvar helm--current-buffer-narrowed nil) +(defvar helm--suspend-update-interactive-flag nil) ;; Utility: logging (defun helm-log (format-string &rest args) @@ -1554,7 +1578,7 @@ Messages are logged to a file named with todays date and time in this directory. ;; Helm API (defmacro with-helm-default-directory (directory &rest body) - (declare (indent 2) (debug t)) + (declare (indent 1) (debug t)) `(let ((default-directory (or (and ,directory (file-name-as-directory ,directory)) default-directory))) @@ -1754,7 +1778,7 @@ existing Helm function names." (helm--normalize-filter-sources sources)) (helm-log "helm-source-filter = %S" helm-source-filter) ;; Use force-update to run init/update functions. - (helm-force-update (and (stringp cur-disp-sel) + (helm-update (and (stringp cur-disp-sel) (regexp-quote cur-disp-sel)))))) (defun helm--normalize-filter-sources (sources) @@ -1904,14 +1928,15 @@ i.e functions called with RET." ;; source that inherit actions from type, note that ACTION have to ;; be bound to a symbol and not to be an anonymous action ;; i.e. lambda or byte-code. - (let ((actions (helm-attr 'action nil t))) + (let ((actions (helm-get-actions-from-current-source))) (when actions (cl-assert (or (eq action actions) - (rassq action actions) ;; Compiled lambda (byte-code-function-p action) ;; Lambdas - (and (listp action) (functionp action))) + (and (listp action) (functionp action)) + ;; One of current actions. + (rassq action actions)) nil "No such action `%s' for this source" action))) (setq helm-saved-action action) (setq helm-saved-selection (or (helm-get-selection) "")) @@ -1935,7 +1960,7 @@ i.e functions called with RET." ;; If no helm based action run within 0.5 seconds, the next helm ;; session will have to resolve again those variable values. (run-with-idle-timer 0.5 nil - (lambda () (helm-set-local-variable 'helm-display-function nil + (lambda () (helm-set-local-variable 'helm-display-function nil 'helm--last-frame-parameters nil)))) (helm-exit-minibuffer)) @@ -1999,7 +2024,7 @@ IOW Don't use VALUE of previous VAR to set the VALUE of next VAR. ;; the first on stack e.g. ;; (helm-set-local-variable 'helm-foo 1) ;; (helm-set-local-variable 'helm-foo 2) - ;; helm--local-variables => + ;; helm--local-variables => ;; '((helm-foo . 2) (helm-foo. 1)) ;; (helm-foo . 2) is retained and (helm-foo . 1) ;; ignored. @@ -2043,7 +2068,7 @@ candidates only. This function is used also to process functions called with no args, e.g. init functions, in this case it is called without ARGS. See `helm-process-filtered-candidate-transformer' -\`helm-compute-attr-in-sources' and +\`helm-compute-attr-in-sources' and \`helm-process-candidate-transformer'. Arg FUNCTIONS is either a symbol or a list of functions, each function being @@ -2612,7 +2637,7 @@ Don't use this directly, use instead `helm' with the keyword (orig-one-window-p helm-onewindow-p) (helm--nested t)) ;; FIXME Using helm-full-frame here allow showing the new - ;; helm-buffer in the same window as old helm-buffer, why? + ;; helm-buffer in the same window as old helm-buffer, why? (helm-set-local-variable 'helm-full-frame t) (unwind-protect (let (helm-current-position @@ -2908,6 +2933,11 @@ Note that this feature is available only with emacs-25+." (+ (cdr pos) line-height))) (title . "Helm") (undecorated . ,helm-use-undecorated-frame-option) + (background-color . ,(or helm-frame-background-color + (face-attribute 'default :background))) + (foreground-color . ,(or helm-frame-foreground-color + (face-attribute 'default :foreground))) + (alpha . ,(or helm-frame-alpha 100)) (vertical-scroll-bars . nil) (menu-bar-lines . 0) (fullscreen . nil) @@ -3085,7 +3115,8 @@ See :after-init-hook and :before-init-hook in `helm-source'." helm-current-buffer (helm--current-buffer) helm-buffer-file-name buffer-file-name helm-issued-errors nil - helm-saved-current-source nil) + helm-saved-current-source nil + helm--suspend-update-interactive-flag nil) (when (and (with-helm-current-buffer (and (buffer-narrowed-p) (use-region-p))) @@ -3285,20 +3316,50 @@ For ANY-PRESELECT ANY-RESUME ANY-KEYMAP ANY-DEFAULT ANY-HISTORY, See `helm'." (when timer (cancel-timer timer) (setq timer nil))))))))) (defun helm-toggle-suspend-update () - "Enable or disable update of display in helm. + "Enable or disable display update in helm. This can be useful for example for quietly writing a complex regexp without helm constantly updating." (interactive) - (with-helm-alive-p - (when (setq helm-suspend-update-flag (not helm-suspend-update-flag)) + (helm-suspend-update (not helm-suspend-update-flag) t) + (setq helm--suspend-update-interactive-flag + (not helm--suspend-update-interactive-flag))) +(put 'helm-toggle-suspend-update 'helm-only t) + +(defun helm-suspend-update (arg &optional verbose) + "Enable or disable display update in helm. +If ARG is 1 or non nil suspend update, if it is -1 or nil reenable +updating. When VERBOSE is specified display a message." + (with-helm-buffer + (when (setq helm-suspend-update-flag + (helm-acase arg + (1 t) + (-1 nil) + (t it))) (helm-kill-async-processes) (setq helm-pattern "")) - (message (if helm-suspend-update-flag - "Helm update suspended!" - "Helm update re-enabled!")) + (when verbose + (message (if helm-suspend-update-flag + "Helm update suspended!" + "Helm update re-enabled!"))) (helm-aif (helm-get-current-source) - (with-helm-buffer (helm-display-mode-line it t))))) -(put 'helm-toggle-suspend-update 'helm-only t) + (helm-display-mode-line it t)))) + +(defun helm-delete-backward-no-update (arg) + "Disable update and delete ARG chars backward. +Update is reenabled when idle 1s." + (interactive "p") + (with-helm-alive-p + (unless helm--suspend-update-interactive-flag + (helm-suspend-update 1)) + (backward-delete-char arg) + (run-with-idle-timer + 1 nil + (lambda () + (unless helm--suspend-update-interactive-flag + (helm-suspend-update -1) + (helm-check-minibuffer-input) + (helm-force-update)))))) +(put 'helm-delete-backward-no-update 'helm-only t) (defun helm--suspend-read-passwd (old--fn &rest args) "Suspend helm while reading password. @@ -3452,9 +3513,10 @@ WARNING: Do not use this mode yourself, it is internal to helm." (defun helm-get-candidates (source) "Retrieve and return the list of candidates from SOURCE." - (let* (inhibit-quit - (candidate-fn (assoc-default 'candidates source)) + (let* ((candidate-fn (assoc-default 'candidates source)) (candidate-proc (assoc-default 'candidates-process source)) + ;; See comment in helm-get-cached-candidates (Issue 2113). + (inhibit-quit candidate-proc) cfn-error (notify-error (lambda (&optional e) @@ -3515,7 +3577,11 @@ WARNING: Do not use this mode yourself, it is internal to helm." "Return the cached value of candidates for SOURCE. Cache the candidates if there is no cached value yet." (let* ((name (assoc-default 'name source)) - (candidate-cache (gethash name helm-candidate-cache))) + (candidate-cache (gethash name helm-candidate-cache)) + ;; Bind inhibit-quit to ensure function terminate in case of + ;; quit from helm-while-no-input and processes are added to + ;; helm-async-processes for further deletion (Issue 2113). + (inhibit-quit (assoc-default 'candidates-process source))) (helm-aif candidate-cache (prog1 it (helm-log "Use cached candidates")) (helm-log "No cached candidates, calculate candidates") @@ -3652,6 +3718,7 @@ Default function to match candidates according to `helm-pattern'." ;;; Fuzzy matching ;; ;; +(defconst helm--fuzzy-word-separators '("-" "_" "." ":" "/")) (defvar helm--fuzzy-regexp-cache (make-hash-table :test 'eq)) (defun helm--fuzzy-match-maybe-set-pattern () ;; Computing helm-pattern with helm--mapconcat-pattern @@ -3734,23 +3801,45 @@ CANDIDATE. Contiguous matches get a coefficient of 2." candidate (helm-stringify candidate))) (pat-lookup (helm--collect-pairs-in-string pattern)) (str-lookup (helm--collect-pairs-in-string cand)) - (bonus (cond ((equal (car pat-lookup) (car str-lookup)) - 1) + ;; Prefix + (bonus (cond ((or (equal (car pat-lookup) (car str-lookup)) + (equal (caar pat-lookup) (caar str-lookup))) + 2) ((and (null pat-lookup) ; length = 1 (string= pattern (substring cand 0 1))) 150) (t 0))) - (bonus1 (and (string-match (concat "\\<" (regexp-quote pattern) "\\>") - cand) - 100))) - (+ bonus (or bonus1 - ;; Give a coefficient of 2 for contiguous matches. - ;; That's mean that "wiaaaki" will not take precedence - ;; on "aaawiki" when matching on "wiki" even if "wiaaaki" - ;; starts by "wi". - (* (length (cl-nintersection - pat-lookup str-lookup :test 'equal)) - 2))))) + ;; Exact match e.g. foo > foo == 200 + (bonus1 (and (string= cand pattern) 200)) + ;; Partial match e.g. foo > aafooaa == 100 + (bonus2 (and (string-match + (concat "\\<" (regexp-quote pattern) "\\>") + cand) + 100)) + ;; Prefix at word boundary e.g fb > foo-bar coeff 2 + (bonus3 (if (or bonus1 bonus2 (null pat-lookup)) + 0 + (cl-loop with seq = (copy-sequence str-lookup) + with count = 0 + for c across (substring pattern 1) + for assoc = (rassoc (list (string c)) (cdr seq)) + when (helm-aand + assoc + (car it) + (member it helm--fuzzy-word-separators)) + do (cl-incf count 2) + and do (setq seq (cdr (member assoc seq))) + finally return count)))) + (+ bonus + bonus3 + (or bonus1 bonus2 + ;; Give a coefficient of 2 for contiguous matches. + ;; That's mean that "wiaaaki" will not take precedence + ;; on "aaawiki" when matching on "wiki" even if "wiaaaki" + ;; starts by "wi". + (* (length (cl-nintersection + pat-lookup str-lookup :test 'equal)) + 2))))) (defun helm-fuzzy-matching-default-sort-fn-1 (candidates &optional use-real basename preserve-tie-order) "The transformer for sorting candidates in fuzzy matching. @@ -3970,7 +4059,7 @@ It is used for narrowing list of candidates to the ;; candidates. ;; NOTE that this next block of code is returning nil on async sources, ;; the candidates being processed directly in `helm-output-filter' - ;; process-filter. + ;; process-filter. (helm-process-filtered-candidate-transformer ;; Using in-buffer method or helm-pattern is empty ;; in this case compute all candidates. @@ -5201,7 +5290,8 @@ don't exit and send message 'no match'." (if (and (helm--updating-p) (null helm--reading-passwd-or-string)) (progn (message "[Display not ready]") - (sit-for 0.5) (message nil)) + (sit-for 0.5) (message nil) + (helm-update)) (let* ((src (helm-get-current-source)) (empty-buffer-p (with-current-buffer helm-buffer (eq (point-min) (point-max)))) @@ -5746,7 +5836,7 @@ Acceptable values of BUFFER-SPEC: - nil (omit) Only return the candidates buffer of current source if found. - + - A buffer Register a buffer as a candidates buffer. The buffer needs to exists, it is not created. @@ -5758,7 +5848,7 @@ Acceptable values of BUFFER-SPEC: The buffer is not erased nor deleted. Generally it is safer to use a copy of buffer inserted in a global or local buffer. - + If for some reasons a global buffer and a local buffer exist and are belonging to the same source, the local buffer takes precedence on the global one and is used instead. @@ -6119,7 +6209,7 @@ window to maintain visibility." "Return the window that will be used for persistent action. If SPLIT-ONEWINDOW is non-`nil' window is split in persistent action." (with-helm-window - (let (next-win cur-win) + (let (prev-win cur-win) (setq helm-persistent-action-display-window (cond ((and (window-live-p helm-persistent-action-display-window) (not (member helm-persistent-action-display-window @@ -6130,7 +6220,7 @@ If SPLIT-ONEWINDOW is non-`nil' window is split in persistent action." (split-onewindow (split-window)) ;; Fix Issue #2050 with dedicated window. ((window-dedicated-p - (setq next-win (next-window (selected-window) 1))) + (setq prev-win (previous-window (selected-window) 1))) (with-helm-after-update-hook (and (window-live-p helm-persistent-action-display-window) (delete-window helm-persistent-action-display-window))) @@ -6139,7 +6229,7 @@ If SPLIT-ONEWINDOW is non-`nil' window is split in persistent action." (setq cur-win (get-buffer-window helm-current-buffer))) (split-window)) (cur-win) - (t next-win)))))) + (t prev-win)))))) (defun helm-select-persistent-action-window (&optional split-onewindow) "Select the window that will be used for persistent action. @@ -6330,7 +6420,9 @@ is not needed." (while (< (point) maxpoint) (helm-mark-current-line) (let* ((prefix (get-text-property (point-at-bol) 'display)) - (cand (helm-get-selection nil nil src)) + (cand (helm-get-selection + nil (helm-attr 'marked-with-props src) + src)) (bn (and filecomp-p (helm-basename cand)))) ;; Don't mark possibles directories ending with . or .. ;; autosave files/links and non--existent files. @@ -6702,23 +6794,32 @@ See `fit-window-to-buffer' for more infos." (defun helm-help () "Generate helm's help according to `help-message' attribute. -If source is not available yet or doesn't have any `help-message' -attribute, a generic message explaining this is added instead. The -global `helm-help-message' is always added after this local help." +If `helm-buffer' is empty, provide completions on `helm-sources' to +choose its local documentation. +If source doesn't have any `help-message' attribute, a generic message +explaining this is added instead. +The global `helm-help-message' is always added after this local help." (interactive) (with-helm-alive-p - (save-selected-window - (helm-help-internal - "*Helm Help*" - (lambda () - (helm-aif (assoc-default 'help-message (helm-get-current-source)) - (insert (substitute-command-keys - (helm-interpret-value it))) - (insert "* No specific help for this source at this time.\n -It may appear after first results popup in helm buffer.")) - (insert "\n\n" - (substitute-command-keys - (helm-interpret-value helm-help-message)))))))) + (let ((source (or (helm-get-current-source) + (helm-comp-read + "Help for: " + (cl-loop for src in (with-helm-buffer helm-sources) + collect `(,(assoc-default 'name src) . + ,src)) + :allow-nest t + :exec-when-only-one t)))) + (save-selected-window + (helm-help-internal + "*Helm Help*" + (lambda () + (helm-aif (assoc-default 'help-message source) + (insert (substitute-command-keys + (helm-interpret-value it))) + (insert "* No specific help for this source available.")) + (insert "\n\n" + (substitute-command-keys + (helm-interpret-value helm-help-message))))))))) (put 'helm-help 'helm-only t) (defun helm-toggle-truncate-line () -- 2.47.3