Re: org-mode export toggle checkboxes

2020-12-03 Thread Kyle Meyer


Zelphir Kaltstahl writes:

> Hello Emacs and Org-Mode Users,
>
> I have a question regarding the export options of org-mode.
>
> Is there a way to toggle, whether checkboxes are exported to markdown
> and plain text (ASCII buffer / file)? I did not find any on
> https://orgmode.org/manual/Export-Settings.html and so far I tried the
> following:
[...]

I'm not aware of an option to control this.  You could accomplish it
with a filter though:

(defun my/ox-md-ascii-filter-checkboxes (ast backend info)
  (if (org-export-derived-backend-p backend 'md 'ascii)
  (org-element-map ast 'item
(lambda (i)
  (org-element-put-property i :checkbox nil))
info)
ast))

(add-to-list 'org-export-filter-parse-tree-functions
 #'my/ox-md-ascii-filter-checkboxes)


more details: (info "(org)Advanced Export Configuration")



Re: [patch suggestion] Mitigating the poor Emacs performance on huge org files: Do not use overlays for PROPERTY and LOGBOOK drawers

2020-12-03 Thread Ihor Radchenko
Hello,

This is an update about the current status of the patch.

Since there was not much feedback, I decided to share the up-to-date
branch on github, so that people can directly download/clone the whole
thing and load it to Emacs without a need to install the patch manually.

The github repo is https://github.com/yantar92/org



On the progress with the code, I have found many more bugs, which are
not critical for me, but should be fixed anyway. I will keep working on
them and keep the github repo up to date.

One more important thing I wanted to mention is about the way org-fold
should be merged on master. I plan to support using overlays within
org-fold depending on custom variable. If the variable is set to
'overlay, org fold will use overlays without all the complexity of text
property approach. The 'overlay value will be set by default. If a user
wants to use text properties, the variable can be customised.

The described approach will allow all the users test the text
property-based folding as experimental feature (similar to
org-element-use-cache). Once we are confident enough that the code is
stable, we can just change the default.

What do you think?

Best,
Ihor

Ihor Radchenko  writes:

> Hello,
>
>> There are still known problems though. The patch currently breaks many
>> org-mode tests when running =make test=. It is partially because some
>> tests assume overlays to be used for folding and partially because the
>> patch appears to break certain folding conventions. I am still
>> investigating this (and learning =ert=).
>
> All the tests are passing now.
> The current version of the patch (against master) is in
> https://gist.github.com/yantar92/6447754415457927293acda43a7fcaef
>
> The patch is stable on my system for last several months. There are
> still some minor issues here and there, but it is getting harder for me
> to find any problems by myself. I need help from interested users to
> review and/or test the patch.
>
> Best,
> Ihor



Re: generate an org file for today's appointments

2020-12-03 Thread TRS-80

On 2020-12-03 06:01, Mikhail Skorzhisnkii wrote:

Alan Schmitt  writes:

I have my calendars converted to org files (using ical2orgpy), and as 
I

include them as agenda files, I have this nice view in org-agenda:

   9:10.. now - - - - - - - - - - - - - - - - -
  AlanWork:   10:00-12:00 Event A -
  Chris:  10:00-11:00 Event B -
  10:00.. 
  12:00.. 
  AlanWork:   14:00-15:30 Event C -
  14:00.. 
  16:00.. 
  18:00.. 
  Alan:   20:00-21:30 Event D -

Is there a way to piggy-back on all the work that org-agenda already 
did

to generate something like:

** 10:00 Event A
** 10:00 Event B
** 14:00 Event C
** 20:00 Event D

This would then be inserted in my daily journal file.

I guess the alternative is using org-element to extract the 
information
from the calendars in org format, but it seems to me org-agenda 
already

did all the hard work.



I'd suggest to use function "org-agenda-write". You can export your
agenda views to org files too! However, the formatting will be
different. Probably something like:

* Event A
 SCHEDULED: <2020-12-03 Thu 10:00-12:00>
* Event B
 SCHEDULED: <2020-12-03 Thu 10:00-11:00>
* Event C
 SCHEDULED: <2020-12-03 Thu 14:00-15:30>
* Event D
 SCHEDULED: <2020-12-03 Thu 20:00-21:30>

I personally do this to generate separate org-file and then generate
ics file based on that and upload this ics file through WebDAV to my
calendar server.


@Alan,

I don't know if there is a way directly in Org to do what you want or
not, but for some reason my brain goes toward copying the text (either
directly from your agenda, or from Mikhail solution) into some other
buffer and then doing some macro or ELisp based post-processing.  But
I really don't know if that's the Right Thing to do or not.

I am also not someone who uses one of these "daily journal" workflows,
so I can't help but wonder how you link these daily notes back to the
underlying project that generated the event on the agenda in the first
place.  Becasue in my mind, I would jump from the agenda to the
underlying project or task and be making my notes in there directly.
Those linking considerations, in my mind anyway, would really dictate
the rest of the workflow.

Cheers,
TRS-80



Re: Missing line breaks in Beamer with alltt

2020-12-03 Thread Eric S Fraga
On Thursday,  3 Dec 2020 at 18:07, Jarmo Hurri wrote:
> I will take you up on that offer! Are you able to replicate the
> difference between these two slides?

Interesting.  It seems that the use of =...= in one of the items makes
org insert the "fragile" option for the frame and that allows the alltt
environment to work properly.  The solution therefore is either make
sure that there is at least one use of =...= in the slide or, better
yet, add the fragile option yourself by setting the BEAMER_opt property
to fragile, as in:

* Another slide
:PROPERTIES:
:BEAMER_opt: fragile
:END:

I've tested this and it works for me.

HTH,
eric

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-143-g9a1549



Re: Missing line breaks in Beamer with alltt

2020-12-03 Thread Jarmo Hurri

Hi there.

Eric S Fraga  writes:

> Happy to try to help.

I will take you up on that offer! Are you able to replicate the
difference between these two slides?

# 
--
#+startup: beamer

#+latex_header: \usepackage{alltt}

* A slide with some code
  - =yes= verbatim on this line, line breaks preserved
#+begin_alltt 
N=5
if S\neq I
#+end_alltt

* Another slide
  - no verbatim on this line, line breaks not preserved
#+begin_alltt 
N=5
if S\neq I
#+end_alltt

# 
--

If you are not, then please find attached generated tex.

All the best, and stay safe.

Jarmo



beamer-alltt.tex
Description: latex


Re: generate an org file for today's appointments

2020-12-03 Thread Mikhail Skorzhisnkii
I'd suggest to use function "org-agenda-write". You can export 
your agenda views to org files too! However, the formatting will 
be different. Probably something like:


* Event A
 SCHEDULED: <2020-12-03 Thu 10:00-12:00>
* Event B
 SCHEDULED: <2020-12-03 Thu 10:00-11:00>
* Event C
 SCHEDULED: <2020-12-03 Thu 14:00-15:30>
* Event D
 SCHEDULED: <2020-12-03 Thu 20:00-21:30>

I personally do this to generate separate org-file and then 
generate ics file based on that and upload this ics file through 
WebDAV to my calendar server.


Mikhail Skorzhinskii

Alan Schmitt  writes:


Hello,

I have my calendars converted to org files (using ical2orgpy), 
and as I
include them as agenda files, I have this nice view in 
org-agenda:


   9:10.. now - - - - - - - - - - - - - - - - - 
   - - - - - - - -

  AlanWork:   10:00-12:00 Event A -
  Chris:  10:00-11:00 Event B -
  10:00.. 
  12:00.. 
  AlanWork:   14:00-15:30 Event C -
  14:00.. 
  16:00.. 
  18:00.. 
  Alan:   20:00-21:30 Event D -

Is there a way to piggy-back on all the work that org-agenda 
already did

to generate something like:

** 10:00 Event A
** 10:00 Event B
** 14:00 Event C
** 20:00 Event D

This would then be inserted in my daily journal file.

I guess the alternative is using org-element to extract the 
information
from the calendars in org format, but it seems to me org-agenda 
already

did all the hard work.

Do you have suggestions to do this?

Thanks,

Alan




Re: Bug: LaTeX inline maths expression \(+\) wrongly toggles strike-through face

2020-12-03 Thread Firmin Martin
Thank you Tomas, it works like a charm! Hope that it will be patched.

Best,

Firmin Martin