Re: Bug: org-adapt-indentation is not compatible with paragraph-indent-minor-mode [9.4.5 (9.4.5-16-g94be20-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)]

2022-05-29 Thread Ihor Radchenko
Vladimir Nikishkin  writes:

> This report is not about exporting Org code. It is perfectly fine that
> an empty line is required in org to demarcate a paragraph. The example
> above is just what I would imagine as an "ideal case".
> However, when `paragraph-indent-minor-mode` is turned on,
> `org-adapt-indentation` stops working, even though nothing else has
> changed. The text is exactly the same, and is valid org markup.

This is because paragraph-indent-minor-mode trashes major-mode settings
for indent-line-function. Org mode relies on indent-line-function to be
org-indent-line, which makes all the handling of `org-adapt-indentation'
among other things. paragraph-indent-minor-mode sets
indent-line-function to indent-to-left-margin instead of
org-indent-line.

I doubt that paragraph-indent-minor-mode can be changed in general way
to handle cases like this. Instead, it may be possible to implement
org-mode equivalent of paragraph-indent-minor-mode. Patches are welcome!

Meanwhile, paragraph-indent-minor-mode should be considered
incompatible.

Best,
Ihor



Re: Bug: org-adapt-indentation is not compatible with paragraph-indent-minor-mode [9.4.5 (9.4.5-16-g94be20-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)]

2021-09-26 Thread Vladimir Nikishkin
>In Org syntax namely empty line serves as paragraph separator (and two empty 
>lines to terminate list).
>As a result of exporting of Org file it should be possible to get indentation 
>instead of vertical space to represent paragraphs, however some tuning for 
>each format (ascii, html, latex) will be required.
>Would you expect from TeX that it should accept spaces in the beginning of 
>line just as empty line for paragraph separator? Org is a markup format as 
>well, so source files are not necessary should follow traditions of 
>typesetting.

This report is not about exporting Org code. It is perfectly fine that
an empty line is required in org to demarcate a paragraph. The example
above is just what I would imagine as an "ideal case".
However, when `paragraph-indent-minor-mode` is turned on,
`org-adapt-indentation` stops working, even though nothing else has
changed. The text is exactly the same, and is valid org markup.

On Tue, 7 Sept 2021 at 12:14, Vladimir Nikishkin  wrote:
>
> Hello, everyone.
>
> Basically, my bug report is roughly about the subject.
> `paragraph-indent-minor-mode` is shipped with Emacs by default (just like
> org), and its behaviour is very standard for a lot of languages. A one
> or two spaces indentation starts a new paragraph in quite a few human
> languages.
>
> However, turning on `paragraph-indent-minor-mode` seemingly disables
> org's automatic indentation to the first letter of a heading, regardless
> of `org-adapt-indentation` being set.
>
> I think that with paragraph-indent-minor-mode, paragraphs should start
> by adding "two more spaces" to the indentation, like this:
>
> #+begin_example
> * Heading one
>   First paragraph is a paragraph even if not indented.
> Second paragraph is a paragraph because indented.
>   This line belongs to the second paragraph.
>
>   Third paragraph is a paragraph even if not indented because of a
>   newline.
>
> But fourth paragraph can be indented too. And the very long line I
>   have written should be wrapped like this.
>
> ** Heading two
>  This is also a start of a paragraph.
>  This line starts a new paragraph too.
>Normal level-two indentation.
> #+end_example
>
> It would be nice if the two modes shipped with emacs were compatible, at
> least to a degree at which indentation works.
>
> Emacs  : GNU Emacs 27.1 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
> 3.24.24)
>  of 2021-02-18
> Package: Org mode version 9.4.5 (9.4.5-16-g94be20-elpaplus @ 
> /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)
>
> current state:
> ==
> (setq
>  org-icalendar-store-UID t
>  org-src-mode-hook '(#2=
>  (closure #1=
>   ((--cl-my-org-confirm-babel-evaluate-- closure #1# 
> (lang body)
> "Define by lockywolf to silence org-babel.\nLANG is 
> what is after begin_src, and BODY is ignored"
> (not
>  (or (string= lang "plantuml") (string= lang "C") 
> (string= lang "scheme") (string= lang "fortran")
>   (string= lang "f90") (string= lang "elisp") 
> (string= lang "latex") (string= lang "shell"))
>  )
> )
>(--cl-syntax-improver-- . #2#) t)
>   nil
>   (progn (message "Improving syntax for org-mode.") 
> (modify-syntax-entry 60 ".") (modify-syntax-entry 62 ".")
>(setq geiser-autodoc--inhibit t))
>   )
>  org-src-babel-configure-edit-buffer 
> org-src-mode-configure-edit-buffer)
>  org-agenda-scheduled-leaders '("Scheduled: " "Sched.%4dx: ")
>  org-after-todo-state-change-hook '(org-checklist)
>  org-latex-listings t
>  org-link-shell-confirm-function 'yes-or-no-p
>  org-babel-after-execute-hook '(org-redisplay-inline-images)
>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>  org-export-with-sub-superscripts '{}
>  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>  org-html-format-inlinetask-function 
> 'org-html-format-inlinetask-default-function
>  org-icalendar-combined-agenda-file 
> "~/Personal_Planner/Journal/org-journal-export.ics"
>  org-pretty-entities t
>  org-special-ctrl-k t
>  org-odt-format-headline-function 'org-odt-format-headline-default-function
>  org-special-ctrl-a/e t
>  org-latex-pdf-process '("latexmk -e '$biber=qq(biber --isbn-normalise)' 
> -lualatex -outdir=%o -f %f")
>  org-agenda-files '("~/Personal_Planner/Planner.org" 
> "~/Personal_Planner/notes.org"
> 
> "~/Personal_Planner/2020-04-28-hotkeys-to-remember.txt.org" 
> "/home/lockywolf/Personal_Planner/Journal/20210701")
>  org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
>  org-reveal-start-hook '(org-decrypt-entry)
>  org-modules '(org-habit ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info 
> ol-irc ol-mhe ol-rmail ol-eww)
>  org-plantuml-jar-path 

Re: Bug: org-adapt-indentation is not compatible with paragraph-indent-minor-mode [9.4.5 (9.4.5-16-g94be20-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)]

2021-09-10 Thread Max Nikulin

On 07/09/2021 11:02, Vladimir Nikishkin wrote:


Basically, my bug report is roughly about the subject.
`paragraph-indent-minor-mode` is shipped with Emacs by default (just like
org), and its behaviour is very standard for a lot of languages. A one
or two spaces indentation starts a new paragraph in quite a few human
languages.

However, turning on `paragraph-indent-minor-mode` seemingly disables
org's automatic indentation to the first letter of a heading, regardless
of `org-adapt-indentation` being set.


In Org syntax namely empty line serves as paragraph separator (and two 
empty lines to terminate list).


As a result of exporting of Org file it should be possible to get 
indentation instead of vertical space to represent paragraphs, however 
some tuning for each format (ascii, html, latex) will be required.


Would you expect from TeX that it should accept spaces in the beginning 
of line just as empty line for paragraph separator? Org is a markup 
format as well, so source files are not necessary should follow 
traditions of typesetting.





Bug: org-adapt-indentation is not compatible with paragraph-indent-minor-mode [9.4.5 (9.4.5-16-g94be20-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)]

2021-09-06 Thread Vladimir Nikishkin
Hello, everyone.

Basically, my bug report is roughly about the subject.
`paragraph-indent-minor-mode` is shipped with Emacs by default (just like
org), and its behaviour is very standard for a lot of languages. A one
or two spaces indentation starts a new paragraph in quite a few human
languages.

However, turning on `paragraph-indent-minor-mode` seemingly disables
org's automatic indentation to the first letter of a heading, regardless
of `org-adapt-indentation` being set.

I think that with paragraph-indent-minor-mode, paragraphs should start
by adding "two more spaces" to the indentation, like this:

#+begin_example
* Heading one
  First paragraph is a paragraph even if not indented.
Second paragraph is a paragraph because indented.
  This line belongs to the second paragraph.

  Third paragraph is a paragraph even if not indented because of a
  newline.

But fourth paragraph can be indented too. And the very long line I
  have written should be wrapped like this.

** Heading two
 This is also a start of a paragraph.
 This line starts a new paragraph too.
   Normal level-two indentation.
#+end_example

It would be nice if the two modes shipped with emacs were compatible, at
least to a degree at which indentation works.

Emacs  : GNU Emacs 27.1 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.24)
 of 2021-02-18
Package: Org mode version 9.4.5 (9.4.5-16-g94be20-elpaplus @ 
/home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)

current state:
==
(setq
 org-icalendar-store-UID t
 org-src-mode-hook '(#2=
 (closure #1=
  ((--cl-my-org-confirm-babel-evaluate-- closure #1# (lang 
body)
"Define by lockywolf to silence org-babel.\nLANG is 
what is after begin_src, and BODY is ignored"
(not
 (or (string= lang "plantuml") (string= lang "C") 
(string= lang "scheme") (string= lang "fortran")
  (string= lang "f90") (string= lang "elisp") (string= 
lang "latex") (string= lang "shell"))
 )
)
   (--cl-syntax-improver-- . #2#) t)
  nil
  (progn (message "Improving syntax for org-mode.") 
(modify-syntax-entry 60 ".") (modify-syntax-entry 62 ".")
   (setq geiser-autodoc--inhibit t))
  )
 org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-scheduled-leaders '("Scheduled: " "Sched.%4dx: ")
 org-after-todo-state-change-hook '(org-checklist)
 org-latex-listings t
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-after-execute-hook '(org-redisplay-inline-images)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-with-sub-superscripts '{}
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-icalendar-combined-agenda-file 
"~/Personal_Planner/Journal/org-journal-export.ics"
 org-pretty-entities t
 org-special-ctrl-k t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-special-ctrl-a/e t
 org-latex-pdf-process '("latexmk -e '$biber=qq(biber --isbn-normalise)' 
-lualatex -outdir=%o -f %f")
 org-agenda-files '("~/Personal_Planner/Planner.org" 
"~/Personal_Planner/notes.org"
"~/Personal_Planner/2020-04-28-hotkeys-to-remember.txt.org" 
"/home/lockywolf/Personal_Planner/Journal/20210701")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-reveal-start-hook '(org-decrypt-entry)
 org-modules '(org-habit ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info 
ol-irc ol-mhe ol-rmail ol-eww)
 org-plantuml-jar-path "/usr/local/bin/plantuml.jar"
 org-startup-folded t
 org-mode-hook '((closure #1=
  ((--cl-my-org-confirm-babel-evaluate-- closure #1# (lang body)
"Define by lockywolf to silence org-babel.\nLANG is what is 
after begin_src, and BODY is ignored"
(not
 (or (string= lang "plantuml") (string= lang "C") (string= 
lang "scheme") (string= lang "fortran")
  (string= lang "f90") (string= lang "elisp") (string= lang 
"latex") (string= lang "shell"))
 )
)
   (--cl-syntax-improver-- . #2=
(closure #1# nil
 (progn (message "Improving syntax for org-mode.") 
(modify-syntax-entry 60 ".") (modify-syntax-entry 62 ".")
  (setq geiser-autodoc--inhibit t))
 )
)
   t)
  nil (setq reftex-cite-format '((111 . "cite:%l") (104 . 
"\\cite{%l}"
 turn-on-org-cdlatex #2# org-clock-load org-tempo-setup 
org-fancy-priorities-mode
 #[0 "\300\301\302\303\304$\207" [add-hook