Git Product home page Git Product logo

Comments (17)

minad avatar minad commented on July 20, 2024 3

Yes, this is a known issue. org-indent-mode is currently incompatible with org-modern-mode. This is wontfix for now since org-indent-mode adjusts the line-prefix text properties which are also used by org-modern-mode. Not sure if it is possible to make this work. To be honest, I consider org-indent-mode a waste of space and not modern at all. ;)

EDIT: The issue has been fixed in e13be0f.

from org-modern.

ParetoOptimalDev avatar ParetoOptimalDev commented on July 20, 2024 3

how org lives in the dark ages without org-indent-mode: syl20bnr/spacemacs#2732

I actually had to begrudingly choose org-indent-mode over org-modern-mode just now for this incompatibility. I'll have to try @jdtsmith's package later and evaluate if I'm okay with no line-spacing everywhere.

Dark ages might be a little much, but the hierarchy that org-indent-mode adds is probably one of the things that makes org-mode most understandable to me.

from org-modern.

trev-dev avatar trev-dev commented on July 20, 2024 2

Perhaps if org-modern-mode implemented its own visual solution to level indentation? The reason I'd ask for this is because the indentation level is how I easily appreciate how many levels deep I actually am.

I don't have to think about what symbol precedes the text, or what color that headline is and try to remember 6 variations thereof and eventually surrender to un-hiding the leading asterisks.

from org-modern.

tshu-w avatar tshu-w commented on July 20, 2024 2

The indentation does exist, but there is still a problem with the indentation at the body (compare org-super-star).
See level 1, level 2, level 3 in the screenshot, they should be aligned with the heading.
Screen Shot 2022-08-04 at 15 19 25

from org-modern.

minad avatar minad commented on July 20, 2024 1
  1. Good point, I hadn't thought of line spacing. Some fonts have more vertical breathing room, so that could be a workaround.

That's not a good workaround. We shouldn't restrict ourselves to only such fonts. As I wrote, the only proper solution is to use display trickery. But it is a pain, in particular the corners.

2.This is definitely only for users of org-indent. Without indent enabled, the fringe solution already in modern is clearly superior (and saves space).

Sure. My second point only explains why I use the fringe. I had tried inserting characters as alternative and I didn't like it because of the indentation. However I think the fringe solution only looks nice if you use large frame borders and window dividers as in Nicolas Rougier's Nano themes.

Anyway, if we figure out a proper solution for 1. we can add this to org-modern itself, such that org-modern is more compatible with org-indent. It would be nice if we can achieve consistent looks for both cases (fringe vs non-fringe).

from org-modern.

Jackson-soft avatar Jackson-soft commented on July 20, 2024

same question

from org-modern.

mrunhap avatar mrunhap commented on July 20, 2024

block's indent guide line also didn't show in org-indent-mode, I choose disable org-indent-mode.

from org-modern.

minad avatar minad commented on July 20, 2024

@404CN Yes, org-indent-mode is quite problematic. It is an intrusive mode which breaks all kinds of other modes. I never used org-indent-mode since it always felt a bit unpredictable. Therefore it is okay if org-modern cannot be made to work with it. I will still keep this issue open in case someone finds a solution. But for example the nice org-modern source blocks use the fringe. If you indent the block, it won't look good.

In case someone wants to debug this:

  1. Go to the org-modern customization
  2. Turn off all options
  3. Enable the org modern styling one by one to figure out the style elements which are problematic with org-indent-mode.
  4. Maybe it is possible to figure out a solution on a case by case basis.

from org-modern.

minad avatar minad commented on July 20, 2024

For reference, here is a heated discussion on how horrible org-indent-mode is and how org lives in the dark ages without org-indent-mode: syl20bnr/spacemacs#2732 😆

from org-modern.

minad avatar minad commented on July 20, 2024

I fiddled a bit around and made org-modern-mode slightly less intrusive. But it seems impossible to make these modes cooperate nicely in all scenarios, since org-indent-mode is quite a bulldozer. I recommend to turn of org-indent-mode if you want to use org-modern-mode.

from org-modern.

stefan2904 avatar stefan2904 commented on July 20, 2024

appreciate the effort.

do you think it is possible to build something like a modern org-indent-mode?

from org-modern.

minad avatar minad commented on July 20, 2024

I think it should be possible to make org-modern-mode more compatible with org-indent-mode by not using the fringe for source blocks. It needs a bit of work. Currently org-modern-mode doesn't aim for full compatibility. You can use some of the org-modern style elements with org-indent-mode without issues, but not all of them.

from org-modern.

jdtsmith avatar jdtsmith commented on July 20, 2024

I quite like org-modern, and I quite like org-indent. So I co-opted the latter's use of line-prefix and wrap-prefix to approximate the block-styling of the former:

https://github.com/jdtsmith/org-modern-indent/

Works well for me; happy for any feedback. I'm not a deep org user, so I'm not sure what else org-indent-mode currently breaks in org-modern, with the recent workarounds @minad implemented.

from org-modern.

minad avatar minad commented on July 20, 2024

@jdtsmith The kind of cooperation you implemented between indent mode and modern mode is nice. There are two downsides of your approach:

  1. It does not handle line-spacing>0 well. I usually increase line-spacing since I like if Emacs doesn't look so dense. It should be possible to fix this with some display/image trickery instead of box drawing characters.
  2. Using prefix characters (line prefixes) indents the source blocks by one character. For non-indent users this is not so nice since everything appears shifted. By using the fringe, this problem doesn't occur. For org-indent-mode users this is of course not an issue.

For these two reasons I went with the current fringe solution.

from org-modern.

jdtsmith avatar jdtsmith commented on July 20, 2024

Thanks @minad.

  1. Good point, I hadn't thought of line spacing. Some fonts have more vertical breathing room, so that could be a workaround.
  2. This is definitely only for users of org-indent. Without indent enabled, the fringe solution already in modern is clearly superior (and saves space).

from org-modern.

Andre0991 avatar Andre0991 commented on July 20, 2024

Just FYI, strangely, I cannot reproduce this issue. The indentation is kept when using org-modern.

My (non minimal) org config:

(use-package org
  :defer t
  :custom
  (org-startup-indented t)
  (org-confirm-babel-evaluate nil)
  (org-special-ctrl-a/e t)
  (org-hide-emphasis-markers t)
  (org-pretty-entities t)
  (org-ellipsis ""))

(use-package org-modern
  :init
  (add-hook 'org-mode-hook #'org-modern-mode))

Emacs and org versions:

GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H2)) of 2022-07-24

Org mode version 9.5.4 (release_9.5.4-3-g6dc785 @ /usr/local/Cellar/emacs-plus@29/29.0.50/share/emacs/29.0.50/lisp/org/)

from org-modern.

Andre0991 avatar Andre0991 commented on July 20, 2024

Got it. Indeed, it's misaligned here too. I hadn't noticed because it was less apparent on the other file I was working on.

from org-modern.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.