minad / org-modern Goto Github PK
View Code? Open in Web Editor NEW:unicorn: Modern Org Style
License: GNU General Public License v3.0
:unicorn: Modern Org Style
License: GNU General Public License v3.0
This fixes alignment issues with variable pitch fonts. This is not a theme issue, but see also https://gitlab.com/protesilaos/modus-themes/-/issues/85.
I think an en-dash –
looks better than the box drawing character as a replacement for hypen-minus in org-modern-list
.
Currently it seems that only the todo-keywords (TODO
, NEXT
, etc.) and progress indicators ([4/6]
) are styled when I look at the org-agenda, while the priority cookies ([#A]
, [#B]
, etc.) and the tags (e.g. :Work:@computer:
) are not.
Did I miss any user options or make some other mistake? My config is basically:
(use-package org-modern
:after org
:config (global-org-modern-mode))
;; with some of this
(defface org-todo-next
;; face config
)
;; and then this
(setq org-modern-todo-faces
'(("NEXT" . org-todo-next)
("WAIT" . org-todo-wait)
; ...
))
The example GIF looks to beautiful to be true :) When I turn on org-modern-mode
, I don't get as nice source block highlights and my variable pitch font doesn't play as nicely with the "pills" for TODO states and dates etc.
@minad Could you share the relevant config to replicate your GIF's look in an additional .el
file or in the README?
OK with:
[2022-03-01 TUE 10:42]
Not with:
[2022-03-01 TUE 10:42-11:00]
When I type C-c C-t to run org-todo, in order to add TODO to a header, I get the following error:
org-entry-get-with-inheritance: Symbol’s value as variable is void: org-property-separators
This works fine when org-modern is not loaded.
Hello!
When I update my columnview dblock with org-modern enabled, it doesn't take into account the :id local
option, so it inputs all the headings in the whole file. Deactivating org-modern-mode makes :id local work again.
#+BEGIN: columnview :format "%TODO %ITEM %CLOCKSUM{:} %EFFORT{:}" :id local
#+END: columnview
C-c C-x C-u
)Thanks!
When without org-modern, the source blocks which has spaces ahead, it shows the indentation. it looks likes this:
But after enabled org-modern-mode, the indentation spaces are gone.
Hope org-modern can keep the indentation spaces.
I really like org-modern, really awesome work. Thanks very much. @minad
The command org-table-toggle-coordinate-overlays
(accessible from C-c }) doesn't work well with org-modern.
and activate the coordinate overlays, we get:
As you can see:
$1
, $2
and $3
)I*1
)Here is the result without org-modern:
Reading through the documentation, it seems font choice is important. Might be nice to add section to read me or a wiki page of fonts known to work well.
Just a thought. Have not tried out the package myself.
I suggest to keep a little indentation space before org heading stars.
(defun org-modern--star ()
"Prettify headline stars."
(let ((level (- (match-end 1) (match-beginning 1))))
(put-text-property
(match-beginning 2)
(match-end 2)
'display
(concat (make-string level ?\ )
(aref org-modern-star (min (1- (length org-modern-star)) level))))))
Here is it looks like:
Hello Daniel!
On my end (Emacs 29) the org-modern-agenda
does not work as intended
for entries in the org-agenda-custom-commands
. You can try it with
the default C-c a n
sequence (agenda and all TODOs).
The problem is that the org-done-keywords-for-agenda
and
org-todo-keywords-for-agenda
are not set properly. For my custom
views, both remain nil. For C-c a n
only the org-done-keywords
captures the relevant words.
hi how to use emacs?
Nice package! I wonder how to change the colors of TODO statuses. They are altered when I use org-modern.
Thanks!
Apologies for the dumb question, but I seem to remember that there's a name for this... it's not "gutter", but similar. I suspect an interaction with my config. I'm using the modus vivendi
theme.
Org datestamps can include components that control when an item appears on the agenda, such as DEADLINE: <2022-03-07 Mon -0d>
(which says that the item should not appear until the very day it's due). org-modern
seems to get tripped up by such things. At least, the display doesn't treat that component the way I would have expected (probably just with one styling for the entire datestamp). See screenshot.
Hi, thanks for this package, makes life much beautiful! :)
What is the best way to disable the use of variable pitch for modern style labels? My variable pitch font (ETBembo) is too convoluted for labels, and I'd like labels to stay fixed width...
Turning SCHEDULED:
, DEADLINE:
, and CLOSED:
into icons would be pretty nice. Possible also drawer titles?
Shows modern style with timestamp in English:
[2022-03-01 TUE 10:42]
But no in Chinese:
[2022-03-01 周二 10:42]
Or is there a way to configure it?
Hello.
I was trying to install org-modern
via use-package
(as well as the emacs' package-install
), but got an error message:
Debugger entered--Lisp error: (file-error "http://melpa.org/packages/org-modern-20220325.1506..." "Not found")
Is this package still available?
In the introduction screenshot on the readme.org page, the bracket next to src blocks looks like a tall [ character with corners on the top and bottom. However, I'm seeing this rendered without the corners on the top and bottom: more like a tall | character.
I tried looking for a way to customize this without success. So I next tried running the provided emacs -Q minimum setup code to reproduce this kind of image, and found the same problem: with these brackets still looking like | rather than [.
I'm using GNU Emacs 28.1 on a Mac... and will be interested to hear if there are other variables that might account for this difference. Or if there is anything that I can try doing to change these |s into [s, I'll be interested to hear. Thanks.
Hello Daniel. Congratulations for doing this and thanks for sharing!
Basically what the title says: org-modern-mode
does not restore the line-spacing
after it is disabled.
Hello Daniel!
There is an issue with aligning tables when a cell includes a time
stamp. This is particularly common with clock tables. Those basically
are what you get when you keep track of how much time you spend on a
task.
Here is a demo file with such a report:
* DONE Testing the thing
CLOSED: [2022-02-23 Mon 18:10] SCHEDULED: <2022-02-23 Mon 17:22>
:LOGBOOK:
- State "DONE" from "TODO" [2022-02-23 Mon 18:10]
CLOCK: [2022-02-23 Mon 17:23]--[2022-02-23 Mon 18:10] => 0:47
:END:
* DONE Another test
CLOSED: [2022-02-23 Mon 15:03] SCHEDULED: <2022-02-23 Mon 14:41>
:LOGBOOK:
- State "DONE" from "TODO" [2022-02-23 Mon 15:03]
CLOCK: [2022-02-23 Mon 15:03]--[2022-02-23 Mon 16:08] => 1:05
:END:
#+BEGIN: clocktable :formula % :timestamp t :sort (1 . ?a) :link t :tstart "<-1m>" :tend "<now>" :scope nil
#+CAPTION: Clock summary at [2022-02-23 Wed 21:37]
| Timestamp | Headline | Time | % |
|------------------------+-------------------+--------+-------|
| | *Total time* | *1:52* | 100.0 |
|------------------------+-------------------+--------+-------|
| <2022-02-23 Mon 14:41> | [[file:/home/prot/testing.org::*Another test][Another test]] | 1:05 | 58.0 |
| <2022-02-23 Mon 17:22> | [[file:/home/prot/testing.org::*Testing the thing][Testing the thing]] | 0:47 | 42.0 |
#+END:
[ There is also the double hyphen between timestamps, but we can check
that separately. ]
The nicely rendered date+timestamp blocks now act as a single character that the cursor jumps over, so I can no longer shift + up arrow to increment the hours/minutes/day anymore. Is there a way to still allow this while rendering it nicely? Or otherwise disable the fancy rendering temporarily when point is on it, like what org-appear does?
I am getting wrong formatting on the tables, the lines are not aligned, looks pretty ugly. Any idea how to fix it?
Hi, thanks for this package. I have been using this for quite a well and it proved stable and beautiful.
However, when inserting source block below a plain list item, I noticed that the spaces before the displayed "src" are made invisible.
In my opinion, spaces should be kept to maintain indentation consistency.
To reproduce
- item
#+begin_src python
print("hello")
#+end_src
Put this in an org file and activate org-modern-mode to see that spaces before #+ disappear and space before the code stays.
The variable Org Modern Priority prints garbage, maybe because my machine lacks a necessary fonts, but which?
C-h v org-modern-priority, customize:
Hide Org Modern Priority:
Alist:
INS DEL Character: A String: 🅐
INS DEL Character: B String: 🅑
INS DEL Character: C String: 🅒
INS
State : STANDARD. List of priority label replacements. Hide Set to nil to disable styling priorities. Groups: Org Modern
I've seen that your example uses letters in a circle for priorities, but how to get them?
Good day Daniel!
Some ideas for this package after a few days of using it with its
current defaults:
variable-pitch
optional.org-modern-priority
do not work well with allorg-mode already has a variable to define the color of the TODO keywords faces: org-todo-keywords-faces
; it would be nice to use that if org-modern-todo-faces
is nil
With point on a heading, if I type C-a
then point jumps to the end of the previous line, so one character further than it should.
Good day, Daniel.
Org-modern seems to have trouble fontifying "timed" dates with a
non-default org-time-stamp-custom-formats when in the Tamil locale
environment. To reproduce,
After step 7, the timestamp has a diacritic character left over in the
light grey box so there's an off-by-one error somewhere? See
screenshot at http://0x0.st/oNgk.png
The diacritic character is always from the first letter; in the
screenshot, it is: பு (ப + ு).
The default timestamp format has no such problems.
EDIT: The problem has nothing to do with the locale. If I use the en_GB.utf8 locale, the "left-over" text is "d", and the left-over text always seems to be the third character of the weekday.
As title, I found out that + character is fontified by org-modern in src block.
If I start emacs with emacs -Q, and then run the code in the emacs -Q example, I get the error:
eval-buffer: Symbol’s function definition is void: modus-themes-load-operandi
Someone new to emacs will be confused by that.
I'm seeing a weird display artifact when I edit the bottom line (item two) in the below example:
* header
*** item one
*** item two
In this case, after every single edit of the "item two" line, the indent for item one vanishes (i.e. the whole line shifts left), and then is restored to the correct position about one second later.
Hi, first of all, thanks for the great package.
I found that the org-modern-mode
breaks the org-indent-mode
. Here is a screenshot of an org-mode buffer with org-indent-mode
being t
and org-modern-mode
being nil
.
Then if I set org-modern-mode
to t
, it becomes this. Note that the indentation disappeared (org-indent-mode
is still t
).
More strangely, when I edit the buffer, the indentation got on and off unpredictably.
Is this a bug?
Consider this buffer:
** A
^L
** B
Then, at the beginning of buffer, type
C-x n p
(narrow to page)M-x org-modern-mode
(to activate)C-u 1 C-x n p
(narrow to next page)M-x org-modern-mode
(to deactivate)C-x n w
(widen)Then the headline B will not be styled when org-modern-mode
is activated and headline A will not be destyled when org-modern-mode
is deactivated.
Hello @minad,
Thank you for such a wonderful package. Org does look great with your package! Kudos to you!
One minor niggle I faced was with the global-hl-line-mode
set to t
.
When I take the cursor to the line with the timestamps
I work with modus-operandi
as my theme. AFAIK, I have customized the variable-pitch faces.
Please let me know if you need any other info from me to help solve this for us.
Thanks and have a nice day!
Bala
Hi,
As far as I understand, literal example blocks in org-mode (#+begin_example
) are meant for text that does not receive any markup. However, org-modern renders a "column" of pipes like
|
|
|
as if it was part of a table (i.e. with a solid vertical line), even in literal example blocks. Is this the intended behavior?
Thanks for the great package(s)!
While using C-a a n
, no agenda styling, although enabled org-modern-global-mode
.
BTW: The name org-modern-global-mode
is confusing to me 😢
Take a heading that looks like,
* Heading :: test one two :test:
Here, the tag is "test" but "test one two" are also fontifed as tags.
Screenshot: http://0x0.st/oNh7.png
In the System Crafters video about your packages you mentioned maybe implementing pixel perfect alignment. I was curious so I came here to search for an issue and found you mentioned it in #5, but there's no issue for it alone.
So I'm creating this issue to ask for myself and any future interested parties. It's fine if the answer is "no, this is wayyy to difficult and not worth it", thanks for this awesome package.
aside: I was trying to create something similar using the nano icons that came out and I stopped because of how much of a pain handling all the cases were, so I very much appreciate such a simple package that improves QoL so much 😄
Hi!
I have this config in doom
(setq doom-font (font-spec :family "Hack" :size 13)
doom-variable-pitch-font (font-spec :family "Roboto" :size 13)
doom-unicode-font (font-spec :family "Hack")
doom-big-font (font-spec :family "Hack"))
When I load org-modern
all the timestamps and tags look extremely small which is hard to see.
This is the normal state for comparison
How could I increase the font size in the “modernized” parts?
Thanks.
I'm on the latest revision of the emacs and for some reason, the horizontal rule is not visible. Here is how I did configure the package.
I can confirm that I don't see a horizontal rule even when using the minimal config listed in the README.md.
Config
(use-package! org-modern
:custom
(org-modern-horizontal-rule t)
(org-modern-keyword ">")
(org-modern-table-vertical 1.0)
(org-modern-star ["I" "II" "III" "IV" "V" "VI" "VII" "VIII"])
(org-modern-todo-faces
'(("DOING" :background "orange"))))
(defadvice! org-modern--update-label-face-override ()
:override #'org-modern--update-label-face
(set-face-attribute 'org-modern-symbol nil :family "Iosevka")
(set-face-attribute org-modern-variable-pitch nil :family "Iosevka Aile")
(set-face-attribute 'org-modern-horizontal-rule nil :inherit 'italic :box 1)
(set-face-attribute 'org-modern-tag nil :inherit 'italic :box 1)
(set-face-attribute
'org-modern-label nil
:inherit org-modern-variable-pitch
:box (list :color (face-attribute 'default :background nil t)
:line-width -3)))
(add-hook! org-mode org-modern-mode)
Demonstration
Additional info
generated Jun 05, 2022 12:07:43
system Pop!_OS 22.04 LTS Linux 5.17.5-76051705-generic x86_64 x
emacs 29.0.50 master e74652386 ~/.emacs.d/ -> ~/.emacs.d/
doom 3.0.0-dev grafted, HEAD -> master, origin/master, origin/HEAD bea3cc1 2022-06-04 15:02:06 +0200 ~/.doom.d/ -> ~/.doom.d/
shell /bin/zsh
features CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
traits gui server-running envvar-file custom-file
custom connection-local-profile-alist connection-local-criteria-alist package-selected-packages
modules :completion (ivy +icons +prescient) company :ui deft doom doom-quit (emoji +unicode) hl-todo ophints (popup +defaults) vc-gutter workspaces ligatures :editor (evil +everywhere) fold multiple-cursors snippets :emacs (dired +icons) electric ibuffer undo vc :term vterm :checkers syntax :tools direnv editorconfig (eval +overlay) gist (lookup +dictionary +docsets) lsp (magit +forge) make rgb upload :os tty :lang (clojure +lsp) data emacs-lisp json (javascript +lsp) markdown nix (latex +latexmk +cdlatex +fold) (org +dragndrop +gnuplot +pomodoro +roam2) (sh +zsh) (web +css +html) (yaml +lsp) :config (default +bindings +smartparens)
packages (hl-line :disable t) (websocket) (mermaid-mode) (posframe) (org-roam-ui :recipe (:host github :repo org-roam/org-roam-ui :files (*.el out))) (org-modern :recipe (:host github :repo minad/org-modern)) (org-ref) (ob-mermaid) (yaml-mode) (polish-holidays :recipe (:host github :repo mikolajb/emacs-polish-holidays))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.