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

:generated-predicate does not return result? #135

Open
indigoviolet opened this issue Sep 24, 2022 · 0 comments
Open

:generated-predicate does not return result? #135

indigoviolet opened this issue Sep 24, 2022 · 0 comments

Comments

@indigoviolet
Copy link

persp-mode.el/persp-mode.el

Lines 1418 to 1424 in 67be9fe

(unless noquote (setq items-list `',items-list)))
(let* ((cnd `(cl-member-if
#'(lambda (item)
(setq cond-result
,(if all
`(not ,condition)
condition)))

I'm an elisp noob, but here's the :generated-predicate for one of my auto perspectives:

(lambda
    (buffer &rest rest-args)
    (when
        (buffer-live-p buffer)
        (with-current-buffer buffer
            (let
                (cond-result)
                (when
                    (cl-member-if
                        #'(lambda
                              (item)
                              (setq cond-result
                                  (cond
                                      ((symbolp item)
                                          (eq item major-mode))
                                      ((persp-regexp-p item)
                                          (persp-string-match-p item
                                              (symbol-name major-mode)))
                                      (t nil))))
                        '(vterm-mode))
                    (car rest-args))))))

This predicate returns nil on vterm-mode buffers, and it seems to be because cond-result is never returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant