Re: How do you manage complex project with Org-mode

2022-02-28 Thread Eric Abrahamsen
Sébastien Gendre  writes:

> Hello,
>
> I don't know if it's the correct place to ask it. If not, sorry to ask in
> the wrong place.
>
> How do you manage complex project with Org-mode ?
>
> I used Org-mode for several periods of time in recent years. It worked
> very well for short and day to day tasks. When only a few of theme have
> deadlines and when you have plenty of time to do them.
>
> But, as a student, I regularly have big and important projects to do for
> the school. The kind of project who need several days to be done, with
> deadlines too soon, and if you fail one them the consequences can be
> disastrous. And generally, I have to many of these project in the same
> time and not enough time to do all the work. So, I also need to follow
> the progress of each project to choose which is sufficiently advanced to
> be stop for the benefit of another less advanced project.
>
> And I don't know how to manage this kind of projects with Org-mode. How
> to do it, without failing a 6 days project because I spent to much time
> on something else and I have only 3 days left with 3 half-day important
> appointment I cannot cancel. I can't risk failing a single one of these
> project by trying. So, when I am in a period with a lot of these
> projects, I stop using Org-mode and concentrate on doing these project
> as fast as I can. And because I often have this kind of project, I spend
> most of the year without being able to use Org-mode.
>
> So, if you have any suggestion on how to manage, in Org-mode, projects
> with:
> * Lot of work to do (many days)
> * Short deadline (not enough time)
> * High importance (disastrous consequences in my future in case of fail)
> * Many of them in the same time
> * Progression need to be followed to chose where to sacrifice time to
>   limit the damages

Interesting questions! I have the same general problem of, when things
heat up too much, I stop using the Org agenda. It's quite the opposite
of how it's supposed to work, but I guess it's something about human
psychology. I'll be interested to see what people say in this thread.

Some suggestions that come to mind:

- Create custom agenda views for each project, providing an overview of
  that project only, but use a single unified agenda view for each day's
  schedule. Look at the per-project agenda to decide if/how to complete
  it, but draw the action items into the unified schedule when deciding
  how to spend your day. It should become evident pretty quickly what
  you actually have time for. Projects are many, but there is only one
  of you.
- Maybe consider using `org-trigger-hook' and `org-blocker-hook' to cut
  down on TODO overwhelm.
- Use time estimates and then TODO clocking to more swiftly disabuse
  yourself of unrealistic expectations. This plus a schedule agenda can
  also help you make sure you stop work at a reasonable time and go do
  something else.
- Say no to more work :) Looking at your solid-packed agenda for the
  next day works wonders for saying no.

Good luck!




Re: How do you manage complex project with Org-mode

2022-02-28 Thread Matt


  On Mon, 28 Feb 2022 20:43:47 -0500 Sébastien Gendre  wrote 


 > And I don't know how to manage this kind of projects with Org-mode. How
 > to do it, without failing a 6 days project because I spent to much time
 > on something else and I have only 3 days left with 3 half-day important
 > appointment I cannot cancel. I can't risk failing a single one of these
 > project by trying. So, when I am in a period with a lot of these
 > projects, I stop using Org-mode and concentrate on doing these project
 > as fast as I can. And because I often have this kind of project, I spend
 > most of the year without being able to use Org-mode.

It sounds like you have a lot going on!  If none of what you need to do 
explicitly requires Org, you may have to scale back what you learn about Org to 
fit the time you've got. Give yourself permission to accept that the time you 
have right now for Org isn't what you want. (I hope that's because you're 
learning lots of other cool things in school.)  In situations like these, I 
like to do just a little each day. Maybe that means reading one paragraph a 
night before bed.  It sounds like you're really excited about Org.  (If you 
are, you've come to the right place. The people here love Org :) Reading about 
Org would be something fun to look forward to each night. You might be 
surprised at how motivating that one little paragraph can be! Working through 
the manual in this way will give you a good overview of how Org can be used and 
what you personally might use Org it for.

 > So, if you have any suggestion on how to manage, in Org-mode, projects
 > with:
 > * Lot of work to do (many days)
 > * Short deadline (not enough time)
 > * High importance (disastrous consequences in my future in case of fail)
 > * Many of them in the same time
 > * Progression need to be followed to chose where to sacrifice time to
 >   limit the damages
 > 
 > I will be happy to read them. :)

My suggestion is to not try something new on anything that has a tight 
deadline. Org is new to you and learning things takes time. This is all normal. 
Life will throw a lot at you.  Some times all I get is 20 minutes at the end of 
the day.  Some days, I get nothing at all. This is because I've filled my life 
with other cool things, like a partner, a house, friends, etc. If I get to 
spend some time doing something I think is worthwhile (like trying to help a 
fellow Org enthusiast), that's time well spent in my book.

Isn't there some saying that goes like, "every avalance starts as a snowflake?" 
Read a little, experiment a little, and over time, you'll be surprised at how 
much you've learned. You'll get there!  



How do you manage complex project with Org-mode

2022-02-28 Thread Sébastien Gendre
Hello,

I don't know if it's the correct place to ask it. If not, sorry to ask in
the wrong place.

How do you manage complex project with Org-mode ?

I used Org-mode for several periods of time in recent years. It worked
very well for short and day to day tasks. When only a few of theme have
deadlines and when you have plenty of time to do them.

But, as a student, I regularly have big and important projects to do for
the school. The kind of project who need several days to be done, with
deadlines too soon, and if you fail one them the consequences can be
disastrous. And generally, I have to many of these project in the same
time and not enough time to do all the work. So, I also need to follow
the progress of each project to choose which is sufficiently advanced to
be stop for the benefit of another less advanced project.

And I don't know how to manage this kind of projects with Org-mode. How
to do it, without failing a 6 days project because I spent to much time
on something else and I have only 3 days left with 3 half-day important
appointment I cannot cancel. I can't risk failing a single one of these
project by trying. So, when I am in a period with a lot of these
projects, I stop using Org-mode and concentrate on doing these project
as fast as I can. And because I often have this kind of project, I spend
most of the year without being able to use Org-mode.

So, if you have any suggestion on how to manage, in Org-mode, projects
with:
* Lot of work to do (many days)
* Short deadline (not enough time)
* High importance (disastrous consequences in my future in case of fail)
* Many of them in the same time
* Progression need to be followed to chose where to sacrifice time to
  limit the damages

I will be happy to read them. :)


Best regards

-
Seb







Re: quotation marks in table cell vs. org-babel-ref-resolve

2022-02-28 Thread Greg Minshall
i have a problem similar to this from a few months ago.  in this case,
it seems to be when trying to pass a column with a quoted-string inside
of it.  (this is on the "bugfix" branch.)  my e-lisp code seems to get
just the initial part of the string from the cell with "odd" contents.


#+name: xl
| this, "he said" | is where, | "you go in" there |

#+begin_src elisp :var xl=xl
  (message "%S" xl)
#+end_src


when i execute this, *Messages* says

(("this, \"he said\"" "is where," "you go in"))
Code block evaluation complete.

(my complaint: there's no there there. :)

in December, when i reported something similar, Tim pushed back, and
maybe i should elaborate:

> The key question is what is the use case for having this 'mixed'
> content in a table cell?

for better or worse, i most often use org-mode tables as (storage and
data entry mechanisms for) simple data bases.  other than the pipe
symbol ('|'), i assume i can put "anything" in a cell, and extract it
later.  i find this very valuable.

normally, i pass such tables to some R code (this example, btw, breaks
passing to R code).  but occasionally i do other things with them.

the behavior i'm seeing seems to me inconsistent, indicating it is maybe
not intentional.  exporting, for example, at least to html. i see the
full contents of the third column.

cheers, Greg



Re: Inconsistent handling of multi-line properties

2022-02-28 Thread Greg Sullivan
Thank you very much for that suggestion.
Unfortunately, that does not seem to work for org-export-taskjuggler.
An exported taskjuggler file has extremely simple syntax. For a report, for
example, there is the header, "textreport id name {"
then a series of "attribute_name", "value" pairs such as "formats html".
Some attributes take multi-line string values, which are designated
"-8<- \n line1 \n line2 \n ->8-" (but with actual newlines rather than
"\n"s).
The taskjuggler export uses a very simple approach: when an org headline is
tagged as a report, it cycles through the properties, and for each
property, simply emits the property name followed by the property value (
org-taskjuggler-valid-report-attributes contains names such as "formats'
and "center"):

   (org-taskjuggler--indent-string
> (org-taskjuggler--build-attributes
>  report org-taskjuggler-valid-report-attributes))
>
where

> (defun org-taskjuggler--build-attributes (item attributes)
>   (mapconcat
>(lambda (attribute)
>  (let ((value (org-element-property
>(intern (upcase (format ":%s" attribute)))
>item)))
>(and value (format "%s %s\n" attribute value
>(remq nil attributes) ""))
>


For an org source such as

** Reports
> :PROPERTIES:
> :REPORT_KIND: textreport
> :formats:  html
> :center: -8<-
> :center+:[#Plan Plan] | [#Resource_Allocation Resource Allocation]
> :center+:
> :center+:=== Plan ===
> :center+:<[report id="plan"]>
> :center+:
> :center+:=== Resource Allocation ===
> :center+:<[report id="resourceGraph"]>
> :center+: ->8-
> :END:
>

unfortunately, (org-element-property :center) returns only "-8<-", whereas
I want it to return a 9-line string.

-- Greg

--
Greg Sullivan   email: gr...@sulliwood.org   cell: 617-417-4746
70 Pigeon Hill Street, Rockport, MA 01966


On Mon, Feb 28, 2022 at 3:37 PM Kaushal Modi  wrote:

> On Sat, Oct 2, 2021 at 11:03 AM Hanno Perrey  wrote:
> >
> > Hej,
> >
> > I have noticed that properties that stretch over multiple lines using
> > the :value+: syntax are ignored by org-element-property and therefore
> > also by e.g. org-export-get-node-property when exporting to ics via
> > ox-icalendar.el (see example below). I was wondering now whether this is
> > intentional and to be expected or a bug?
>
> I use the :value+: syntax for the subtree properties regularly. For
> exports, though, you need to prefix the properties with EXPORT_.
>
> See the (org) Export Settings node in Org manual.
>
> > When exporting sub-trees, special node properties can override the
> above keywords.  These properties have an ‘EXPORT_’ prefix.  For
> example, ‘DATE’ becomes, ‘EXPORT_DATE’ when used for a specific
> sub-tree.  Except for ‘SETUPFILE’, all other keywords listed above have
> an ‘EXPORT_’ equivalent.
>
> Here's one of the pathogenic test cases of ox-hugo:
>
> =
> ** Custom front matter in multiple lines
> :PROPERTIES:
> :EXPORT_FILE_NAME: custom-front-matter-multiple-lines
> :EXPORT_DATE: 2017-07-24
> :EXPORT_HUGO_CUSTOM_FRONT_MATTER: :foo bar
> :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :baz zoo
> :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :alpha 1
> :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :beta "two words"
> :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :gamma 10
> :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :empty_string ""
> :END:
> =
>
> All the HUGO_CUSTOM_FRONT_MATTER properties get collected as expected.
>
> Here's another example:
>
> =
> #+author:
> #+options: toc:nil
> * Heading
> :PROPERTIES:
> :EXPORT_AUTHOR: abc def
> :EXPORT_AUTHOR+: ghi jkl
> :EXPORT_AUTHOR+: kmo pqr
> :END:
> =
>
> C-c C-e C-s t A exports to:
>
> =
>_
>
> HEADING
>
> abc def ghi jkl kmo pqr
>_
>
>
> =
>
>


Re: including one double quote in an anonymous footnote?

2022-02-28 Thread Juan Manuel Macías
Hi Greg and Nicolas,

Greg Minshall writes:

> Nicolas and Juan Manuel,
>
> thanks very much.  the bugfix branch seems to work for my case.

Thank you very much Nicolas. In my case it also works fine.

Best regards,

Juan Manuel 



Re: Inconsistent handling of multi-line properties

2022-02-28 Thread Kaushal Modi
On Mon, Feb 28, 2022 at 3:34 PM Kaushal Modi  wrote:
>
> On Sat, Oct 2, 2021 at 11:03 AM Hanno Perrey  wrote:
> >
> > Hej,
> >
> > I have noticed that properties that stretch over multiple lines using
> > the :value+: syntax are ignored by org-element-property and therefore
> > also by e.g. org-export-get-node-property when exporting to ics via
> > ox-icalendar.el (see example below). I was wondering now whether this is
> > intentional and to be expected or a bug?
>
> I use the :value+: syntax for the subtree properties regularly. For
> exports, though, you need to prefix the properties with EXPORT_.
>
> See the (org) Export Settings node in Org manual.
>
> > When exporting sub-trees, special node properties can override the
> above keywords.  These properties have an ‘EXPORT_’ prefix.  For
> example, ‘DATE’ becomes, ‘EXPORT_DATE’ when used for a specific
> sub-tree.  Except for ‘SETUPFILE’, all other keywords listed above have
> an ‘EXPORT_’ equivalent.

Sorry, ignore my email noise. I had never tried ox-icalendar before.
But I just tried it with your test snippet and it doesn't work as
expected even with the EXPORT_ prefix.

Also, I don't see any location info get exported to the .ics file
(with or without the EXPORT_ prefix). So I don't know what I should
expect to see in the .ics file.



Re: Inconsistent handling of multi-line properties

2022-02-28 Thread Kaushal Modi
On Sat, Oct 2, 2021 at 11:03 AM Hanno Perrey  wrote:
>
> Hej,
>
> I have noticed that properties that stretch over multiple lines using
> the :value+: syntax are ignored by org-element-property and therefore
> also by e.g. org-export-get-node-property when exporting to ics via
> ox-icalendar.el (see example below). I was wondering now whether this is
> intentional and to be expected or a bug?

I use the :value+: syntax for the subtree properties regularly. For
exports, though, you need to prefix the properties with EXPORT_.

See the (org) Export Settings node in Org manual.

> When exporting sub-trees, special node properties can override the
above keywords.  These properties have an ‘EXPORT_’ prefix.  For
example, ‘DATE’ becomes, ‘EXPORT_DATE’ when used for a specific
sub-tree.  Except for ‘SETUPFILE’, all other keywords listed above have
an ‘EXPORT_’ equivalent.

Here's one of the pathogenic test cases of ox-hugo:

=
** Custom front matter in multiple lines
:PROPERTIES:
:EXPORT_FILE_NAME: custom-front-matter-multiple-lines
:EXPORT_DATE: 2017-07-24
:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :foo bar
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :baz zoo
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :alpha 1
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :beta "two words"
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :gamma 10
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :empty_string ""
:END:
=

All the HUGO_CUSTOM_FRONT_MATTER properties get collected as expected.

Here's another example:

=
#+author:
#+options: toc:nil
* Heading
:PROPERTIES:
:EXPORT_AUTHOR: abc def
:EXPORT_AUTHOR+: ghi jkl
:EXPORT_AUTHOR+: kmo pqr
:END:
=

C-c C-e C-s t A exports to:

=
   _

HEADING

abc def ghi jkl kmo pqr
   _


=



Re: Inconsistent handling of multi-line properties

2022-02-28 Thread Greg Sullivan
I would really like the ability to use the ":myProperty+: " to create
multi-line properties for the org-export-taskjuggler exporter.
However, the mentioned patch is quite large and mostly focused on headline
caching, as far as I can tell.
@Ihor or @Hanno, Is there a patch just to get the :myProperty+: syntax to
work properly with org-element-property?
Thanks much.
-- Greg

--
Greg Sullivan   email: gr...@sulliwood.org   cell: 617-417-4746
70 Pigeon Hill Street, Rockport, MA 01966


On Sat, Oct 2, 2021 at 11:19 AM Ihor Radchenko  wrote:

> Hanno Perrey  writes:
>
> > Hej,
> >
> > I have noticed that properties that stretch over multiple lines using
> > the :value+: syntax are ignored by org-element-property and therefore
> > also by e.g. org-export-get-node-property when exporting to ics via
> > ox-icalendar.el (see example below). I was wondering now whether this is
> > intentional and to be expected or a bug?
>
> I proposed to change PROPERTY/PROPERTY+ handling in org-element (among
> other things):
> https://orgmode.org/list/87bl4p6n0m.fsf@localhost
>
> However, that code still need some testing.
>
> Best,
> Ihor
>
>


Re: including one double quote in an anonymous footnote?

2022-02-28 Thread Greg Minshall
Nicolas and Juan Manuel,

thanks very much.  the bugfix branch seems to work for my case.

cheers, Greg



Re: Links to javascript-based websites from orgmode.org: Paypal and Github

2022-02-28 Thread Michael Powe


On 2/28/2022 00:41, Richard Stallman wrote:
[[[ 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. 
]]] > > The FSF accepts credit card payments without Javascript, thanks 
to a > special arrangement with a credit card processor. But it is not > 
easy to get a credit card processor to accept you as a client that > 
way. > Hmm, well, perhaps you're thinking of a different issue. I'm 
referring to PayPal.


https://my.fsf.org/donate

The text on the page is: "PayPal (not recommended: requires nonfree 
JavaScript)"


My personal dislike of PP has nothing to do with the status of its page 
code, and everything to do with its corporate ethical code. I don't have 
money on account there.When buying overseas, I use PP as a routing agent 
to mask from my bank the destination of my CC charges.


Org will tread its own path on this. My feeling is that there's more at 
stake than Euros. But, I'm just a user.


mp

--
"Do not neglect to do good, and to share what you have." - Hebrews 13:16a
Michael Powe
Naugatuck CT USA
po...@ctpowe.net


Re: including one double quote in an anonymous footnote?

2022-02-28 Thread Nicolas Goaziou
Hello,

Juan Manuel Macías  writes:

> Greg Minshall writes:

> In any case, I don't know if that behavior should be considered a bug. I
> say this because other constructions with an unbalanced element,
> although org does not fontify them well, they are exported correctly:
>
> this is a test[fn::(this is an inline footnote]
>
> this is a test[fn::{this is an inline footnote]
>
> == LaTeX ==>
>
> this is a test\footnote{(this is an inline footnote}
>
> this is a test\footnote{\{this is an inline footnote}
>
> Instead, if you do  on your example,
> org-element-context doesn't recognize this as a footnote reference:
>
> this is a test[fn::"this is an inline footnote]
>
> Looking at `org-element-footnote-reference-parser', I'd say the problem
> is with:
>
> ...
> (with-syntax-table org-element--pair-square-table
>  (ignore-errors (scan-lists (point) 1 0)))
> ...
>
> If there is an unbalanced double quote inside a bracket construction,
> that expression returns nil and not the position after the final
> bracket. But I don't know how to go on :-(.

I think I fixed it in bugfix branch. Thanks.

Regards,
-- 
Nicolas Goaziou



[PATCH] ox: Prevent auto-formatting in export buffers

2022-02-28 Thread David Lukes
* ox.el (org-export-to-file): `write-region' instead of  `write-file'.

* ox-odt.el (org-odt-template, org-odt--export-wrap): `write-region'
instead of `save-buffer'.

`write-file' and `save-buffer' trigger major mode changes, which leads
to various mode-related hooks being run.  This is undesirable: running
these on generated files is wasted time and computation, and it can even
lead to hard to track data corruption when auto-formatting hooks are
involved.  One such case is the 2006 version of the tidy program which
ships with stock macOS and can corrupt multi-byte UTF-8 codepoints in
HTML and ODT (via XML) exports.  And even recent versions of tidy can
re-arrange whitespace in the exported documents in unwanted ways.

TINYCHANGE
---
 lisp/ox-odt.el |  4 ++--
 lisp/ox.el | 16 ++--
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 7f2e8ba47..6a8e75e9d 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1427,7 +1427,7 @@ original parsed data.  INFO is a plist holding export 
options."
(level (string-to-number (match-string 2
(if (wholenump sec-num) (<= level sec-num) sec-num))
(replace-match replacement t nil
-  (save-buffer 0)))
+  (write-region nil nil buffer-file-name)))
   ;; Update content.xml.
 
   (let* ( ;; `org-display-custom-times' should be accessed right
@@ -4018,7 +4018,7 @@ contextual information."
   ;; Prettify output if needed.
   (when org-odt-prettify-xml
 (indent-region (point-min) (point-max)))
-  (save-buffer 0)
+  (write-region nil nil buffer-file-name)
   ;; Run zip.
   (let* ((target --out-file)
  (target-name (file-name-nondirectory target))
diff --git a/lisp/ox.el b/lisp/ox.el
index 2a3edaa50..8ec1e25ee 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6459,18 +6459,14 @@ or FILE."
`(let ((output
(org-export-as
 ',backend ,subtreep ,visible-only ,body-only
-',ext-plist)))
-  (with-temp-buffer
-(insert output)
-(let ((coding-system-for-write ',encoding))
-  (write-file ,file)))
+',ext-plist))
+  (coding-system-for-write ',encoding))
+  (write-region output nil ,file)
   (or (ignore-errors (funcall ',post-process ,file)) ,file)))
 (let ((output (org-export-as
-   backend subtreep visible-only body-only ext-plist)))
-  (with-temp-buffer
-(insert output)
-(let ((coding-system-for-write encoding))
- (write-file file)))
+   backend subtreep visible-only body-only ext-plist))
+  (coding-system-for-write encoding))
+  (write-region output nil file)
   (when (and (org-export--copy-to-kill-ring-p) (org-string-nw-p 
output))
 (org-kill-new output))
   ;; Get proper return value.
-- 
2.34.1




Re: Communication problems and possible problems with the website

2022-02-28 Thread c.buhtz
On 2022-02-27 18:17 Bastien Guerry  wrote:
> My gut feeling is that we should focus on making the mailing list more
> accessible for beginners, more useful for everyone before considering
> setting up another communication channel.

I totally agree with that.



Re: Protect Org export from auto-formatting hooks

2022-02-28 Thread David Lukeš
Great, will do :) I realized at the last minute that some
`save-buffer' calls in `ox-odt.el' also need to be amended separately
(I was mostly testing these tweaks with HTML export, as it's faster /
simpler). If it's problematic, we can have that discussion over the
patch once I've submitted it.

Best,

David



[BUG] Propertized space in Agenda's mode-name [9.5.2 (release_9.5.2-3-geb9f34 @ /usr/local/share/emacs/28.0.91/lisp/org/)]

2022-02-28 Thread Gustavo Barros

Hi All,

I'm trying out the pre-release this week, and in thus doing, I met a 
particularly strange issue related to Org Agenda's `mode-name'.  And one 
space in particular, the one that is added before 
`org-agenda-current-span'.  The `mode-name' for the Agenda is set by 
`org-agenda-set-mode-name', and inside it we find:


#+begin_src emacs-lisp
" "
'(:eval (org-agenda-span-name org-agenda-current-span))
#+end_src

Now, this space somehow gets propertized.

A recipe for it.  Start `emacs -Q'.  Set things up:

#+begin_src emacs-lisp
(setq org-agenda-files '("~/agenda.org"))
(setq eval-expression-print-level nil)
(setq eval-expression-print-length nil)
#+end_src

Let's say =agenda.org= contains:

#+begin_src org
,* TODO Task
SCHEDULED: <2022-02-28 Mon>
#+end_src

Call `M-x org-agenda RET a'.  Now examine `mode-name' with `M-: 
mode-name RET' to get:


#+begin_src emacs-lisp
("Org-Agenda" "" #(" " 0 1 (todo-state #("TODO" 0 4 (fontified nil 
org-category "agenda")) org-habit-p nil priority 1099 warntime nil 
ts-date 738214 date (2 28 2022) type "scheduled" org-hd-marker #(moves after insertion) at 1 in agenda.org> org-marker #after insertion) at 24 in agenda.org> face org-scheduled-today 
undone-face org-scheduled-today help-echo "mouse-2 or RET jump to Org 
file ~/agenda.org" mouse-face highlight done-face org-agenda-done 
org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: 
+\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ 
]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ 	]*$" org-todo-regexp 
"\\(DONE\\|TODO\\)" org-not-done-regexp "\\(TODO\\)" dotime time format 
(((org-prefix-has-time t) (org-prefix-has-tag nil) 
(org-prefix-category-length 12) (org-prefix-has-effort nil) 
(org-prefix-has-breadcrumbs nil)) (format " %s %s%s%s" (format "%s" (if 
(member category-icon '("" nil)) "" (concat category-icon "" 
(get-text-property 0 'extra-space category-icon (format "%-12s" (if 
(member category '("" nil)) "" (concat category ":" (get-text-property 0 
'extra-space category (if (member time '("" nil)) "" (format "%-12s" 
(concat time ""))) (format "%s" (if (member extra '("" nil)) "" (concat 
extra " " (get-text-property 0 'extra-space extra)) extra 
"Scheduled: " time "" level " " txt #("TODO Task" 0 9 (fontified nil 
org-category "agenda" org-heading t)) breadcrumbs nil duration nil 
time-of-day nil org-priority-lowest 67 org-priority-highest 65 tags nil 
org-category "agenda")) (:eval (org-agenda-span-name 
org-agenda-current-span)) "" "" "" " Ddl" " Grid" "" "" "" "" "" "" "" 
"" "")

#+end_src

So, it appears that the Org Agenda buffer's properties are somehow 
getting to that particular space in `mode-name'.  It completely beats me 
how it is so but, alas, it is there.


This is a problem because, depending on what the content of your agenda 
is, this might result in this space getting some visually distinctive 
property.  In my case, I get a blank gap in the mode-line at this point. 
I couldn't generate a simple ECM that gets this effect.  But, at this 
point, it should be clear it can happen, given these properties are 
there.


This was all tested with the latest pre-release tarball, and the Org 
built-in there.  (I did not get the mode-line gap with 27.2 and the 
latest Org release for the same agendas).


Btw, since we are talking about this particular space in `mode-name', I 
always had some qualms with the fact that it is unconditionally added 
there, so that we get a double space for Agendas for which `(:eval 
(org-agenda-span-name org-agenda-current-span))' results in an empty 
string (e.g. a simple todo agenda).  Couldn't this space be added there 
conditionally there?  It is likely trivial to handle it directly in 
`org-agenda-span-name' (I know it also used in `org-agenda-list', but an 
optional argument could make the distinction).  WDYT?


Best regards,
Gustavo.



Emacs  : GNU Emacs 28.0.91 (build 2, x86_64-pc-linux-gnu, GTK+ Version 
3.24.20, cairo version 1.16.0)

of 2022-02-26
Package: Org mode version 9.5.2 (release_9.5.2-3-geb9f34 @ 
/usr/local/share/emacs/28.0.91/lisp/org/)


current state:
==
(setq
org-link-elisp-confirm-function 'yes-or-no-p
org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

org-agenda-files '("~/agenda.org")
org-export-before-parsing-hook '(org-attach-expand-links)
org-archive-hook '(org-attach-archive-delete-maybe)
org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-hide-drawers org-cycle-show-empty-lines

  org-optimize-window-after-visibility-change)
org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-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-confirm-shell-link-function 'yes-or-no-p
outline-isearch-open-invisible-function 

Re: Protect Org export from auto-formatting hooks

2022-02-28 Thread Nicolas Goaziou
Hello,

David Lukeš  writes:

> Thanks, that's indeed a much better way of doing it :) One can even
> avoid the temp buffer altogether and write the `output' string
> directly with `(write-region output nil file)`.

Yup, even better.

> Shall I prepare a patch? Or would you rather do it yourself, since it
> was your idea?

Please be my guest. :)

Regards,
-- 
Nicolas Goaziou



Re: Protect Org export from auto-formatting hooks

2022-02-28 Thread David Lukeš
> What about using `write-region' instead of `write-file' and not touching
> `set-auto-mode' function?

Thanks, that's indeed a much better way of doing it :) One can even
avoid the temp buffer altogether and write the `output' string
directly with `(write-region output nil file)`.

Shall I prepare a patch? Or would you rather do it yourself, since it
was your idea?

Best,

David