Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ivy--regex-ignore-order builder broken #2015

Closed
dieggsy opened this issue Apr 11, 2019 · 1 comment
Closed

ivy--regex-ignore-order builder broken #2015

dieggsy opened this issue Apr 11, 2019 · 1 comment

Comments

@dieggsy
Copy link
Contributor

@dieggsy dieggsy commented Apr 11, 2019

On commit ce0a1f1 , ivy seems to break when using the following option

(setq ivy-re-builders-alist '((t . ivy--regex-ignore-order)))

Tested with make plain. Error output:

Debugger entered--Lisp error: (wrong-type-argument stringp (("^" . t)))
  string=((("^" . t)) "")
  (if (string= re "") candidates (condition-case nil (progn (let ((--dolist-tail-- (if (stringp re) (list ...) re))) (while --dolist-tail-- (let ((re ...)) (let* (... ...) (setq candidates ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))) candidates) (error nil)))
  ivy--re-filter((("^" . t)) ("2C-associate-buffer" "2C-command" "2C-split" "2C-two-columns" "5x5" "5x5-crack" "5x5-crack-mutating-best" "5x5-crack-mutating-current" "5x5-crack-randomly" "5x5-crack-xor-mutate" "Buffer-menu-1-window" "Buffer-menu-2-window" "Buffer-menu-backup-unmark" "Buffer-menu-bury" "Buffer-menu-delete" "Buffer-menu-delete-backwards" "Buffer-menu-execute" "Buffer-menu-isearch-buffers" "Buffer-menu-isearch-buffers-regexp" "Buffer-menu-mark" "Buffer-menu-mode" "Buffer-menu-mouse-select" "Buffer-menu-multi-occur" "Buffer-menu-not-modified" "Buffer-menu-other-window" "Buffer-menu-save" "Buffer-menu-select" "Buffer-menu-sort" "Buffer-menu-switch-other-window" "Buffer-menu-this-window" "Buffer-menu-toggle-files-only" "Buffer-menu-toggle-read-only" "Buffer-menu-unmark" "Buffer-menu-unmark-all" "Buffer-menu-unmark-all-buffers" "Buffer-menu-view" "Buffer-menu-view-other-window" "Buffer-menu-visit-tags-table" "Electric-command-history-redo-expression" "Helper-describe-bindings" "Helper-help" "Info-directory" "Info-goto-emacs-command-node" "Info-goto-emacs-key-command-node" "Info-index" "Info-mode" "Info-on-current-buffer" "Info-speedbar-browser" "Info-split" "Info-tagify" ...))
  (cond ((and ivy--old-re (stringp re) (stringp ivy--old-re) (not (string-match-p "\\\\" ivy--old-re)) (not (equal ivy--old-re "")) (memq (cl-search (if (string-match-p "\\\\)\\'" ivy--old-re) (substring ivy--old-re 0 -2) ivy--old-re) re) '(0 2))) (ivy--re-filter re ivy--old-cands)) (matcher (funcall matcher re candidates)) (t (ivy--re-filter re candidates)))
  (let* ((re-str (ivy-re-to-str re)) (matcher (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (aref ivy-last 18))) (case-fold-search (ivy--case-fold-p name)) (cands (cond ((and ivy--old-re (stringp re) (stringp ivy--old-re) (not (string-match-p "\\\\" ivy--old-re)) (not (equal ivy--old-re "")) (memq (cl-search ... re) '...)) (ivy--re-filter re ivy--old-cands)) (matcher (funcall matcher re candidates)) (t (ivy--re-filter re candidates))))) (if (memq (cdr (assq (progn (or (and ... t) (signal ... ...)) (aref ivy-last 22)) ivy-index-functions-alist)) '(ivy-recompute-index-swiper ivy-recompute-index-swiper-async)) (progn (ivy--recompute-index name re-str cands) (setq ivy--old-cands (ivy--sort name cands))) (setq ivy--old-cands (ivy--sort name cands)) (ivy--recompute-index name re-str ivy--old-cands)) (setq ivy--old-re re) ivy--old-cands)
  (if (and ivy--old-re ivy--old-cands (equal re ivy--old-re)) ivy--old-cands (let* ((re-str (ivy-re-to-str re)) (matcher (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... ivy-last))) (aref ivy-last 18))) (case-fold-search (ivy--case-fold-p name)) (cands (cond ((and ivy--old-re (stringp re) (stringp ivy--old-re) (not ...) (not ...) (memq ... ...)) (ivy--re-filter re ivy--old-cands)) (matcher (funcall matcher re candidates)) (t (ivy--re-filter re candidates))))) (if (memq (cdr (assq (progn (or ... ...) (aref ivy-last 22)) ivy-index-functions-alist)) '(ivy-recompute-index-swiper ivy-recompute-index-swiper-async)) (progn (ivy--recompute-index name re-str cands) (setq ivy--old-cands (ivy--sort name cands))) (setq ivy--old-cands (ivy--sort name cands)) (ivy--recompute-index name re-str ivy--old-cands)) (setq ivy--old-re re) ivy--old-cands))
  (let ((re (funcall ivy--regex-function name))) (if (and ivy--old-re ivy--old-cands (equal re ivy--old-re)) ivy--old-cands (let* ((re-str (ivy-re-to-str re)) (matcher (progn (or (and ... t) (signal ... ...)) (aref ivy-last 18))) (case-fold-search (ivy--case-fold-p name)) (cands (cond ((and ivy--old-re ... ... ... ... ...) (ivy--re-filter re ivy--old-cands)) (matcher (funcall matcher re candidates)) (t (ivy--re-filter re candidates))))) (if (memq (cdr (assq (progn ... ...) ivy-index-functions-alist)) '(ivy-recompute-index-swiper ivy-recompute-index-swiper-async)) (progn (ivy--recompute-index name re-str cands) (setq ivy--old-cands (ivy--sort name cands))) (setq ivy--old-cands (ivy--sort name cands)) (ivy--recompute-index name re-str ivy--old-cands)) (setq ivy--old-re re) ivy--old-cands)))
  ivy--filter("^" ("2C-associate-buffer" "2C-command" "2C-split" "2C-two-columns" "5x5" "5x5-crack" "5x5-crack-mutating-best" "5x5-crack-mutating-current" "5x5-crack-randomly" "5x5-crack-xor-mutate" "Buffer-menu-1-window" "Buffer-menu-2-window" "Buffer-menu-backup-unmark" "Buffer-menu-bury" "Buffer-menu-delete" "Buffer-menu-delete-backwards" "Buffer-menu-execute" "Buffer-menu-isearch-buffers" "Buffer-menu-isearch-buffers-regexp" "Buffer-menu-mark" "Buffer-menu-mode" "Buffer-menu-mouse-select" "Buffer-menu-multi-occur" "Buffer-menu-not-modified" "Buffer-menu-other-window" "Buffer-menu-save" "Buffer-menu-select" "Buffer-menu-sort" "Buffer-menu-switch-other-window" "Buffer-menu-this-window" "Buffer-menu-toggle-files-only" "Buffer-menu-toggle-read-only" "Buffer-menu-unmark" "Buffer-menu-unmark-all" "Buffer-menu-unmark-all-buffers" "Buffer-menu-view" "Buffer-menu-view-other-window" "Buffer-menu-visit-tags-table" "Electric-command-history-redo-expression" "Helper-describe-bindings" "Helper-help" "Info-directory" "Info-goto-emacs-command-node" "Info-goto-emacs-key-command-node" "Info-index" "Info-mode" "Info-on-current-buffer" "Info-speedbar-browser" "Info-split" "Info-tagify" ...))
  (setq ivy--old-cands (ivy--filter initial-input coll))
  (progn (setq ivy--old-cands coll) (setq ivy--old-cands (ivy--filter initial-input coll)))
  (if initial-input (progn (setq ivy--old-cands coll) (setq ivy--old-cands (ivy--filter initial-input coll))))
  (let (coll sort-fn) (cond ((eq collection #'Info-read-node-name-1) (setq coll (if (equal (and (boundp ...) Info-current-file) "dir") (mapcar #'(lambda ... ...) (delete-dups (all-completions "(" collection predicate))) (all-completions "" collection predicate)))) ((eq collection #'read-file-name-internal) (require 'tramp) (if (and (equal def initial-input) (member "./" ivy-extra-directories)) (progn (progn (or (and ... t) (signal ... ...)) (let* (...) (aset v 24 ...))))) (setq ivy--directory default-directory) (if (and initial-input (not (equal initial-input ""))) (progn (cond ((file-directory-p initial-input) (if ... ...) (setq ivy--directory ...) (setq initial-input nil) (if preselect ...)) ((condition-case nil ... ...) (setq ivy--directory ...) (progn ... ...))))) (require 'dired) (if preselect (progn (let ((preselect-directory ...)) (if (and preselect-directory ...) (progn ...)) (setq preselect (file-relative-name preselect preselect-directory)) (progn (or ... ...) (let* ... ...))))) (setq sort nil) (setq coll (ivy--sorted-files ivy--directory)) (if initial-input (progn (if (or require-match (equal initial-input default-directory) (equal initial-input "")) nil (setq coll (cons initial-input coll))) (if (or (not ...) (equal ... ...)) (progn (setq initial-input nil)))))) ((eq collection #'internal-complete-buffer) (setq coll (ivy--buffer-list "" ivy-use-virtual-buffers predicate))) (dynamic-collection (setq coll (funcall collection ivy-text))) ((consp (car-safe collection)) (setq collection (cl-remove-if-not predicate collection)) (if (and sort (setq sort-fn (ivy--sort-function caller))) (progn (setq collection (sort (copy-sequence collection) sort-fn)) (setq sort nil))) (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (let* ((v ivy-last)) (aset v 2 collection))) (setq coll (let ((i -1)) (mapcar #'(lambda ... ...) (all-completions "" collection))))) ((or (functionp collection) (byte-code-function-p collection) (vectorp collection) (hash-table-p collection) (and (listp collection) (symbolp (car collection)))) (let ((Info-complete-menu-buffer (or (and ... Info-complete-menu-buffer) (progn ... ...)))) (setq coll (all-completions "" collection predicate)))) (t (setq coll (all-completions "" collection predicate)))) (if (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (aref ivy-last 19)) nil (setq coll (delete "" coll))) (if def (progn (cond ((stringp (car-safe def)) (setq coll (cl-union def coll :test #'equal))) ((and (stringp def) (not (member def coll))) (setq coll (cons def coll)))))) (if (and sort (or (functionp collection) (not (eq history 'org-refile-history))) (setq sort-fn (ivy--sort-function (if (functionp collection) collection caller))) (null (nthcdr ivy-sort-max-size coll))) (progn (setq coll (sort (copy-sequence coll) sort-fn)))) (setq coll (ivy--set-candidates coll)) (setq ivy--old-re nil) (setq ivy--old-cands nil) (if (integerp preselect) (progn (setq ivy--old-re "") (ivy-set-index preselect))) (if initial-input (progn (setq ivy--old-cands coll) (setq ivy--old-cands (ivy--filter initial-input coll)))) (setq ivy--all-candidates coll) (if (integerp preselect) nil (ivy-set-index (or (and dynamic-collection ivy--index) (and preselect (ivy--preselect-index preselect (if initial-input ivy--old-cands coll))) 0))))
  (let* ((prompt (or (progn (or (and ... t) (signal ... ...)) (aref state 1)) "")) (collection (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... state))) (aref state 2))) (predicate (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... state))) (aref state 3))) (history (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... state))) (aref state 6))) (preselect (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... state))) (aref state 7))) (re-builder (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... state))) (aref state 17))) (dynamic-collection (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... state))) (aref state 19))) (require-match (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... state))) (aref state 4))) (caller (or (progn (or (and ... t) (signal ... ...)) (aref state 22)) this-command)) (sort (or (progn (or (and ... t) (signal ... ...)) (aref state 10)) (assoc caller ivy-sort-functions-alist))) (initial-input (or (progn (or (and ... t) (signal ... ...)) (aref state 5)) (let ((init ...)) (cond (... ...) (t init))))) (def (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... state))) (aref state 24)))) (setq ivy--directory nil) (setq ivy-case-fold-search ivy-case-fold-search-default) (setq ivy--regex-function (or re-builder (and (functionp collection) (cdr (assq collection ivy-re-builders-alist))) (ivy-alist-setting ivy-re-builders-alist) #'ivy--regex)) (setq ivy--subexps 0) (setq ivy--regexp-quote #'regexp-quote) (setq ivy--old-text "") (setq ivy--full-length nil) (setq ivy-text "") (setq ivy--index 0) (setq ivy-calling nil) (setq ivy-use-ignore ivy-use-ignore-default) (setq ivy--highlight-function (or (cdr (assq ivy--regex-function ivy-highlight-functions-alist)) #'ivy--highlight-default)) (let (coll sort-fn) (cond ((eq collection #'Info-read-node-name-1) (setq coll (if (equal ... "dir") (mapcar ... ...) (all-completions "" collection predicate)))) ((eq collection #'read-file-name-internal) (require 'tramp) (if (and (equal def initial-input) (member "./" ivy-extra-directories)) (progn (progn ... ...))) (setq ivy--directory default-directory) (if (and initial-input (not ...)) (progn (cond ... ...))) (require 'dired) (if preselect (progn (let ... ... ... ...))) (setq sort nil) (setq coll (ivy--sorted-files ivy--directory)) (if initial-input (progn (if ... nil ...) (if ... ...)))) ((eq collection #'internal-complete-buffer) (setq coll (ivy--buffer-list "" ivy-use-virtual-buffers predicate))) (dynamic-collection (setq coll (funcall collection ivy-text))) ((consp (car-safe collection)) (setq collection (cl-remove-if-not predicate collection)) (if (and sort (setq sort-fn ...)) (progn (setq collection ...) (setq sort nil))) (progn (or (and ... t) (signal ... ...)) (let* (...) (aset v 2 collection))) (setq coll (let (...) (mapcar ... ...)))) ((or (functionp collection) (byte-code-function-p collection) (vectorp collection) (hash-table-p collection) (and (listp collection) (symbolp ...))) (let ((Info-complete-menu-buffer ...)) (setq coll (all-completions "" collection predicate)))) (t (setq coll (all-completions "" collection predicate)))) (if (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... ivy-last))) (aref ivy-last 19)) nil (setq coll (delete "" coll))) (if def (progn (cond ((stringp ...) (setq coll ...)) ((and ... ...) (setq coll ...))))) (if (and sort (or (functionp collection) (not (eq history ...))) (setq sort-fn (ivy--sort-function (if ... collection caller))) (null (nthcdr ivy-sort-max-size coll))) (progn (setq coll (sort (copy-sequence coll) sort-fn)))) (setq coll (ivy--set-candidates coll)) (setq ivy--old-re nil) (setq ivy--old-cands nil) (if (integerp preselect) (progn (setq ivy--old-re "") (ivy-set-index preselect))) (if initial-input (progn (setq ivy--old-cands coll) (setq ivy--old-cands (ivy--filter initial-input coll)))) (setq ivy--all-candidates coll) (if (integerp preselect) nil (ivy-set-index (or (and dynamic-collection ivy--index) (and preselect (ivy--preselect-index preselect ...)) 0)))) (setq ivy-exit nil) (setq ivy--default (if (region-active-p) (buffer-substring (region-beginning) (region-end)) (ivy-thing-at-point))) (setq ivy--prompt (ivy-add-prompt-count (ivy--quote-format-string prompt))) (setq ivy--use-selectable-prompt (ivy--prompt-selectable-p)) (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (let* ((v ivy-last)) (aset v 5 initial-input))))
  ivy--reset-state(#s(ivy-state :prompt "M-x " :collection [0 0 ansi-color-apply-overlay-face isearch--state-pop-fun--cmacro locals 0 kinsoku xselect--int-to-cons input-method-verbose-flag url-setup-privacy-info counsel-alias-expand junet-dos help-variable 0 0 0 0 dired-backup-diff separator-prog defun-prompt-regexp _message 0 dired-at-point pulse-momentary-highlight-region cl-print--preprocess ivy-sort-file-function-default selinux-context byte-compile-function-warn memory-use-counts DXT1 0 0 xref-w-dedicated being 0 0 dired-before-readin-hook ibuffer-update cl--loop-initially \' 0 M-kp-down * + muletibetan-2 - 0 / cl-structure-object 0 ...] :predicate (closure ((externs) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring company-common company-point company-candidates t) (sym) (and (commandp sym) (not (get sym 'byte-obsolete-info)))) :require-match t :initial-input nil :history counsel-M-x-history :preselect nil :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :update-fn nil :sort t :frame #<frame emacs@Ragnarok 0x55a688d7fa30> :window #<window 3 on *scratch*> :buffer #<buffer *scratch*> :text nil :action (1 ("o" (closure ((externs) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring company-common company-point company-candidates t) (cmd) (setq cmd (intern cmd)) (cond ((and ... amx-initialized) (amx-rank cmd)) ((and ... smex-initialized-p) (smex-rank cmd))) (setq prefix-arg current-prefix-arg) (setq this-command cmd) (setq real-this-command cmd) (command-execute cmd 'record)) "default") ("i" (closure (bookmark-alist recentf-list Info-complete-menu-buffer avy-styles-alist avy-style avy-keys-alist avy-keys avy-action avy-all-windows cl-struct-ivy-state-tags t) (x) (insert (if (stringp x) x (car x)))) "insert") ("w" (closure (bookmark-alist recentf-list Info-complete-menu-buffer avy-styles-alist avy-style avy-keys-alist avy-keys avy-action avy-all-windows cl-struct-ivy-state-tags t) (x) (kill-new (if (stringp x) x (car x)))) "copy") ("d" counsel--find-symbol "definition") ("h" (closure (smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring company-common company-point company-candidates t) (x) (describe-function (intern x))) "help")) :unwind nil :re-builder nil :matcher nil :dynamic-collection nil :display-transformer-fn counsel-M-x-transformer :directory "~/dotfiles/emacs/.emacs.d/straight/repos/swiper/" :caller counsel-M-x :current nil :def nil))
  (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (transformer-fn (plist-get ivy--display-transformers-list (cond (caller) ((functionp collection) collection)))) (ivy-display-function (if (or ivy-recursive-last (not (window-minibuffer-p))) (progn (or ivy-display-function (ivy-alist-setting ivy-display-functions-alist caller))))) (height (ivy--height caller))) (setq ivy-last (record 'ivy-state prompt collection predicate require-match initial-input history preselect keymap (if (eq update-fn 'auto) #'(lambda nil (funcall (ivy--get-action ivy-last) (progn ... ...))) update-fn) sort (selected-frame) (selected-window) (current-buffer) nil action unwind re-builder matcher dynamic-collection transformer-fn default-directory caller nil def)) (ivy--reset-state ivy-last) (prog1 (unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil (remove-hook ... setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* (... ... ... ... ...) (if ... ... ...) (if ... ...) (progn ... ...))) (remove-hook 'minibuffer-setup-hook setup-hook))) (put 'post-command-hook 'permanent-local nil) (remove-hook 'post-command-hook #'ivy--queue-exhibit) (let ((cleanup (ivy--display-function-prop :cleanup))) (if (functionp cleanup) (progn (funcall cleanup)))) (if (setq unwind (progn (or (and ... t) (signal ... ...)) (aref ivy-last 16))) (progn (funcall unwind))) (ivy--pulse-cleanup) (if (eq ivy-exit 'done) nil (ivy-recursive-restore))) (ivy-call) (ivy--remove-props (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (aref ivy-last 23)) 'idx)))
  (progn (let ((extra-actions (cl-delete-duplicates (append (plist-get ivy--actions-list t) (plist-get ivy--actions-list this-command) (plist-get ivy--actions-list caller)) :key #'car :test #'equal))) (if extra-actions (progn (setq action (cond ((functionp action) (cons 1 ...)) ((null action) (cons 1 ...)) (t (delete-dups ...))))))) (setq ivy-marked-candidates nil) (if caller nil (setq caller this-command)) (let ((extra-sources (plist-get ivy--sources-list caller))) (if extra-sources (progn (setq ivy--extra-candidates nil) (let ((--dolist-tail-- extra-sources)) (while --dolist-tail-- (let (...) (cond ... ...) (setq --dolist-tail-- ...))))) (setq ivy--extra-candidates '((original-source))))) (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (transformer-fn (plist-get ivy--display-transformers-list (cond (caller) ((functionp collection) collection)))) (ivy-display-function (if (or ivy-recursive-last (not (window-minibuffer-p))) (progn (or ivy-display-function (ivy-alist-setting ivy-display-functions-alist caller))))) (height (ivy--height caller))) (setq ivy-last (record 'ivy-state prompt collection predicate require-match initial-input history preselect keymap (if (eq update-fn 'auto) #'(lambda nil (funcall ... ...)) update-fn) sort (selected-frame) (selected-window) (current-buffer) nil action unwind re-builder matcher dynamic-collection transformer-fn default-directory caller nil def)) (ivy--reset-state ivy-last) (prog1 (unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil ... ...)) (unwind-protect (progn (add-hook ... setup-hook) (let* ... ... ... ...)) (remove-hook 'minibuffer-setup-hook setup-hook))) (put 'post-command-hook 'permanent-local nil) (remove-hook 'post-command-hook #'ivy--queue-exhibit) (let ((cleanup (ivy--display-function-prop :cleanup))) (if (functionp cleanup) (progn (funcall cleanup)))) (if (setq unwind (progn (or ... ...) (aref ivy-last 16))) (progn (funcall unwind))) (ivy--pulse-cleanup) (if (eq ivy-exit 'done) nil (ivy-recursive-restore))) (ivy-call) (ivy--remove-props (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... ivy-last))) (aref ivy-last 23)) 'idx))))
  (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:predicate :require-match :initial-input :history :preselect :def :keymap :update-fn :sort :action :unwind :re-builder :matcher :dynamic-collection :caller :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:predicate :requir..." (car --cl-keys--)))))) (progn (let ((extra-actions (cl-delete-duplicates (append (plist-get ivy--actions-list t) (plist-get ivy--actions-list this-command) (plist-get ivy--actions-list caller)) :key #'car :test #'equal))) (if extra-actions (progn (setq action (cond (... ...) (... ...) (t ...)))))) (setq ivy-marked-candidates nil) (if caller nil (setq caller this-command)) (let ((extra-sources (plist-get ivy--sources-list caller))) (if extra-sources (progn (setq ivy--extra-candidates nil) (let ((--dolist-tail-- extra-sources)) (while --dolist-tail-- (let ... ... ...)))) (setq ivy--extra-candidates '((original-source))))) (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (transformer-fn (plist-get ivy--display-transformers-list (cond (caller) (... collection)))) (ivy-display-function (if (or ivy-recursive-last (not ...)) (progn (or ivy-display-function ...)))) (height (ivy--height caller))) (setq ivy-last (record 'ivy-state prompt collection predicate require-match initial-input history preselect keymap (if (eq update-fn 'auto) #'(lambda nil ...) update-fn) sort (selected-frame) (selected-window) (current-buffer) nil action unwind re-builder matcher dynamic-collection transformer-fn default-directory caller nil def)) (ivy--reset-state ivy-last) (prog1 (unwind-protect (let ((fun ...) setup-hook) (setq setup-hook #'...) (unwind-protect (progn ... ...) (remove-hook ... setup-hook))) (put 'post-command-hook 'permanent-local nil) (remove-hook 'post-command-hook #'ivy--queue-exhibit) (let ((cleanup ...)) (if (functionp cleanup) (progn ...))) (if (setq unwind (progn ... ...)) (progn (funcall unwind))) (ivy--pulse-cleanup) (if (eq ivy-exit 'done) nil (ivy-recursive-restore))) (ivy-call) (ivy--remove-props (progn (or (and ... t) (signal ... ...)) (aref ivy-last 23)) 'idx)))))
  (let* ((predicate (car (cdr (plist-member --cl-rest-- ':predicate)))) (require-match (car (cdr (plist-member --cl-rest-- ':require-match)))) (initial-input (car (cdr (plist-member --cl-rest-- ':initial-input)))) (history (car (cdr (plist-member --cl-rest-- ':history)))) (preselect (car (cdr (plist-member --cl-rest-- ':preselect)))) (def (car (cdr (plist-member --cl-rest-- ':def)))) (keymap (car (cdr (plist-member --cl-rest-- ':keymap)))) (update-fn (car (cdr (plist-member --cl-rest-- ':update-fn)))) (sort (car (cdr (plist-member --cl-rest-- ':sort)))) (action (car (cdr (plist-member --cl-rest-- ':action)))) (unwind (car (cdr (plist-member --cl-rest-- ':unwind)))) (re-builder (car (cdr (plist-member --cl-rest-- ':re-builder)))) (matcher (car (cdr (plist-member --cl-rest-- ':matcher)))) (dynamic-collection (car (cdr (plist-member --cl-rest-- ':dynamic-collection)))) (caller (car (cdr (plist-member --cl-rest-- ':caller))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '...) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:predicate :requir..." (car --cl-keys--)))))) (progn (let ((extra-actions (cl-delete-duplicates (append ... ... ...) :key #'car :test #'equal))) (if extra-actions (progn (setq action (cond ... ... ...))))) (setq ivy-marked-candidates nil) (if caller nil (setq caller this-command)) (let ((extra-sources (plist-get ivy--sources-list caller))) (if extra-sources (progn (setq ivy--extra-candidates nil) (let (...) (while --dolist-tail-- ...))) (setq ivy--extra-candidates '(...)))) (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (transformer-fn (plist-get ivy--display-transformers-list (cond ... ...))) (ivy-display-function (if (or ivy-recursive-last ...) (progn ...))) (height (ivy--height caller))) (setq ivy-last (record 'ivy-state prompt collection predicate require-match initial-input history preselect keymap (if (eq update-fn ...) #'... update-fn) sort (selected-frame) (selected-window) (current-buffer) nil action unwind re-builder matcher dynamic-collection transformer-fn default-directory caller nil def)) (ivy--reset-state ivy-last) (prog1 (unwind-protect (let (... setup-hook) (setq setup-hook ...) (unwind-protect ... ...)) (put 'post-command-hook 'permanent-local nil) (remove-hook 'post-command-hook #'ivy--queue-exhibit) (let (...) (if ... ...)) (if (setq unwind ...) (progn ...)) (ivy--pulse-cleanup) (if (eq ivy-exit ...) nil (ivy-recursive-restore))) (ivy-call) (ivy--remove-props (progn (or ... ...) (aref ivy-last 23)) 'idx))))))
  ivy-read("M-x " [0 0 ansi-color-apply-overlay-face isearch--state-pop-fun--cmacro locals 0 kinsoku xselect--int-to-cons input-method-verbose-flag url-setup-privacy-info counsel-alias-expand junet-dos help-variable 0 0 0 0 dired-backup-diff separator-prog defun-prompt-regexp _message 0 dired-at-point pulse-momentary-highlight-region cl-print--preprocess ivy-sort-file-function-default selinux-context byte-compile-function-warn memory-use-counts DXT1 0 0 xref-w-dedicated being 0 0 dired-before-readin-hook ibuffer-update cl--loop-initially \' 0 M-kp-down * + muletibetan-2 - 0 / cl-structure-object 0 ...] :predicate (closure ((externs) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring company-common company-point company-candidates t) (sym) (and (commandp sym) (not (get sym 'byte-obsolete-info)))) :require-match t :history counsel-M-x-history :action (closure ((externs) (initial-input) smex-ido-cache smex-initialized-p amx-cache amx-initialized info-lookup-mode find-tag-marker-ring company-common company-point company-candidates t) (cmd) (setq cmd (intern cmd)) (cond ((and (boundp 'amx-initialized) amx-initialized) (amx-rank cmd)) ((and (boundp 'smex-initialized-p) smex-initialized-p) (smex-rank cmd))) (setq prefix-arg current-prefix-arg) (setq this-command cmd) (setq real-this-command cmd) (command-execute cmd 'record)) :sort t :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  (let ((externs (counsel--M-x-externs))) (ivy-read (counsel--M-x-prompt) (or externs obarray) :predicate (and (not externs) #'(lambda (sym) (and (commandp sym) (not (get sym ...))))) :require-match t :history 'counsel-M-x-history :action #'(lambda (cmd) (setq cmd (intern cmd)) (cond ((and (boundp ...) amx-initialized) (amx-rank cmd)) ((and (boundp ...) smex-initialized-p) (smex-rank cmd))) (setq prefix-arg current-prefix-arg) (setq this-command cmd) (setq real-this-command cmd) (command-execute cmd 'record)) :sort (not externs) :keymap counsel-describe-map :initial-input initial-input :caller 'counsel-M-x))
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)
@abo-abo abo-abo closed this in ba849e5 Apr 11, 2019
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Apr 11, 2019

Thanks.

astoff added a commit to astoff/swiper that referenced this issue Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants