all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] Incorrect indentation when there are invisible/diplay properties on the line [9.6.7 ( @ /home/huzf/.cache/emacs_configs/default/elpa.28/org-9.6.7/)]
@ 2023-07-10 15:22 Hammer Hu
  2023-07-11 11:28 ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Hammer Hu @ 2023-07-10 15:22 UTC (permalink / raw)
  To: emacs-orgmode

--text follows this line--

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
Hi there,

I found this problem when indenting a region with `org-adapt-indentation=t'
and `org-modern-mode' is turned on. I initially posted this issue on the
issue tracker of `org-modern'
[[https://github.com/minad/org-modern/issues/144]], but as the author
suggested, I need to turn to the `org' side. Below is the problem.

When `org-modern' is installed and `org-modern-mode' is enable in a
buffer, the fontification is augmented. See
[[https://raw.githubusercontent.com/minad/org-modern/screenshots/example.gif]]
for a demonstration.  But when I have `org-modern-mode' turned on,
`org-adapt-indentation' to be `t', and indent some region, it becomes:

#+begin_quote
** A level-2 heading
   something

   something

            #+begin_quote
a block
            #+end_quote

and something
#+end_quote

While it should become:

#+begin_quote
** A level-2 heading
   something

   something

   #+begin_quote
   a block
   #+end_quote

   and something
#+end_quote

Here is the reply from minad (author of `org-modern'):

#+begin_quote
Thanks. I can reproduce the problem. It seems that `org-indent-region'
or `org-indent-line' has issues computing the indentation if there are
invisible/diplay properties on the line. This is not something we can
fix in org-modern, since `org-modern' only augments the fontification
and does not override indentation functionality. It should be repaired
in Org directly if even - maybe ask on the Org issue tracker? I suggest
you either don't use `org-adapt-identation' or set
`org-modern-block-name' to nil. With `org-modern-block-name=nil' the
issue also seems to go away.
#+end_quote

Best
-----

Emacs  : GNU Emacs 28.2.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6)
 of 2023-01-07
Package: Org mode version 9.6.7 ( @ /home/huzf/.cache/emacs_configs/default/elpa.28/org-9.6.7/)

current state:
==============
(setq
 org-archive-location "/home/huzf/org/personal/archive.org::* Archive"
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300\x01\236A\207" [:title] 3 "\n\n(fn ENTRY)"]
 org-log-done t
 org-startup-folded 'content
 org-agenda-files '("/home/huzf/org/personal/todo.org"
                    "/home/huzf/org/personal/inbox.org"
                    "/home/huzf/org/personal/archive.org")
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-refile-targets '((nil :maxlevel . 5) (org-agenda-files :maxlevel . 5))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe
                            org-babel-header-arg-expand)
 org-default-notes-file "/home/huzf/org/personal/inbox.org"
 org-refile-use-outline-path 'file
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
                  org-cycle-optimize-window-after-visibility-change
                  org-cycle-display-inline-images)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-mode-hook '(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_4>
                 #[0 "\300\301\302\303\304$\207"
                   [add-hook change-major-mode-hook org-fold-show-all append
                    local]
                   5]
                 #[0 "\300\301\302\303\304$\207"
                   [add-hook change-major-mode-hook org-babel-show-result-all
                    append local]
                   5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes
                 org-modern-mode)
 org-agenda-clockreport-parameter-plist '(:link t :maxlevel 3)
 org-confirm-shell-link-function 'yes-or-no-p
 org-reveal-start-hook '(org-decrypt-entry)
 org-adapt-indentation t
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-agenda-mode-hook '((closure (t) nil
                         (add-hook 'window-configuration-change-hook
                          'org-agenda-align-tags nil t)
                         )
                        )
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-agenda-after-show-hook '(org-show-entry)
 org-edit-timestamp-down-means-later t
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
                     org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-window-setup 'current-window
 org-tags-exclude-from-inheritance '("crypt")
 org-hide-leading-stars t
 org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)")
                     (sequence "PROJECT(p)" "|" "DONE(d!/!)" "CANCELLED(c@/!)")
                     (sequence "WAITING(w@/!)" "DELEGATED(e!)" "HOLD(h)" "|"
                      "CANCELLED(c@/!)")
                     )
 org-support-shift-select t
 org-modern-block-name nil
 org-speed-command-hook '(org-speed-command-activate
                          org-babel-speed-command-activate)
 org-modern-hide-stars nil
 org-modern-mode-hook '(org-modern-mode-set-explicitly)
 org-fold-core-isearch-open-function 'org-fold--isearch-reveal
 org-cite-export-processors '((beamer natbib) (latex biblatex) (csl csl))
 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
                      org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(org-decrypt-entries)
 org-agenda-loop-over-headlines-in-active-region nil
 org-todo-keyword-faces '(("NEXT" :inherit warning)
                          ("PROJECT" :inherit font-lock-string-face))
 org-cite-global-bibliography '("/home/huzf/plugable/share/bib/global.bib")
 org-fold-reveal-start-hook '(org-decrypt-entry)
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow :complete
                        org-attach-complete-link)
                       ("id" :follow org-id-open)
                       ("eww" :follow org-eww-open :store org-eww-store-link)
                       ("rmail" :follow org-rmail-open :store
                        org-rmail-store-link)
                       ("mhe" :follow org-mhe-open :store org-mhe-store-link)
                       ("irc" :follow org-irc-visit :store org-irc-store-link
                        :export org-irc-export)
                       ("info" :follow org-info-open :export org-info-export
                        :store org-info-store-link :insert-description
                        org-info-description-as-command)
                       ("gnus" :follow org-gnus-open :store
                        org-gnus-store-link)
                       ("docview" :follow org-docview-open :export
                        org-docview-export :store org-docview-store-link)
                       ("bbdb" :follow org-bbdb-open :export org-bbdb-export
                        :complete org-bbdb-complete-link :store
                        org-bbdb-store-link)
                       ("w3m" :store org-w3m-store-link)
                       ("doi" :follow org-link-doi-open :export
                        org-link-doi-export)
                       ("bibtex" :follow org-bibtex-open :store
                        org-bibtex-store-link)
                       ("file+sys") ("file+emacs")
                       ("shell" :follow org-link--open-shell)
                       ("news" :follow
                        #[514 "\301\300\302\x04Q\x02\"\207"
                          ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"]
                        )
                       ("mailto" :follow
                        #[514 "\301\300\302\x04Q\x02\"\207"
                          ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]
                        )
                       ("https" :follow
                        #[514 "\301\300\302\x04Q\x02\"\207"
                          ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]
                        )
                       ("http" :follow
                        #[514 "\301\300\302\x04Q\x02\"\207"
                          ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]
                        )
                       ("ftp" :follow
                        #[514 "\301\300\302\x04Q\x02\"\207" ["ftp" browse-url ":"]
                          6 "\n\n(fn URL ARG)"]
                        )
                       ("help" :follow org-link--open-help :store
                        org-link--store-help)
                       ("file" :complete org-link-complete-file)
                       ("elisp" :follow org-link--open-elisp))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-modern-table nil
 org-refile-allow-creating-parent-nodes 'confirm
 org-todo-repeat-to-state "NEXT"
 org-outline-path-complete-in-steps nil
 org-fast-tag-selection-single-key 'expert
 org-tags-column -80
 org-refile-target-verify-function '(closure (t) nil
                                     (not
                                      (member (nth 2 (org-heading-components))
                                       org-done-keywords)
                                      )
                                     )
 )


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-07-12 17:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-10 15:22 [BUG] Incorrect indentation when there are invisible/diplay properties on the line [9.6.7 ( @ /home/huzf/.cache/emacs_configs/default/elpa.28/org-9.6.7/)] Hammer Hu
2023-07-11 11:28 ` Ihor Radchenko
     [not found]   ` <44rsvv2dwp2cnpbikqs7kysct5ylsxivm3scirj55efm7qvwat@flec34dbbdbb>
2023-07-11 13:22     ` Ihor Radchenko
2023-07-11 13:49       ` Hammer Hu
2023-07-11 15:07         ` Ihor Radchenko
2023-07-11 15:29           ` Hammer Hu
2023-07-12  8:42             ` Ihor Radchenko
2023-07-12 17:43               ` Hammer Hu
2023-07-12 17:48                 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.