this post was submitted on 14 Sep 2023
3 points (100.0% liked)

Emacs

312 readers
3 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

In my init-File I have the cursor-type set to 'box. Still, when I open an org-file, the cursor is automatically set to 'bar. If I change the major mode to outline-mode, it is set to 'box, and when I change it back to org-mode, it is set to 'bar.

I tried region-evaluate on the line (setq cursor-type 'box) in an org-file, and the cursor changes to 'box. But I would like to have it set to box right away through init.el.

My theme is modus-operandi-tinted, and I looked there, but it just sets the color of the cursor, not its form. Could it be that setq cursor-type is not respected by org-mode?

(I use mixed-pitch mode.)

Thank you very much for any help!

top 2 comments
sorted by: hot top controversial new old
[–] yantar92 2 points 1 year ago (1 children)

Could it be that setq cursor-type is not respected by org-mode?

Org mode does not change cursor type in Org buffers. I recommend checking your hooks.

[–] Titus 3 points 1 year ago

Thank you for your advice and for looking into this!

I went through all the hooks, they just start:

org-superstar-mode
prettify-symbols-alist
org-auto-tangle-mode
typo-mode

But I commented out almost everything in my config and found out it has to do with mixed-pitch. The solution:

  (use-package mixed-pitch
    :config
    (setq mixed-pitch-variable-pitch-cursor 'box))

When no setting is done, mixed-pitch automatically sets the cursor to 'bar. So my setting it to 'box by cursor-type was of no use for my org-mode buffers (with mixed-pitch). Phew! Now it works as I like it.

Thanks again for your quick answer. It's great that everything can be set to one's liking in Emacs.