Re: Apology [was: Re: Org HTML export accessibility (was: org exported pdf files))

2022-09-29 Thread tomas
On Fri, Sep 30, 2022 at 07:05:40AM +1000, Tim Cross wrote:
> 
> Dear all,
> 
> I think I owe everyone an apology [...]

> For those interested and because it might help with understanding in
> this area, I thought I'd outline the actual cause of my frustration [...]

No, I for one are grateful for the chance to understand your
perspective. Lacking your experience, I'm dependent on the
likes of you to get an idea on perspectives I've no experience
with.

So thanks!

Cheers
-- 
tomás 


signature.asc
Description: PGP signature


Re: Bug: Fontify error with markdown source block [9.4.4 (release_9.4.4 @ /usr/share/emacs/28.0.50/lisp/org/)]

2022-09-29 Thread Ihor Radchenko
Timothy  writes:

>> You can also add the X-Woof-Patch: applied header to your reply.

Applied.
Fixed.

For record, the patch has been applied, and this bug report is now
considered fixed.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [HELP] Fwd: Org format as a new standard source format for GNU manuals

2022-09-29 Thread Samuel Wales
i really wish i could engage or even post drafts of extensible syntax
stuff that i had replied to many years ago and recently.

On 9/29/22, Ihor Radchenko  wrote:
> Dear List,
>
> I am forwarding an official email from RMS changing subject line to more
> descriptive. See below.
>
> For some context, in order to support specialized syntax for manuals, we
> may first need to implement the discussed special blocks export and
> inline special blocks:
> 1. https://list.orgmode.org/orgmode/87y1yr9gbl@gmail.com/
> 2. https://list.orgmode.org/orgmode/87edzqv4ha.fsf@localhost/
>
> The above links aim to introduce export functionality that we now have
> for links to special blocks and new custom markup elements. I am
> referring to
> 1. Ability to create new custom element types programmatically
> 2. Ability to define how to :export the custom element types
>
> Similar to `org-link-set-parameters'.
>
> Patches and more concrete ideas are welcome!
>
>  Start of forwarded message 
> From: Richard Stallman 
> To: Tim Cross 
> Cc: emacs-de...@gnu.org
> Subject: Re: Org mode and Emacs
> Date: Mon, 26 Sep 2022 08:10:03 -0400
>
> [[[ To any NSA and FBI agents reading my email: please consider]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> Speaking as the Chief GNUisance, rssponsible for GNU Project
> standards, I would be happy to adopt an upgraded Org format as a new
> standard source format for GNU manuals, _provided_ Org format has been
> extended with the capability to express all the constructions and
> distinctions that Texinfo can express, generate all the output formats
> Texinfo can generate, and use TeX to make beautiful printed output.
>
> Texinfo can generate these output formats: Info files, HTML, ASCII
> text, and DVI and PDF files via TeX.
>
> Texinfo provides numerous subtle distinctions that show up clearly in
> each of these output formats.  Compare, for example, @var, @dfn and
> @emph; compare @code, @samp, @file, @command, @option, @kbd, and @key.
>
> I am sure people can extend Org software to handle these semantic
> distinctions and generate these output formats.  Since it has been
> done once, it can be done again.  But the work is not trivial.
>
> The work has to start by designing what the extended Org format will look
> like.  That part is the crucial part; once it has been specified,
> people can work independently to implement various parts of handling
> that format.
>
> --
> Dr Richard Stallman (https://stallman.org)
> Chief GNUisance of the GNU Project (https://gnu.org)
> Founder, Free Software Foundation (https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)
>
>
>
>  End of forwarded message 
>
> --
> Ihor Radchenko,
> Org mode contributor,
> Learn more about Org mode at https://orgmode.org/.
> Support Org development at https://liberapay.com/org-mode,
> or support my work at https://liberapay.com/yantar92
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



[HELP] Fwd: Org format as a new standard source format for GNU manuals

2022-09-29 Thread Ihor Radchenko
Dear List,

I am forwarding an official email from RMS changing subject line to more
descriptive. See below.

For some context, in order to support specialized syntax for manuals, we
may first need to implement the discussed special blocks export and
inline special blocks:
1. https://list.orgmode.org/orgmode/87y1yr9gbl@gmail.com/
2. https://list.orgmode.org/orgmode/87edzqv4ha.fsf@localhost/

The above links aim to introduce export functionality that we now have
for links to special blocks and new custom markup elements. I am
referring to
1. Ability to create new custom element types programmatically 
2. Ability to define how to :export the custom element types

Similar to `org-link-set-parameters'.

Patches and more concrete ideas are welcome!

 Start of forwarded message 
From: Richard Stallman 
To: Tim Cross 
Cc: emacs-de...@gnu.org
Subject: Re: Org mode and Emacs
Date: Mon, 26 Sep 2022 08:10:03 -0400

[[[ To any NSA and FBI agents reading my email: please consider]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Speaking as the Chief GNUisance, rssponsible for GNU Project
standards, I would be happy to adopt an upgraded Org format as a new
standard source format for GNU manuals, _provided_ Org format has been
extended with the capability to express all the constructions and
distinctions that Texinfo can express, generate all the output formats
Texinfo can generate, and use TeX to make beautiful printed output.

Texinfo can generate these output formats: Info files, HTML, ASCII
text, and DVI and PDF files via TeX.

Texinfo provides numerous subtle distinctions that show up clearly in
each of these output formats.  Compare, for example, @var, @dfn and
@emph; compare @code, @samp, @file, @command, @option, @kbd, and @key.

I am sure people can extend Org software to handle these semantic
distinctions and generate these output formats.  Since it has been
done once, it can be done again.  But the work is not trivial.

The work has to start by designing what the extended Org format will look
like.  That part is the crucial part; once it has been specified,
people can work independently to implement various parts of handling
that format.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)



 End of forwarded message 

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [PATCH 2-v1] New: auto display inline images under subtree when `org-cycle'.

2022-09-29 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

> Ihor Radchenko  writes:
>
> I got a new problem in patch, the (point-max) in function
> ~org-cycle-display-inline-images~ SOMETIMES return EOF error instead of
> correct max point value when org-cycle `state' is ~'folded~. I can't
> find out what caused this even using Edebug. Do you have any clue?

Maybe because the 'folded branch in that function is not wrapped into
`save-restriction'?

>> You are providing both hook and a customization. It is redundant. Users
>> can already remove the hook when desired.
>
> I mock this style from a very similar existing hook function
> ~org-cycle-hide-archived-subtrees~ and custom variable
> ~org-cycle-open-archived-trees~. I think removing a hook function from
> ~org-cycle-hook~ is a way, but not as convenient as defcustom option.
> (P.S: I think users prefer this defcustom customization style.)

I see your point.
I agree that having a variable is better and also leaves an option to
introduce in-buffer setting for this.

Let's leave the hook part for now - if we want to alter it, we may need
to re-consider all the default hooks.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: CDATA auto aggregation

2022-09-29 Thread Ihor Radchenko
David Lukeš  writes:

> I suggested a patch, but it probably got buried in the noise:
> https://list.orgmode.org/20220228140750.75761-1-dafydd.lu...@gmail.com/
>
> Instead, I see that another fix was merged yesterday (for different
> reasons AFAICS, but it should help with this auto-formatting issue too):
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d7a55bbd537314d2776b082bd92a1a08b3edc84e
>
> This should be enough for HTML exports, but two more tweaks are needed
> for ODT exports in ox-odt.el -- see my original patch. Or use
> https://github.com/kjambunathan/org-mode-ox-odt, which has already
> incorporated them.

Sorry. I think you patch fell within the time when maintainers were not
actively watching the mailing list.

Can you please update your original patch to work with the latest main?

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: Issue with export of inlinetasks

2022-09-29 Thread Ihor Radchenko
Michael Dauer  writes:

> There seems to be an issue with export of inlinetasks, at least with
> customizing it. Org mode version 9.5 (9.5-gced2b3

Can you try the latest bugfix or main branch instead?

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Apology [was: Re: Org HTML export accessibility (was: org exported pdf files))

2022-09-29 Thread Tim Cross


Dear all,

I think I owe everyone an apology. I have allowed frustration from
another area of life colour my response here and as a result, my tone
and assessment was too negative.

While it is correct that we cannot use org mode to generate accessible
PDFs and that does mean in environments where policy mandates accessible
content (which is PDF), we cannot use org mode.

The ability to generate accessible HTML is on the other hand quite
possible. Unlike PDF, the burden for doing this rests primarily with the
author and not the data processing framework. There are probably some
things we can do to improve or encourage accessible authoring, such as
alerting authors to content which looks like it should have an alt
tag. I will give some thought to that and when I get a chance, will see
how well various html based back ends deal with accessibility checking
tools.

For those interested and because it might help with understanding in
this area, I thought I'd outline the actual cause of my frustration. The
following isn't directly related to org-mode, but may be informative for
some. However, it is a little long, so feel free to just delete and move
on if your so inclined.

There is a little irony here as well. I've been using org mode since it
was first released. I even recall email discussions with Carsten when he
was first looking at how to improve outlining. It is org mode which
allowed me to generate really good quality documents and track all the
data and tasks I had to manage in my various job roles. People often
commented that they found it interesting that some of the best looking
documents produced in our area were from the person who is legally
blind! The irony being I cannot easily access the PDF output I created
and I became part of the problem by generating inaccessible documentation!

One very long standing frustration I have had in my career has been to
do with access to training materials. Most training organisations are
extremely reluctant to provide electronic copies of their learning
materials. I have lost count of the number of non-disclosure forms I
have been forced to sign in order to get electronic documents from a
training organisation (even though they are legally required to provide
their materials in an accessible format). Even when I have managed to
sign the necessary paperwork and get the documents, they have often been
in the form of DRM protected PDFs with an expiration date. While those
without any disability can retain the learning materials for future
reference, it is not a luxury afforded to anyone dependent on assistive
technology. Worse yet, most DRM protected formats also require the use
of non-free platforms, such as Windows or MacOS (I did often get some
perverse satisfaction from cracking the DRM protection, which in most
cases, is fairly easy to do). However, there is an ironic component here
as well. Usually, the DRM protected PDFs are actually very accessible
once you jump through all the necessary hoops. They are typically well
tagged and easy to navigate. On the other hand, the non-DRM PDFs are
rarely accessible despite correctly formatted PDFs actually being one of
the most accessible formats available. Often, once forced to provide
electronic copies of their learning materials, training organisations
will provide image PDFs, generated from a scanned version of their
materials. Image PDFs are 100% inaccessible - they are just pictures, so
you cannot even extract the text using tools like pdftotext[1] Even when
not image PDFs, they often lack the necessary tagging etc (though, this
situation has improved in recent years as many tools now default to
accessible output rather than requiring it to be enabled).

Even once you jump through all the necessary hoops, your not out of the
woods yet. My current frustration has been with obtaining the important
bit of paper which says your trained and certified. After completing the
course I looked at what I needed to do to sit the certification
exam. The exam is one which has to be done at a large certification
examination centre and it is done electronically. It is actually run by
a very large US based training organisation, who I will not name.

It runs out that I cannot do the training at this time. I have to give
them  a minimum of 12 months notice to sit the certification exam
because due to my 'special' needs, the whole examination centre has to
be booked out just for me! To make it worse, the assistive technology I
have to use is a program called JAWS, which only runs on windows and
which I am totally unfamiliar with. My suggestion to just have a
sighted person assist me by reading the questions and entering the
answers has been rejected as well as all other suggestions and
appeals. It is highly likely I will just forgo certification. While it
would have been handy, it isn't essential.

I outline all of this not for sympathy but to try and promote
understanding of the challenges faced by many who need access to

Re: org exported pdf files

2022-09-29 Thread Tim Cross


Max Nikulin  writes:

> On 29/09/2022 00:08, Tim Cross wrote:
>> 1. Org mode cannot be used to create accessible PDF documents as long as
>> it depends on the latex environment to generate those documents.
>
> Are there free tools that can generate accessible PDF documents? Perhaps, 
> when it is
> mandatory requirement, export through HTML or through ODT may be a workaround 
> till
> reasonable support will be implemented in LaTeX. I have no idea concerning 
> quality of PDF
> documents generated by e.g. browsers.
>

There are tools which are free in the sense of free beer, but no tools
I'm aware of which are free in the sense of freedom. The company which
has probably done the most to make PDF files accessible is Adobe and
they do provide a lot of good documentation and some pretty reasonable
tools which can help with diagnosis etc. Unfortunately, their position
wrt software liberty is poor. 

> Are there free tools that allows to inspect PDF files structure similar to 
> DOM inspector
> from browser development tools? Otherwise it is inconvenient to check effects 
> of code
> modification or to compare result with sample files formatted accordingly to 
> guidelines.

Similar to above, but none which are free in the libre sense that I'm
aware of.



Re: org exported pdf files

2022-09-29 Thread Tim Cross


Juan Manuel Macías  writes:

> Hi, Tim
>
> Tim Cross writes:
>
>> An unfortunate situation really - especially given Emacs has one of the
>> most powerful and advanced accessibility options available via
>> emacspeak.
>>
>> I also won't hold my breath for a new latgex core. THe latex3 initiative
>> seems to have failed or at least appears to be slower to be realised than 
>> perl6! 
>
> You may find this article by Frank Mittelbach from 2020 interesting,
> about the future of LaTeX and the challenges to be solved, including the
> accessibility issues:
>
> https://www.latex-project.org/publications/2020-FMi-TUB-tb128mitt-quovadis.pdf
>
> On the other hand, there is also ConTeXt. I don't know much about
> ConTeXt, but I remember reading somewhere that ConTeXt is more mature
> than LaTeX on PDF tagging and accessibility issues. I don't know if
> there are any ConTeXt experts on the list who can confirm this... In any
> case, an ox-context already exists for org, written by Jason Ross.
>
> Best regards,
>
> Juan Manuel 
>
> -- 

Thanks Juan, that is a useful link. 



Re: Compiling a C++ source block

2022-09-29 Thread tbanelwebmin

  
  
Good point Ihor!
I will change that


Le 29/09/2022 à 04:25, Ihor Radchenko a
  écrit :


  tbanelwebmin  writes:


  
You may try:
#+header: :includes '("" "")

  
  
I notice that
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-C.html
only has examples of a single library being using in :includes
parameter.

Although the text description does mention list of strings, it would be
nice if there was an example using :includes with multiple libraries
and/or local libraries.




  




Re: Please add support for dlangs packagemanager to ob-C.el

2022-09-29 Thread tbanelwebmin

  
  
Thanks Christian.

Your TINYCHANGE fits into the 15 lines limit. I
  will review it.
  
As Bastien said, we follow as much as we can a predefined
  format for commit messages:
https://orgmode.org/worg/org-contribute.html#commit-messages

You may also look at past commit messages, for instance this
  one:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0a6a56c804099e358ca558119b7aede0b2b9b90f
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/log/
  
  If you want to further contribute, maybe in
  another TINYCHANGE, automatic unit tests are very valuable. There
  are already examples of Dlang tests in:
  testing/examples/ob-C-test.org
  testing/lisp/test-ob-C.el
  
  The best


Le 27/09/2022 à 22:41, Bastien a
  écrit :


  Hi Christian,

thanks for the patch (you forgot to advertize it by adding [PATCH] in
the subject.)

Christian Köstlin  writes:


  
Please see the patch comment. I reworked my original patch to fit
into the TINYPATCH category.

  
  
I'm CC'ing Thierry as the maintainer of ob-C.el.

The commit message should be reworked - see
https://orgmode.org/worg/org-contribute.html#commit-messages

I would recommend not using source blocks in the message.

I hope Thierry will have time to review it.

Thanks!




  




Re: [BUG] beamer export

2022-09-29 Thread Daniel Fleischer
Hi, I'm on vacation for the next month. I can look at it when I'm back.

On Thu, Sep 29, 2022, 03:44 Ihor Radchenko  wrote:

> Leo Butler  writes:
>
> > The following Org document shows a bug in the beamer exporter.
>
> Confirmed on main.
>
> There are two bugs reported here:
> 1. ox-latex export bug for src blocks containing direct LaTeX when
>org-latex-src-block-backend is set to its default 'verbatim value
> 2. ox-beamer export bug as described in the attached org file
>
> Daniel, can you please take a look at the first bug?
> I suspect that \commands should be additionally escaped in verbatim
> environment, similar to
>
> https://stackoverflow.com/questions/3019774/how-write-this-in-verbatim-latex
>
> --
> Ihor Radchenko,
> Org mode contributor,
> Learn more about Org mode at https://orgmode.org/.
> Support Org development at https://liberapay.com/org-mode,
> or support my work at https://liberapay.com/yantar92
>


Re: how to remove parentheses from the output of a source code block

2022-09-29 Thread andrés ramírez
Hi. Greg.

> "Greg" == Greg Minshall  writes:

Greg> Andrés, this is maybe more of an e-lisp question, or, at least, 
here's more of an e-lisp
Greg> answer.  if you have the useful =s= package [1] installed, then will 
using =s-join= give
Greg> you what you want?  

[...]

Yest that elisp snippet help me. And It gave me what I was looking
for. I just did:
s/(s-join " " sqlcode)/(with-temp-buffer (insert (format "%s" sqlcode)) 
(delete-rectangle (point-min) (point-max)) (buffer-string))/

Best Regards



Issue with export of inlinetasks

2022-09-29 Thread Michael Dauer
There seems to be an issue with export of inlinetasks, at least with
customizing it. Org mode version 9.5 (9.5-gced2b3
Please see the POC below:

* heading 1
** heading 1.1
* heading 2
*** TODO inline task
*** END
* heading 3
** heading 3.1
* Direct is fine
#+begin_src elisp
(let ((parsetree (org-element-parse-buffer)))
  (org-element-map parsetree '(headline inlinetask)
(lambda (e) (org-element-property :title e
#+end_src

#+RESULTS:
| heading 1  |
| heading 1.1|
| heading 2  |
| inline task|
| heading 3  |
| heading 3.1|
| Direct is fine |
| Issue is at export |
* Issue is at export
#+begin_src elisp
(let ((mist-output "")
  (org-export-with-inlinetasks t))
  (defun mist--html-format-inlinetask-function (todo todo-type priority
text tags contents info)
(setq mist-output (format "%s\niii %s" mist-output text))
"iii")
  (setq org-html-format-inlinetask-function
'mist--html-format-inlinetask-function)

  (defun mist-html-format-headline-function (todo todo-type priority text
tags info)
(setq mist-output (format "%s\nhhh %s" mist-output text))
"hhh")
  (setq org-html-format-headline-function
'mist-html-format-headline-function)
  (kill-buffer (org-export-to-buffer 'html "mist.html"))
  mist-output)
#+end_src

#+RESULTS:
#+begin_example

hhh heading 1.1
hhh heading 1
hhh inline task
hhh END
hhh heading 2
hhh heading 3.1
hhh heading 3
hhh heading 4
hhh Direct is fine
hhh Issue is at export
#+end_example


Re: emacs really slow when inserting a new source code block

2022-09-29 Thread Ihor Radchenko
Luca Ferrari  writes:

>> Do you have any flyspell-related configuration in your config?
>
> I have:
> (flyspell-mode +1)
> (global-flycheck-mode +1)

Hmm. Can you try the development version of Org?
If you are just using a bare flyspell-mode, it generally gets slow on
large Org files. We have made a number of improvements in this area on
development branch.

> By the way, even if off-topic, is there a way to "dump" configuration
> for a specific set of modes? Fromwithin emacs, how can I get a dump of
> all flyspell related settings (if there's a way)?

Usually, you can just re-search for appropriate Elisp variable prefix.
Or, if you use customize interface, saving customization will dump all
the non-default settings into your init.el
Or you can bisect the config to hunt for less obvious issues using
https://github.com/Malabarba/elisp-bug-hunter

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: emacs really slow when inserting a new source code block

2022-09-29 Thread Luca Ferrari
On Thu, Sep 29, 2022 at 4:27 AM Ihor Radchenko  wrote:
>
> Luca Ferrari  writes:
>
> >> I'm trying to understand what could be eating all the cpu.
> >>
> >
> > So far, turning off flyspell-mode makes Emacs work fine again. Strange...
>
> Do you have any flyspell-related configuration in your config?

I have:
(flyspell-mode +1)
(global-flycheck-mode +1)

By the way, even if off-topic, is there a way to "dump" configuration
for a specific set of modes? Fromwithin emacs, how can I get a dump of
all flyspell related settings (if there's a way)?

Thanks,
Luca



Re: Add \usepackage{cmap} as default LaTeX class in ox-latex (was: org exported pdf files)

2022-09-29 Thread Max Nikulin

On 29/09/2022 11:12, Ihor Radchenko wrote:

Max Nikulin writes:


On 28/09/2022 10:07, Ihor Radchenko wrote:

Max Nikulin writes:


- What TeX engine do you use? E.g. for PdfLaTeX it may be necessary to
add \usepackage{cmap} immediately after \documentclass. Unicode engines
like LuaTeX likely do not require such trick.


I am wondering if having cmap should be a good default in general.
Not just for accessibility.


For me it must have, but I am a rare person on this mail list who is
happy with the Computer Modern font (actually cm-super Type 1 font). I
have never tried .ttf fonts with PdfLaTeX and I am unaware of effect of
\usepackage{cmap} in that case.


May others familiar with LaTeX comment on this?
If it is safe to add cmap to default LaTeX template, I see no reason why
we should not.


It seems something changed during last decade. I have not tried default 
Type3 raster fonts (I do not remember if it is possible to disable 
cm-super without uninstalling it), but at least with cm-super installed, 
the cmap package is not necessary to have Cyrillic text properly encoded 
in PDF files, not to mention ASCII. I have tried utf8 and cp1251 options 
of inputenc.


However with cmap more math characters get correct unicode symbols

\[ \forall \delta \exists \epsilon \ne t \]

I tried to search for problems that may cause cmap. There is no 
incompatibility with \usepackage[pdfa=true]{hyperref} anymore

https://tex.stackexchange.com/questions/64585/incompatibilities-of-cmap-with-fontenc-hyperref
(side note: the answer marked as accepted is incorrect). So I hope, it 
is safe to use this package for PdfLaTeX.


I have noticed mmap package intended to improve math representation
https://tex.stackexchange.com/questions/64409/proper-use-of-cmap-and-mmap
With the dumb example provided above I have not noticed difference 
between cmap and \usepackage[noTeX]{mmap}. I am unsure when TeX commands 
may be preferred to Unicode characters as it works for default mmap 
configuration.


There is a chance that mmap is not installed in the system since it is 
provided by "extra" system package in Ubuntu:
texlive-latex-recommended: 
/usr/share/texlive/texmf-dist/tex/latex/cmap/cmap.sty

texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/mmap/mmap.sty
It should be possible to detect availability of mmap.sty in runtime 
using kpsewhich command.


So when I was writing that cmap is must have for me, I was not aware 
that nowadays PDF files generated from LaTeX source have mostly properly 
encoded text even without this package, in the past attempt to copy text 
resulted in some garbage.





Re: The Org mode in the Org Git does not export

2022-09-29 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> All right, I did the following 10 experiments.

Thanks again!

> RESULT:
>
>   Exporting crashes Emacs.

*shrug*
May you try with Emacs version that is not bleeding edge? Like Emacs 28. 

> *
> *** EXPERIMENT 10 ***
> *
>
> CONFIGURATION:
>
>   The same as Experiment 3-8 and 9.
>
> RESULT:
>
>   HTML exported in 1 minute 31 seconds.
>
> NOTES:
>
>   The profile attached to this message as 'export-3-cache.profile'.

There is something very strange going on there.
A lot of time is taken running org-mode-hook. But (!) org-mode-hook is
explicitly let-bound to nil in this context.
A lot of time is taken parsing the buffer, when the functions must (!)
accept already parsed element.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: Org, Hyperbole, and eev

2022-09-29 Thread Quiliro Ordóñez
El 2022-09-29 04:42, Jean Louis escribió:
> On September 28, 2022 10:15:06 AM UTC, Eduardo Ochs
>  wrote:
> 
>>> I would like to have non-Org links so that my function for links
>>> interpolates into a button. It works now in the presentation mode. I
>>> would like to make links descriptive or non descriptive just as in
>>> Org, so that it works in editing mode.
>>
>>You're hiding the technical details, and I don't know how to think in
>>these terms, sorry! =(
> 
> Not hiding at all. If I would know technical details I would not need
> it. I have you examples with your links and wrapping then with name
> for link.
> 
>>For me your "non-Org link" is a string composed of a few substrings
>>concatenated, and each of these substrings is either without text
>>properties or is built using "propertize" or "buttonize". In this
>>message
> 
> I don't think that way, that would make links specific just as they
> are specific in Org mode.
> 
> To make links not specific, but to liberate then from any mode, one
> would need to forget how link looks like inside some brackets and
> leave it to whatever function to interpolate itself into a button or
> anything else.
> 
> Did you try my interpolation package? It can already do that. But how
> can I read from properties and get back what was the link before? That
> is what I don't know how. And my way of doing links it is totally out
> of any frame I have seen before.
>  https://lists.gnu.org/archive/html/emacs-orgmode/2022-09/msg00725.html
> 
> There shall be no parsing of the link as that would make the link
> specific again.
> 
> If we make generic package than anybody else later will benefit.
> Generic links package is not tied to how link looks like, not tied to
> any function.
> 
> On the link above I my example.
> 
> Imagine (ln "name" (eev-funct do)) that would Interpolate to "name",
> but also {{{ name link }}} to to interpolate to something, and what
> does interpolation should be left to programmer.
> 
> Imagine having X+ of documents, and your link name is "New Yrk"
> mistakenly, by using generic approach one can keep the name outside of
> the document, correct it and in all documents it get corrected upon
> invocation or opening of it.
> 
> I use that system to inject my contact details, no matter if contact
> details change, I need not correct theđ one by one.
> 
>>I am trying to factor your problem into several small functions in a
>>way that makes each of these small functions easy to test - with
>>one-liners if possible, like I do in the eev source code - and if we
>>do that factoring then the function that builds the "string composed
>>of a few substrings concatenated" that I mentioned above will not call
>>your rcd-template-eval and will not depend on the major mode...
> 
> I don't think that parsing strings make it generic. 
> 
> Template Interpolation system makes it generic.
> 
> What has to be solved is how to insert the button so that it may be
> reversed into what it was before.
> 
>>I have the impression that the hard part _now_ is to write that
>>function that produces that string with text properties.
> 
> I have used insert button function.
> 
>> Once we have
>>that we will have a clearer notion of what are the "non-Org links"
>>that we are dealing with, and it will be easier to think on the other
>>functions.
> 
> Those generic links can as well become Org like links as there is no
> limitations.
> 
> 
> Jean


It is not clear which parts of the message are Jean's and which are
Eduardo's.  Not that the messenger is important to side with the
message.  But that the message is understood better when it is related
to the perspective that the messenger has.



Re: form-like process for entering rows in an org-mode table?

2022-09-29 Thread Quiliro Ordóñez
El 2022-09-29 02:51, Greg Minshall escribió:
> hi, Jean Louis,
> 
>> I do not know what is column view. But I understand that you need
>>  descriptive text.
> 
> that was my state until recently, though i had seen various references
> to it and its usage on the mailing list.  it at least offers some form
> of completing read, at least for what might be in other contexts a "drop
> down list".
> 
> it's probably at least glancing at to see if it might suit your need.

It is not clear what your question is.  Have you solved your problem? 
If you have, please post a message describing how you did it.



Re: CDATA auto aggregation

2022-09-29 Thread David Lukeš
Diego Rodriguez  writes:

> Where does this CDATA tag gets added automatically and how can I modify this 
> behavior?

Do you have auto-formatting on save configured in Emacs -- perhaps even
via a starter kit like Doom Emacs, so that you're only half aware of it?
And are you by any chance on macOS, which ships with the tidy program
(HTML Tidy) by default? Or failing that, did you install it manually?

To cut a long-story short: HTML auto-formatting on save runs tidy, which
mangles the HTML in various ways, including this CDATA thing. This also
happens in buffers with generated Org export output.

I posted the long version to the mailing list in February:
https://list.orgmode.org/CAEPTPEwOZjJLX1jyFmVR6jarsocyuD=zf7hj1i9g4sfwk4m...@mail.gmail.com/

I suggested a patch, but it probably got buried in the noise:
https://list.orgmode.org/20220228140750.75761-1-dafydd.lu...@gmail.com/

Instead, I see that another fix was merged yesterday (for different
reasons AFAICS, but it should help with this auto-formatting issue too):
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d7a55bbd537314d2776b082bd92a1a08b3edc84e

This should be enough for HTML exports, but two more tweaks are needed
for ODT exports in ox-odt.el -- see my original patch. Or use
https://github.com/kjambunathan/org-mode-ox-odt, which has already
incorporated them.

Tim Cross  writes:

> We probably should consider moving the existing ox-html to an ox-xhtml
> and implementing a new ox-html that is based on html5.

+1 on that, although obviously, I'm aware it's quite a chore.

Best,

David



Re: Org HTML export accessibility (was: org exported pdf files)

2022-09-29 Thread Jude DaShiell
One thing I vividly remember doing Navy mandatory trainings was several
instances when providers had mouse cursor and keyboard disabled so the
only way to proceed was to have a sighted person position and click the
physical mouse!



Jude  "There are four boxes to be used in
defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)

.

On Thu, 29 Sep 2022, Tim Cross wrote:

>
> Ihor Radchenko  writes:
>
> > Tim Cross  writes:
> >
> >> Note that org also lacks any accessibility support for HTML generated
> >> documents as well. However, this is less problematic as authors do have
> >> some ability to add the necessary attributes that can improve
> >> accessibility - an option not available with Latex.
> >
> > Can we do anything about it?
> > Are there any available standards on how accessible HTML document should
> > look like?
> >
> > Unlike PDF where we rely on LaTeX, Org generates the final form of the
> > HTML documents. Hence, we have the full control (and responsibility) to
> > support accessibility. At least, as a customization.
>
> Yes, there are 2 standards/guidelines which are probably relevant for
> org mode
>
> - Web Content Accessibility Guide (WCAG v2) 
> https://www.w3.org/WAI/standards-guidelines/wcag/glance/
>
> and the
>
> - Authoring Tools Accessibility Guide (ATAG) 
> https://www.w3.org/WAI/standards-guidelines/atag/
>
> The first standard is about ensuring content is as accessible as
> possible. The second one is about ensuring authoring tools are
> accessible and on how authoring tools can be implemented to assist
> people in creating accessible content. It is this last goal which makes
> the second standard potentially relevant for org mode.
>
> There are also a number of tools out there which can be used to evaluate
> the accessibility of specific content. However, I find such tools are of
> limited benefit. The problem is, such tools rely heavily on conventions
> and heuristics. For example, they can alert you to images with no alt
> attribute. However, sometimes, not having an alt attribute actually
> improves accessibility (there is nothing worse than a web document which
> has alt tags on images used solely for formatting purposes!).
>
> The big difference between PDF and HTML is that HTML is essentially a
> 'tagged' format. In many respects, this makes it much easier. However,
> it also puts more responsibility on the author.
>
> From an org-mode perspective, the key things which need to be maintained
> (and which perhaps we could make even easier or possibly have
> 'defaults') is the ability to add the alt attribute to any non-text
> element. For example, images, videos, sound files etc. All such content
> should always have some text describing the 'element'. However, it is
> also important to be able to not have an alt tag in some situations (for
> example, when using images as 'spacers' for formatting etc, we don't
> want an alt tag. Things to be aware of are things like using single
> characters or symbols (e.g. < and > for previous/next) or using unicode
> and other symbols whose meaning/purpose may seem very obvious when
> viewed, but is less so when 'spoken'.
>
> From an authoring perspective, it probably would be good if org mode was
> able to alert the user to content which lacks an alt attribute but which
> probably should have one e.g. an image with no caption, a link to a
> video/audio file etc.
>
> One area which may need more investigation is with the rendering of
> tabular data. Having the correct tags (i.e.  for data and  for
> headings, is very important. Other areas which may need to be verified
> as being formatted correctly with adequate ARIA attributes are elements
> relating to navigation, indexing and referencing/footnotes.
>
> The big problems with accessibility in web content tend to come about
> from dynamic content, javascript and CSS. Plain HTML documents tend to
> be quite good provided the appropriate tags have been used. Where things
> become difficult is when you have content which is rendered based on
> dynamic variables - for example, content which is hidden/revealed via
> mouse clicks etc.
>
> The other important area often overlooked and which probably does need
> some work done is with keyboard navigation. As you can probably imagine,
> for blind and vision impaired users, the mouse cursor is a challenge and
> any web page which requires you to move the mouse and click on an
> element/link can be a challenge. having consistent keyboard navigation
> is important. THis is particularly relevant when dealing with data input
> via web forms etc.
>
> Of course, there is one very good way to assess the accessibility of a
> web page - use a screen reader and try navigating, browsing and reading
> some content with your eyes closed. If, for example, you find when
> hitting tab to move through 'elements' in the page that it is impossible
> to follow the structure or flow of the content (either 

Re: org-element API does not identify inlinetasks (correctly)

2022-09-29 Thread Michael Dauer
There is a (require 'org-inlinetask), and I use inlinetasks a lot.

Am Do., 29. Sept. 2022 um 13:18 Uhr schrieb Ihor Radchenko <
yanta...@gmail.com>:

> Michael Dauer  writes:
>
> > Inlinetasks are always interpreted to be of type heading. This causes
> > multiple issues e.g with export.
> >
> > I think that I could track it to the function
> org-element--current-element,
> > where the check for headings is before the one for inlinetasks, while
> > inlinetask is just a sub-type of heading.
>
> Inlinetasks are not parsed by Org by default. You must first load
> org-inlinetask module to enable the parsing.
>
> Without org-inlinetask being loaded, inlinetasks are treated as ordinary
> headings.
>
> --
> Ihor Radchenko,
> Org mode contributor,
> Learn more about Org mode at https://orgmode.org/.
> Support Org development at https://liberapay.com/org-mode,
> or support my work at https://liberapay.com/yantar92
>


Re: org-element API does not identify inlinetasks (correctly)

2022-09-29 Thread Ihor Radchenko
Michael Dauer  writes:

> There is a (require 'org-inlinetask), and I use inlinetasks a lot.

Then please provide an example of a file with inlinetasks and steps you
did to get the erroneous behavior. See
https://orgmode.org/manual/Feedback.html

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: org-element API does not identify inlinetasks (correctly)

2022-09-29 Thread Ihor Radchenko
Michael Dauer  writes:

> Inlinetasks are always interpreted to be of type heading. This causes
> multiple issues e.g with export.
>
> I think that I could track it to the function org-element--current-element,
> where the check for headings is before the one for inlinetasks, while
> inlinetask is just a sub-type of heading.

Inlinetasks are not parsed by Org by default. You must first load
org-inlinetask module to enable the parsing.

Without org-inlinetask being loaded, inlinetasks are treated as ordinary
headings.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



org-element API does not identify inlinetasks (correctly)

2022-09-29 Thread Michael Dauer
Inlinetasks are always interpreted to be of type heading. This causes
multiple issues e.g with export.

I think that I could track it to the function org-element--current-element,
where the check for headings is before the one for inlinetasks, while
inlinetask is just a sub-type of heading.

Hence the (custom-) formatting of inlinetasks at export does not work.

Org mode version 9.5 (9.5-gced2b3


Re: Org HTML export accessibility (was: org exported pdf files)

2022-09-29 Thread Tim Cross


Ihor Radchenko  writes:

> Tim Cross  writes:
>
>> Note that org also lacks any accessibility support for HTML generated
>> documents as well. However, this is less problematic as authors do have
>> some ability to add the necessary attributes that can improve
>> accessibility - an option not available with Latex.
>
> Can we do anything about it?
> Are there any available standards on how accessible HTML document should
> look like?
>
> Unlike PDF where we rely on LaTeX, Org generates the final form of the
> HTML documents. Hence, we have the full control (and responsibility) to
> support accessibility. At least, as a customization.

Yes, there are 2 standards/guidelines which are probably relevant for
org mode

- Web Content Accessibility Guide (WCAG v2) 
https://www.w3.org/WAI/standards-guidelines/wcag/glance/

and the

- Authoring Tools Accessibility Guide (ATAG) 
https://www.w3.org/WAI/standards-guidelines/atag/

The first standard is about ensuring content is as accessible as
possible. The second one is about ensuring authoring tools are
accessible and on how authoring tools can be implemented to assist
people in creating accessible content. It is this last goal which makes
the second standard potentially relevant for org mode.

There are also a number of tools out there which can be used to evaluate
the accessibility of specific content. However, I find such tools are of
limited benefit. The problem is, such tools rely heavily on conventions
and heuristics. For example, they can alert you to images with no alt
attribute. However, sometimes, not having an alt attribute actually
improves accessibility (there is nothing worse than a web document which
has alt tags on images used solely for formatting purposes!). 

The big difference between PDF and HTML is that HTML is essentially a
'tagged' format. In many respects, this makes it much easier. However,
it also puts more responsibility on the author.

>From an org-mode perspective, the key things which need to be maintained
(and which perhaps we could make even easier or possibly have
'defaults') is the ability to add the alt attribute to any non-text
element. For example, images, videos, sound files etc. All such content
should always have some text describing the 'element'. However, it is
also important to be able to not have an alt tag in some situations (for
example, when using images as 'spacers' for formatting etc, we don't
want an alt tag. Things to be aware of are things like using single
characters or symbols (e.g. < and > for previous/next) or using unicode
and other symbols whose meaning/purpose may seem very obvious when
viewed, but is less so when 'spoken'. 

>From an authoring perspective, it probably would be good if org mode was
able to alert the user to content which lacks an alt attribute but which
probably should have one e.g. an image with no caption, a link to a
video/audio file etc.

One area which may need more investigation is with the rendering of
tabular data. Having the correct tags (i.e.  for data and  for
headings, is very important. Other areas which may need to be verified
as being formatted correctly with adequate ARIA attributes are elements
relating to navigation, indexing and referencing/footnotes.

The big problems with accessibility in web content tend to come about
from dynamic content, javascript and CSS. Plain HTML documents tend to
be quite good provided the appropriate tags have been used. Where things
become difficult is when you have content which is rendered based on
dynamic variables - for example, content which is hidden/revealed via
mouse clicks etc.

The other important area often overlooked and which probably does need
some work done is with keyboard navigation. As you can probably imagine,
for blind and vision impaired users, the mouse cursor is a challenge and
any web page which requires you to move the mouse and click on an
element/link can be a challenge. having consistent keyboard navigation
is important. THis is particularly relevant when dealing with data input
via web forms etc. 

Of course, there is one very good way to assess the accessibility of a
web page - use a screen reader and try navigating, browsing and reading
some content with your eyes closed. If, for example, you find when
hitting tab to move through 'elements' in the page that it is impossible
to follow the structure or flow of the content (either because tab
results in focus jumping to some unexpected location or because the
internal link names used are too obscure or because there simply isn't
sufficient contextual information, then there is an issue. The next step
is to determine if this issue is because of how org mode is generating
the output or because the author has used or failed to use appropriate
alt tags etc.  

Note that all major platforms have free screen reader software
available. For Apple and ChromeOS, it is part of the platform and just
needs to be turned on. For windows, there is NVDA and for Linux there
are a 

Re: Org, Hyperbole, and eev

2022-09-29 Thread Jean Louis
I will see how to implement this, thank you

On September 29, 2022 4:07:15 AM UTC, Ihor Radchenko  wrote:
>Jean Louis  writes:
>
>> Let us say that link is:
>>
>>  (link "Duck" (browse-url "http://www.duckduckgo.com;))
>>
>> such link should be displyed as:
>>
>>  __Duck__ (underlined)
>>
>> but just as in Org mode to have toggle options descriptive or
>> non-descriptive links.
>>
>> and that I can inject the format of the link like parenthesis and
>> simple into such generic way of making links. It would go beyond Org
>> that way and be available in any modes.
>
>org-open-at-point-global can work outside Org to open Org links.
>
>For Org-like fontification, you can add an entry to font-lock-keywords
>that will fontify anything matching org-link-any-re and apply
>org-activate-links. However, you may need to rewrite org-activate-link
>to work outside Org mode. It should not be prohibitively hard.
>
>(I suspect that Hyperbole could be the right place to request the
>fontification feature - they already take care about fontification of
>implicit buttons; may as well extend it)


Jean



Re: Org, Hyperbole, and eev

2022-09-29 Thread Jean Louis



On September 28, 2022 10:15:06 AM UTC, Eduardo Ochs  
wrote:

>> I would like to have non-Org links so that my function for links
>> interpolates into a button. It works now in the presentation mode. I
>> would like to make links descriptive or non descriptive just as in
>> Org, so that it works in editing mode.
>
>You're hiding the technical details, and I don't know how to think in
>these terms, sorry! =(

Not hiding at all. If I would know technical details I would not need it. I 
have you examples with your links and wrapping then with name for link.

>For me your "non-Org link" is a string composed of a few substrings
>concatenated, and each of these substrings is either without text
>properties or is built using "propertize" or "buttonize". In this
>message

I don't think that way, that would make links specific just as they are 
specific in Org mode.

To make links not specific, but to liberate then from any mode, one would need 
to forget how link looks like inside some brackets and leave it to whatever 
function to interpolate itself into a button or anything else.

Did you try my interpolation package? It can already do that. But how can I 
read from properties and get back what was the link before? That is what I 
don't know how. And my way of doing links it is totally out of any frame I have 
seen before.
 https://lists.gnu.org/archive/html/emacs-orgmode/2022-09/msg00725.html

There shall be no parsing of the link as that would make the link specific 
again.

If we make generic package than anybody else later will benefit. Generic links 
package is not tied to how link looks like, not tied to any function.

On the link above I my example.

Imagine (ln "name" (eev-funct do)) that would Interpolate to "name", but also 
{{{ name link }}} to to interpolate to something, and what does interpolation 
should be left to programmer.

Imagine having X+ of documents, and your link name is "New Yrk" mistakenly, by 
using generic approach one can keep the name outside of the document, correct 
it and in all documents it get corrected upon invocation or opening of it.

I use that system to inject my contact details, no matter if contact details 
change, I need not correct theđ one by one.

>I am trying to factor your problem into several small functions in a
>way that makes each of these small functions easy to test - with
>one-liners if possible, like I do in the eev source code - and if we
>do that factoring then the function that builds the "string composed
>of a few substrings concatenated" that I mentioned above will not call
>your rcd-template-eval and will not depend on the major mode...

I don't think that parsing strings make it generic. 

Template Interpolation system makes it generic.

What has to be solved is how to insert the button so that it may be reversed 
into what it was before.

>I have the impression that the hard part _now_ is to write that
>function that produces that string with text properties.

I have used insert button function.

> Once we have
>that we will have a clearer notion of what are the "non-Org links"
>that we are dealing with, and it will be easier to think on the other
>functions.

Those generic links can as well become Org like links as there is no 
limitations.


Jean



Re: Org, Hyperbole, and eev

2022-09-29 Thread Jean Louis
I am definitely interested, make prototype please. Just can't answer properly 
on travel.


Jean



Re: form-like process for entering rows in an org-mode table?

2022-09-29 Thread Greg Minshall
hi, Jean Louis,

> I do not know what is column view. But I understand that you need
>  descriptive text.

that was my state until recently, though i had seen various references
to it and its usage on the mailing list.  it at least offers some form
of completing read, at least for what might be in other contexts a "drop
down list".

it's probably at least glancing at to see if it might suit your need.

cheers, Greg



Re: [WORG] Document in more detail about what maintainers do?

2022-09-29 Thread Ihor Radchenko
Bastien  writes:

> Ihor Radchenko  writes:
>
>> I think the part about CC is missing in
>> https://orgmode.org/worg/org-maintenance.html#orga0c76fb
>
> Indeed - can you add it?

>> Also, I find it important to take note about worg documentation for
>> built-in babel backends. I did not even know it exist for a long time.
>>
>> WDYT?
>
> +1 -- and also suggest adding tests, a part that I missed.

See the attached.

> Also, I'd more comfortable if org-maintenance.org would use stable
> anchors (not #orga0c76fb).

Done.
https://git.sr.ht/~bzg/worg/commit/b8c2bac21995747fa0c2f98d7b8e9dd7eaa30741

>From 23d5ffc8d1bb065cb98dc7f7eb1464575e41c9ad Mon Sep 17 00:00:00 2001
Message-Id: <23d5ffc8d1bb065cb98dc7f7eb1464575e41c9ad.1664435121.git.yanta...@gmail.com>
From: Ihor Radchenko 
Date: Thu, 29 Sep 2022 15:03:48 +0800
Subject: [PATCH] org-maintenance.org: Add details about the maintainer duties

* org-maintenance.org (What is the role of a maintainer?): Add details
about CCing from the list, maintaining tests, and updating babel
docs.  Rewrite referring to the reader personally in all the places.
---
 org-maintenance.org | 36 
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/org-maintenance.org b/org-maintenance.org
index 812cfbce..f5cc70eb 100644
--- a/org-maintenance.org
+++ b/org-maintenance.org
@@ -70,21 +70,33 @@ * What is the role of a maintainer?
 :END:
 
 If you speak [[https://learnxinyminutes.com/docs/elisp/][Emacs lisp]] and are a regular user of an Org file, please
-consider becoming a maintainer for it: you can simply ask on the list.
+consider becoming a maintainer for it: you can simply ask on the [[https://orgmode.org/worg/org-mailing-list.html][list]].
 
-The maintainer does not need to be an expert of the functionality in
-the file or to actively improve the file.  He or she takes care of bug
-reports and feature requests against this file by participating to the
-discussion on the list.
+You do not need to be an expert of the functionality in the file or to
+actively improve the file.  Just take care of bug reports and feature
+requests against this file by participating to the discussion on the
+[[https://orgmode.org/worg/org-mailing-list.html][list]].
 
-Org maintainers need to join [[https://savannah.gnu.org/git/?group=emacs][the Emacs group on Savannah]].  When this
-is done, they have access to the [[https://git.savannah.gnu.org/cgit/emacs/org-mode.git/][org-mode.git]] repository and can push
-changes without asking for permission first.  If the change is a new
-feature, they should discuss it on the list first.  
+You are not strictly required to follow the mailing list closely and
+watch for the relevant emails.  When necessary, the relevant messages
+will be directly forwarded to your email.
 
-In case the change touches files maintained by other maintainers, they
-need to review and validate it first.  If Org's maintainer disagrees
-with a change, he can ask a maintainer to revert it.
+As a maintainer, you will need to join [[https://savannah.gnu.org/git/?group=emacs][the Emacs group on Savannah]].
+When this is done, you will have access to the [[https://git.savannah.gnu.org/cgit/emacs/org-mode.git/][org-mode.git]] repository
+and will be able to push changes without asking for permission first.
+If your change is a new feature, discuss it on the [[https://orgmode.org/worg/org-mailing-list.html][list]] first.
+
+In case the change touches files maintained by other maintainers, ask
+them to review and validate it first.  If Org's maintainer disagrees
+with a change, he can ask you to revert it.
+
+When possible, please accompany bug fixes and new features with tests.
+The Org test infrastructure is detailed in [[https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/testing/README][testing/README]] file in the
+Org repository.
+
+If you are the maintainer of one of the babel language backends,
+please make sure that the [[https://orgmode.org/worg/org-contrib/babel/languages/index.html][language documentation in WORG]] is
+up-to-date.
 
 See also this steps for [[https://orgmode.org/worg/org-contribute.html#devs][your first commit as a]] maintainer.
 
-- 
2.35.1



-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


Re: [PATCH 2-v1 (test v1)] New: auto display inline images under subtree when `org-cycle'.

2022-09-29 Thread Christopher M. Miles

Ihor Radchenko  writes:

> "Christopher M. Miles"  writes:
>
>> Ok, I created the patch for subtree cycling display inline images.
>> Tested by edebug when org cycling, it should works fine. I don't know
>> how to write test for this.
>
> Thanks for the update!
>
> For tests, you will need to test the existence of image overlays.
> You can refer to test-org-fold/org-fold-reveal-broken-structure but
> need to test overlays-at instead of just org-invisible-p.

I write a testing prototype, got a problem which I marked TODO in code.
And can you check whether my tests correct? Thanks

#+begin_src emacs-lisp
;;; TODO: reference `test-org-fold/org-fold-reveal-broken-structure'
(ert-deftest test-org-fold/org-fold-display-inline-images ()
  "Test inline images displaying when cycling."
  (let ((org-fold-core-style 'text-properties)
(org-cycle-inline-images-display t))
;; `org-cycle' -(state)-> `'children' display child inline images.
(org-test-with-temp-text
 "* Heading 1
[[file:image.png]]"
 (org-overview)
 (org-cycle)
 (org-next-link)
 (should (overlays-at (point)))
 (org-toggle-inline-images)
 (should-not (overlays-at (point
;; `org-cycle' -(state)-> `'subtree' display subtrees inline images.
(org-test-with-temp-text
 "* Heading 1
[[file:image.png]]
** Subheading 1
[[file:image2.png]]
** Subheading 2
[[file:image3.png]]"
 (org-overview)
 (org-cycle)
 (org-cycle)
 (org-next-link)
 (org-next-link)
 (should (overlays-at (point)))
 (org-toggle-inline-images)
 (should-not (overlays-at (point
;; `org-cycle' -(state)-> `'folded' remove inline image overlays.
(org-test-with-temp-text
 "* Heading 1
[[file:image.png]]
** Subheading 1
[[file:image2.png]]
** Subheading 2
[[file:image3.png]]"
 (org-overview)
 (org-cycle)
 (org-cycle)
 (org-cycle)
 ;; TODO: how to detect inline image overlays are deleted after folded?
 (should (overlays-at (point)))
 (org-toggle-inline-images)
 (should-not (overlays-at (point))
#+end_src

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Re: org exported pdf files

2022-09-29 Thread Max Nikulin

On 29/09/2022 00:08, Tim Cross wrote:


1. Org mode cannot be used to create accessible PDF documents as long as
it depends on the latex environment to generate those documents.


Are there free tools that can generate accessible PDF documents? 
Perhaps, when it is mandatory requirement, export through HTML or 
through ODT may be a workaround till reasonable support will be 
implemented in LaTeX. I have no idea concerning quality of PDF documents 
generated by e.g. browsers.


Are there free tools that allows to inspect PDF files structure similar 
to DOM inspector from browser development tools? Otherwise it is 
inconvenient to check effects of code modification or to compare result 
with sample files formatted accordingly to guidelines.





Re: Explicit page breaks

2022-09-29 Thread Thomas S. Dye

Aloha all,

Juan Manuel Macías  writes:


Ihor Radchenko writes:

Do note that page breaks may or may not lay between paragraphs 
or Org
elements. By its nature, page break is an object (in Org 
terminology).


Indeed, page break can be placed anywhere. But inserting it 
before

paragraphs, at least in Org, is the least compromised by the
idiosyncrasies of each format: odt or LaTeX. And the most
format-agnostic. And on the other hand, in LaTeX and odt it's 
also the
safest place to put them, unless you want to add some 
fine-tuning in

either case.



This doesn't reach to paragraphs, but tags do a good job of 
inserting \clearpage and \newpage before a section heading in 
LaTeX export.  


** Rasmus filter headline tags

This function was improved by Rasmus Pank Roulund based on one I 
had

cobbled together from pieces posted on the Org mode mailing list.

#+name: rpr-filter-headline-tags
#+begin_src emacs-lisp :results silent
(defun tsd-filter-headline-tags (contents backend info)
 "Ignore headlines with tag `ignoreheading' and/or start LaTeX
 section with `newpage' or `clearpage' command."
 (cond ((and (org-export-derived-backend-p backend 'latex)
  (string-match "\\`.*newpage.*\n" (downcase contents))
  ;; if you want to get rid of labels use the string
  ;; "\\`.*ignoreheading.*\n.*\n"
	  (string-match "\\`.*ignoreheading.*\n" (downcase 
	  contents)))

 (replace-match "newpage\n" nil nil contents))
((and (org-export-derived-backend-p backend 'latex)
  (string-match "\\`.*clearpage.*\n" (downcase contents))
	  (string-match "\\`.*ignoreheading.*\n" (downcase 
	  contents)))

 (replace-match "clearpage\n" nil nil contents))
((and (org-export-derived-backend-p backend 'latex 'html 'ascii)
	  (string-match "\\`.*ignoreheading.*\n" (downcase 
	  contents)))

 (replace-match "" nil nil contents))
((and (org-export-derived-backend-p backend 'latex)
	  (string-match 
	  "\\(\\`.*?\\)\\(?:hfill{}\\)?textsc{.*?newpage.*?}\\(.*\n\\)"

(downcase contents)))
 (replace-match "newpage\n\\1\\2"  nil nil contents))
((and (org-export-derived-backend-p backend 'latex)
	  (string-match 
	  "\\(\\`.*?\\)\\(?:hfill{}\\)?textsc{.*?clearpage.*?}\\(.*\n\\)" 
	  (downcase contents)))

 (replace-match "clearpage\n\\1\\2"  nil nil contents
#+end_src

Hope this helps. If not, sorry for the noise.

All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: [PATCH 2-v1] New: auto display inline images under subtree when `org-cycle'.

2022-09-29 Thread Christopher M. Miles

Ihor Radchenko  writes:

I got a new problem in patch, the (point-max) in function
~org-cycle-display-inline-images~ SOMETIMES return EOF error instead of
correct max point value when org-cycle `state' is ~'folded~. I can't
find out what caused this even using Edebug. Do you have any clue?

> "Christopher M. Miles"  writes:
>
>> Ok, I created the patch for subtree cycling display inline images.
>> Tested by edebug when org cycling, it should works fine. I don't know
>> how to write test for this.
>
> Thanks for the update!
>
> For tests, you will need to test the existence of image overlays.
> You can refer to test-org-fold/org-fold-reveal-broken-structure but
> need to test overlays-at instead of just org-invisible-p.
>

I will try to write tests later.

>> But I got a little problem:
>>
>> When ~org-fold-core-style~ is ~'overlays~, the ~delete-overlay~ will
>> cause subtree unfolded. More detailed check out the "org.el" function
>> ~org-remove-inline-images~ in my patch.
>
> I will comment in the code.
>
>>  (defcustom org-cycle-hook '(org-cycle-hide-archived-subtrees
>> -   org-cycle-show-empty-lines
>> -   org-cycle-optimize-window-after-visibility-change)
>> +org-cycle-show-empty-lines
>> +
>> org-cycle-optimize-window-after-visibility-change
>> +org-cycle-display-inline-images)
>>"Hook that is run after `org-cycle' has changed the buffer visibility.
>>  The function(s) in this hook must accept a single argument which indicates
>>  the new state that was set by the most recent `org-cycle' command.  The
>> @@ -229,6 +230,12 @@ normal outline commands like `show-all', but not with 
>> the cycling commands."
>>:group 'org-cycle
>>:type 'boolean)
>>  
>> +(defcustom org-cycle-inline-images-display nil
>> +  "Non-nil means auto display inline images under subtree when cycling."
>> +  :group 'org-startup
>> +  :group 'org-cycle
>> +  :type 'boolean)
>
> You are providing both hook and a customization. It is redundant. Users
> can already remove the hook when desired.

I mock this style from a very similar existing hook function
~org-cycle-hide-archived-subtrees~ and custom variable
~org-cycle-open-archived-trees~. I think removing a hook function from
~org-cycle-hook~ is a way, but not as convenient as defcustom option.
(P.S: I think users prefer this defcustom customization style.)

>
> In this area, we generally do not use custom variables (see M-x
> customize-group org-cycle). So, it is better to use hook.
>
>> -(defun org-remove-inline-images ()
>> +(defun org-remove-inline-images ( beg end)
>>"Remove inline display of images."
>>(interactive)
>> -  (mapc #'delete-overlay org-inline-image-overlays)
>> -  (setq org-inline-image-overlays nil))
>> +  (let* ((beg (or beg (point-min)))
>> + (end (or end (point-max)))
>> + (overlays (overlays-in beg end)))
>> +(dolist (ov overlays)
>> +  (delete ov org-inline-image-overlays))
>> +(mapc #'delete-overlay overlays)
>> +;; FIXME: `org-cycle-display-inline-images' can't fold because 
>> `delete-overlay' will unfold subtree.
>> +(when (eq org-fold-core-style 'overlays)
>> +  ;; FIXME: don't know how to get the correct `spec'.
>> +  (let ((spec (alist-get 'org-fold-hidden org-fold-core--specs)))
>> +(org-fold-core-region beg end t spec)
>
> You can just
>
> (dolist (ov overlays)
>   (when (memq ov org-inline-image-overlays)
> (setq org-inline-image-overlays (delq ov org-inline-image-overlays))
> (delete-overlay ov)))

Done

> Note that `delete' and `delq' are not safe to use on their own. You
> should always use (setq foo (delq 'member foo)). It is detailed in the
> docstring.

Thanks for teaching.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Re: Explicit page breaks

2022-09-29 Thread Max Nikulin
Let me remind that the discussion originates from a complain that 
filling paragraph does not respect ^L character in the .org file. The 
topic starter have not provided more details concerning their use case, 
maybe it is irrelevant to export.


During export (LaTeX is not the only case, even HTML may be printed or 
saved as PDF and has some CSS attributes) \clearpage (or its equivalent) 
may be attributed to the end of a block level element or a beginning of 
it. In the latter case it should be preserved even if the previous 
heading is commented out. It resembles to a recent topic discussing 
wrapping exported heading or other elements into some template.


I agree that page breaking inside paragraph (at particular point or when 
current line is filled) is a different case. Degree of support may vary 
across export backends.