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

jupyter-repl-mode handle yank-excluded-properties t #408

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tgbugs
Copy link
Contributor

@tgbugs tgbugs commented Aug 16, 2022

The value of yank-excluded-properties' can be t, in which case it is not possible to remq' 'field, causing an error. This fix will allow the mode to
start, but does not handle the fact that the 'field property is still stripped.

@tgbugs
Copy link
Contributor Author

tgbugs commented Dec 8, 2022

A better fix might include the following.

(setq-local yank-excluded-properties
              (remq 'field 
                    (or
                     (and (listp yank-excluded-properties)
                          yank-excluded-properties)
                     ;; if the user sets `yank-excluded-properties' to t we cannot recover
                     ;; the default list of properties, so it is reproduced here for consistency
                     '(category field follow-link fontified font-lock-face help-echo
                       intangible invisible keymap local-map mouse-face read-only yank-handler))))

The value of `yank-excluded-properties' can be t, in which case it is not
possible to `remq' 'field, causing an error. This fix will allow the mode to
start, but does not handle the fact that the 'field property is still stripped.
The previous fix changed the behavior so that field was always
excluded. We now restore the default list for jupyter mode buffers so
that field will make it through as expected. There is no way to get
all text properties so we reproduce the list from simple.el
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

Successfully merging this pull request may close these issues.

1 participant