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

make-indirect-buffer not possible when mini-modeline-display-gui-line is enabled #64

Open
ashlineldridge opened this issue Oct 22, 2022 · 1 comment

Comments

@ashlineldridge
Copy link

Thanks for the cool package!

It works great except for when I tried to use org-capture which in turn calls make-indirect-buffer which is a native Emacs function.

If you set mini-modeline-display-gui-line to t you can reproduce the error by eval'ing:

;; Either open a file named `inbox.org' or change `inbox.org' to the name of a buffer you already have open..."
(make-indirect-buffer (get-buffer "inbox.org") "CAPTURE-inbox.org" 'clone)

You should get the following error:

Debugger entered--Lisp error: (void-variable make-indirect-buffer)
  (progn (defvar bootstrap-version) make-indirect-buffer)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  command-execute(eval-last-sexp)

The error originates from this block of code.

@ashlineldridge
Copy link
Author

Workaround wrapper for org-capture:

(defun my/org-capture (&optional goto keys)
  "Wrap `org-capture' to handle issue with `mini-modeline'."
  (interactive "P")
  ;; mini-modeline modifies face-remapping-alist which causes problems when
  ;; functions such as org-capture call make-indirect-buffer. Below we set
  ;; face-remapping-alist temporarily while org-capture is executed.
  (let ((face-remapping-alist nil))
    (org-capture goto keys)))

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