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

"Note: file is write protected" message when source file is read-only #338

Open
l2dy opened this issue Feb 13, 2024 · 0 comments
Open

"Note: file is write protected" message when source file is read-only #338

l2dy opened this issue Feb 13, 2024 · 0 comments

Comments

@l2dy
Copy link

l2dy commented Feb 13, 2024

When I try to run helpful-callable(let*) for the first time, I get a "Note: file is write protected" message in minibuffer. The backtrace captured shows that helpful--open-if-needed is trying to open a file in /nix/store, which is read-only by design in Nix package manager.

  after-find-file(nil t)
  find-file-noselect-1(#<buffer eval.c> "/nix/store/wl840kj5v3f17ns5p685g1p61xdk7sc0-emacs-..." nil nil "/nix/store/wl840kj5v3f17ns5p685g1p61xdk7sc0-emacs-..." (55171408 64512))
  find-file-noselect("/nix/store/wl840kj5v3f17ns5p685g1p61xdk7sc0-emacs-nox-29.1/share/emacs/29.1/src/eval.c")
  helpful--open-if-needed("/nix/store/wl840kj5v3f17ns5p685g1p61xdk7sc0-emacs-...")
  helpful--definition(let* t)
  #<subr helpful-update>()
  apply(#<subr helpful-update> nil)
  helpful-update()
  helpful--update-and-switch-buffer(let* t)
  helpful-callable(let*)
  funcall-interactively(helpful-callable let*)
  command-execute(helpful-callable)

I have applied the following workaround in my config to suppress this message, but overriding noninteractive could have side effects, so I'm looking for a proper fix upstream.

(after! helpful
  (defadvice! doomd--supress-helpful-open-buffer-noise (fn &rest args)
    :around #'helpful--open-if-needed
    (let ((noninteractive t))
      (apply fn args))))
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