5

On my windows machine, org-indent or visual-line-mode seems to be indenting wrapped lines further than it should. It almost seems like it is double-indenting them, as the extra indentation seems to get bigger with the indentation level the text is at. Strangely enough with the same configuration, I am unable to reproduce the issue on my linux boxes.

Here are screenshots for comparison, same part of the file, only difference is one has variable-pitch-mode, the other doesn't:

With Variable Pitch: variable-pitch

With fixed pitch: enter image description here

Here is the org-mode section of my init.el:

;;*************************
;; Org Mode
;;*************************

(require 'org)

(global-set-key (kbd "C-c a") 'org-agenda)

(setq-default fill-column 100)
;; (add-hook 'org-mode-hook 'turn-on-auto-fill)
(setq org-directory "c:/Users/nmccarty/Documents/Org")
(setq org-default-notes-file (concat org-directory "/codex.org"))
(setq org-agenda-include-all-todo t)
(setq org-agenda-include-diary t)
(setq org-hide-leading-stars t)
(setq org-odd-levels-only 'nil)
(setq org-todo-keywords
      '((sequence "TODO"
                  "FEEDBACK"
                  "WORKING"
                  "PENDING" "|"
                  "DIFFERED"
                  "DELEGATED"
                  "DONE")))


;; Enable FlySpell in org-mode buffers
(add-hook 'org-mode-hook 'flyspell-mode)


;; Cross platform clipboard copying for org-mode
(when (string-equal system-type "windows-nt")
  (add-to-list 'exec-path "C:\\Users\\nmccarty\\AppData\\Local\\Programs\\Python\\Python37-32"))


;; Bind the ever-usefil org-insert-subheading
(global-set-key (kbd "H-'") 'org-insert-subheading)

;; Don't include done items in agenda view
(setq org-agenda-skip-timestamp-if-done t)
(setq org-agenda-skip-deadline-if-done t)
(setq org-agenda-skip-scheduled-if-done t)

;; Auto update agenda buffer
(defun org-agenda-redo-other-window ()
  "Call Org-Agenda-Redo from another buffer"
  (interactive)
  (let ((agenda-window (get-buffer-window "*Org Agenda*" t)))
    (when agenda-window
      (with-selected-window agenda-window (org-agenda-redo)))))
(setq agenda-timer-idle (run-with-idle-timer 15 t 'org-agenda-redo-other-window))
(setq agenda-timer (run-at-time 0 360 'org-agenda-redo-other-window))

;; Hide emphasis marks
(setq org-hide-emphasis-markers t)

;; Pretty lists
(font-lock-add-keywords 'org-mode
                        '(("^ +\\([*]\\) "
                           0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "★")))
                          ("^ +\\([-]\\) "
                           0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))
                          ("^ +\\([+]\\) "
                           0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "‣")))))

;; Pretty font
(custom-theme-set-faces
 'user
 '(variable-pitch ((t
                    (:family "Roboto" :height 105))))
 '(fixed-pitch ((t
                 (:family "Hack" :width normal :height 90)))))

;; Enable visual-line-mode and org-indent-mode

(setq org-startup-indented t)
(add-hook 'org-mode-hook 'variable-pitch-mode)
(add-hook 'org-mode-hook #'visual-line-mode)
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
(set-face-attribute 'org-hide nil :inherit 'fixed-pitch :height 90)


;; Org mode variable-pitch font
(custom-theme-set-faces
 'user
 '(org-block                 ((t (:inherit fixed-pitch))))
 '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch)))))
 '(org-property-value        ((t (:inherit fixed-pitch))) t)
 '(org-special-keyword       ((t (:inherit (font-lock-comment-face fixed-pitch)))))
 '(org-tag                   ((t (:inherit (shadow fixed-pitch) :weight bold))))
 '(org-verbatim              ((t (:inherit (shadow fixed-pitch))))))

;; Bind a key for inserting current time
(defun my/timenow ()
  (interactive)
  (org-time-stamp '(16) t))
(global-set-key (kbd "H-i") 'my/timenow)

  ;; Setup pandoc
  (when (string-equal system-type "windows-nt")
    (add-to-list 'exec-path "C:\\Program Files\\Pandoc"))
  (use-package ox-pandoc
    :ensure t)

  ;; Count words in trees and subtrees
  (use-package org-wc
    :ensure t)

  (use-package ox-clip
    :ensure t)

  ;; On windows set the diray location
  (when (string-equal system-type "windows-nt")
    (setq org-agenda-diary-file "C:/Users/nmccarty/Documents/org/diary.org"))

  ;; Dependency for org-sidebar
  (use-package org-ql
    :ensure t)

  ;; Sidebar
  (use-package org-sidebar
    :ensure t)

  ;; Show bullets as pretty utf-8 characters
(use-package org-bullets
  :ensure t
  :diminish
  :hook (org-mode . org-bullets-mode))

;; Org-Rifle
(use-package helm-org-rifle
  :ensure t
  :bind (("H-g" . helm-org-rifle-org-directory)
         ("H-s" . helm-org-rifle)))

;; Org-chef
(use-package org-chef
  :ensure t)

(setq org-capture-templates
      '(("c" "Cookbook" entry (file "c:/Users/nmccarty/Documents/Org/cookbook.org")
         "%(org-chef-get-recipe-from-url)"
         :empty-lines 1)
        ("m" "Manual Cookbook" entry (file "c:/Users/nmccarty/Documents/Org/cookbook.org")
         "* %^{Recipe title: }\n  :PROPERTIES:\n  :source-url:\n  :servings:\n  :prep-time:\n  :cook-time:\n  :ready-in:\n  :END:\n** Ingredients\n   %?\n** Directions\n\n")))

(global-set-key (kbd "H-o") 'org-capture)

I've tried various incantations and ordering of the font setting and setting org-indent to inherit from org-hide and fixed-point, to no avail.

0 Answers0