Re: Is this proper time format?

2023-06-14 Thread David Masterson
Ihor Radchenko  writes:

> David Masterson  writes:
>>  To assist project planning, TODO items can be labeled with a date
>> -and/or a time.  The specially formatted string carrying the date and
>> +and/or a time for purposes like a timestamp on an event, a deadline
>> +for a task, or clocking time on a task as described in later sections
>> +of this chapter.  The specially formatted string carrying the date and
>>  time information is called a /timestamp/ in Org mode.
>
> IMHO, this is just creating confusion.
> Remember that this manual/guide is going to be read by people who are
> not yet familiar with Org mode terminology. What is "timestamp on an
> event"? What if you put a timestamp on a non-event? What is "clocking
> time"?

Ok.  I did use "like". ;-)

I don't want to get too in the weeds (because I don't know it all), so
how about:

... purposes like when an event happens, a deadline for a task, or
tracking time spent on a task ...

>>A simple timestamp just assigns a date/time to an item.  This is
>>just like writing down an appointment or event in a paper agenda.
>> +  There can be multiple timestamps in an event.
>
> Why event? What about tasks? Can just use more general "heading" or "entry".

Good point.  The paragraph already used 'item' -- would that be better?

New patch file attached:

Change log:

Doc change to explain timestamps better

doc/org-guide.org (Dates and Times): purpose of timestamp + examples
doc/org-manual.org (Dates and Times): purpose of timestamp + examples

diff --git a/doc/org-guide.org b/doc/org-guide.org
index 95828e4c0..e033ac0d9 100644
--- a/doc/org-guide.org
+++ b/doc/org-guide.org
@@ -1080,7 +1080,9 @@ Tags and Properties]].
 :END:
 
 To assist project planning, TODO items can be labeled with a date
-and/or a time.  The specially formatted string carrying the date and
+and/or a time purposes like when an event happens, a deadline for a
+task, or tracking time spent on a task as described in later sections
+of this chapter.  The specially formatted string carrying the date and
 time information is called a /timestamp/ in Org mode.
 
 ** Timestamps
@@ -1099,20 +1101,24 @@ the agenda (see [[*The Weekly/Daily Agenda]]).  We distinguish:
 
   A simple timestamp just assigns a date/time to an item.  This is
   just like writing down an appointment or event in a paper agenda.
+  There can be multiple timestamps in an item.
 
   #+begin_example
   ,* Meet Peter at the movies
 <2006-11-01 Wed 19:15>
   ,* Discussion on climate change
 <2006-11-02 Thu 20:00-22:00>
+  ,* My days off
+<2006-11-03 Fri>
+<2006-11-06 Mon>
   #+end_example
 
 - Timestamp with repeater interval ::
 
   A timestamp may contain a /repeater interval/, indicating that it
-  applies not only on the given date, but again and again after
-  a certain interval of N days (d), weeks (w), months (m), or years
-  (y).  The following shows up in the agenda every Wednesday:
+  applies not only on the given date, but again and again after a
+  certain interval of N hours (h), days (d), weeks (w), months (m), or
+  years (y).  The following shows up in the agenda every Wednesday:
 
   #+begin_example
   ,* Pick up Sam at school
@@ -1121,8 +1127,6 @@ the agenda (see [[*The Weekly/Daily Agenda]]).  We distinguish:
 
 - Diary-style expression entries ::
 
-  #+cindex: diary style timestamps
-  #+cindex: sexp timestamps
   For more complex date specifications, Org mode supports using the
   special expression diary entries implemented in the Emacs Calendar
   package.  For example, with optional time:
@@ -1132,13 +1136,28 @@ the agenda (see [[*The Weekly/Daily Agenda]]).  We distinguish:
 <%%(diary-float t 4 2)>
   #+end_example
 
+- Time range
+
+  Time range is a timestamp having two time units connected by =-=
+
+  #+begin_example
+  ,* Discussion on climate change
+<2006-11-02 Thu 10:00-12:00>
+  #+end_example
+
 - Time/Date range ::
 
-  Two timestamps connected by =--= denote a range.
+  Two timestamps connected by =--= denote a range.  In the agenda, the
+  headline is shown on the first and last day of the range, and on any
+  dates that are displayed and fall in the range.  The first example
+  specifies just the dates of the range while the second example
+  specifies a time range for each date.
 
   #+begin_example
   ,** Meeting in Amsterdam
  <2004-08-23 Mon>--<2004-08-26 Thu>
+  ,** This weeks committee meetings
+ <2004-08-23 Mon 10:00-11:00>--<2004-08-26 Thu 10:00-11:00>
   #+end_example
 
 - Inactive timestamp ::
diff --git a/doc/org-manual.org b/doc/org-manual.org
index c11694849..71f52fac6 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -5978,14 +5978,15 @@ or a dynamic block.
 #+cindex: dates
 #+cindex: times
 #+cindex: timestamp
-#+cindex: date stamp
 
 To assist project planning, TODO items can be labeled with a date
-and/or a time.  The specially formatted string carrying the date and
-time information is called 

alternative to org-link-minor-mode

2023-06-14 Thread Samuel Wales
On 6/14/23, Ihor Radchenko  wrote:
> Samuel Wales  writes:
>
>> just a note that org-link-minor-mode produces this error upon e.g.
>> find-file on a bash file, presumably due to org links in it: File mode
>> specification error: (error org-link is not a valid folding spec)
>>
>> my version is url = https://github.com/swhahn/org-link-minor-mode and
>> it is up to date.
>
> It is no longer compatible with Org mode and not maintained.

thanks.

does anybody recommend or know a decent alternative to this package?
it highlights and activates org links AND timestamps in non-org files.

thus, for example, you can be in a.el and have a colored link to
another place in a.el, or b.el, or an url, or whatever, and an org
timestamp nicely colored.  i find it highly useful for keeping
together separated stuff needing coordination.

>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>


-- 
The Kafka Pandemic

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



Re: [POLL] [BUG] Inverse behavior from \ [9.6.4 (release_9.6.4-1-g76cf21 @ /Users/johnw/.emacs.d/lisp/org-mode/lisp/)]

2023-06-14 Thread John Wiegley
> "IR" == Ihor Radchenko  writes:

IR> It would be nice to bisect down to the commit that changed the behaviour.
IR> As it usually goes with agenda, consequences of some changes are not
IR> always straightforward.

I have found the cause of the change in behavior:

  (org-agenda-filter-make-matcher '("+" . nil) 'tag)
=> 8.2.4: (and (not tags))
=> 9.6.6: (and (or tags))

This occurred during the refactoring in:

  commit 6c6ae990c10dbe7f96b24fccf840fe9f6d81a3b8
  Author: Gustav Wikström 
  Date:   Sat Jan 24 02:47:35 2015 +0100
  
  org-agenda: Filtering in the agenda on grouptags

  […]
  
  * lisp/org-agenda.el (org-agenda-filter-make-matcher): new optional
argument EXPAND and refactoring.

The change was released in 8.3, which is why I never noticed it, because I
upgraded from 8.2.4 directly to 9.6.

Since the documentation also mentions that space means “any tag”, I guess now
it’s a design question: Should  mean “no tags” or “any tag”? I feel
like it should mean “no tag” only because you also use space to clear all tags
in the agenda after pressing “:”.

If the decision is “desired behavior”, then the muscle memory needed is
‘\ - ‘ rather than ‘\ ‘. Still feels odd for space to mean
anything rather than nothing, though… I mean, space is empty, right? :)

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2



Re: org-link-minor-mode broken with File mode specification error: (error org-link is not a valid folding spec)

2023-06-14 Thread Ihor Radchenko
Samuel Wales  writes:

> just a note that org-link-minor-mode produces this error upon e.g.
> find-file on a bash file, presumably due to org links in it: File mode
> specification error: (error org-link is not a valid folding spec)
>
> my version is url = https://github.com/swhahn/org-link-minor-mode and
> it is up to date.

It is no longer compatible with Org mode and not maintained.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [orgweb/zh-CN] [DRAFT PATCH v7] Tentative zh-CN translation

2023-06-14 Thread Ihor Radchenko
Ruijie Yu  writes:

>> May you please rebase the patchset onto current master?
>> I had problems applying the patchset on my side.
>
> Will do this weekend.  Please note that I will no longer have much time 
> during weekdays, and that I really want to have my employer disclaimer done 
> before this should go in.  I’ll keep you updated when everything is ready on 
> my end, thanks. 

Noted. But didn't you get the copyright assignment done already? 
https://list.orgmode.org/orgmode/a0f0be34-70cb-4af1-8917-518d6e380...@netyu.xyz/

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org-babel-expand-call-block

2023-06-14 Thread Ihor Radchenko
Samuel Culpepper  writes:

>> Do I understand correctly that you are trying to get #+calls to LOB
>> blocks expanded as usual via org-babel-expand-src-block?
>
> Sure, uniformity in "expansion" is the ideal case.
>
> I use LOB pretty extensively, so this hack allows such uniformity along
> the "kill-expanded-SRC".
>
> Would you consider a patch to org-babel-expand-src-block which
> generalizes in this manner?

We can generalize `org-babel-expand-src-block' and
`org-babel-expand-src-block-maybe'.

I am not sure about killing. We need to ask if other users are
interested in such functionality.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] org-faq.org: rename org-export-htmlize-* options to org-html-htmlize-*

2023-06-14 Thread Ihor Radchenko
dongdigua  writes:

> look at this commit:
> https://git.sr.ht/~bzg/org-mode/commit/8134e80bdfb55bbce9aecf3f5958a2bd43cc0b63
> the document didn't catch up with source code
>
> I encountered this problem in: 
> https://emacs-china.org/t/org-emacs-script-org-publish-all/20782
> and documented it in: https://dongdigua.github.io/org_export_highlight

Thanks for the patch! Looks good, but I cannot apply it.
May you please format the patch using git format-patch or git
send-email? See https://orgmode.org/worg/org-contribute.html#patches

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] Source block indentation does not work properly for yaml-mode [9.6.6 ( @ /home/user/.emacs.d/elpa/org-9.6.6/)]

2023-06-14 Thread Ihor Radchenko
wolf  writes:

> Reproduction steps:
> 1. Have org-mode and yaml-mode installed.
> 2. C-x C-f /tmp/x.org RET
> 3. Type in:
>
> #+begin_src yaml
>   a:
> b:
>   c:
>   d:
> #+end_src
>
> After each line, press RET to go to the next one.  RET is bound to org-return.
> Notice that when you press RET after `c:', emacs will insert a TAB character,
> instead of expected 8 spaces.

Confirmed.
This is caused by `org-src--contents-for-write-back' not adjusting
blank line indentation in some cases.

The attached diff will fix the issue, but git log reveals that the whole
thing is fragile - we adjusted code in this area multiple times with
a number of tricky special cases:

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e1c49af76
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=70e65a202
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ee0fd1ec3
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=70e65a202
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=857ae366b
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=91236a3db

https://orgmode.org/list/0f961d3b-a4ef-fbbf-ab16-7ff1af8b2...@gmail.com
https://orgmode.org/list/5DCBAF63-0E88-44AC-B892-1260F37E7E00@manicmind.earth

CCing Bastien and Sébastien, the authors of the previous commits in this
area.

I feel that the whole approach we use now with preserve-fl, use-tabs?,
and preserve-blank-line is overcomplicated. Maybe someone can explain
why we need all these special cases? The code does not reveal a whole lot.

diff --git a/lisp/org-src.el b/lisp/org-src.el
index 317682844..876310867 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -499,12 +499,9 @@ (defun org-src--contents-for-write-back (write-back-buf)
 	(when preserve-fl (forward-line))
 (while (not (eobp))
 	  (skip-chars-forward " \t")
-  (when (or (not (eolp))   ; not a blank line
-(and (eq (point) (marker-position marker)) ; current line
- preserve-blank-line))
-	(let ((i (current-column)))
-	  (delete-region (line-beginning-position) (point))
-	  (indent-to (+ i indentation-offset
+	  (let ((i (current-column)))
+	(delete-region (line-beginning-position) (point))
+	(indent-to (+ i indentation-offset)))
 	  (forward-line)))
   (set-marker marker nil
 

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 


Re: Is this proper time format?

2023-06-14 Thread Ihor Radchenko
David Masterson  writes:

> Ihor Radchenko  writes:
>
>> Would you mind updating the patch?
>
> See below.

Thanks!

>> If you do not use magit, you can easily re-create patches for a given
>> file from Emacs using
>> M-x vc-diff  M-x write-file  /path/to/your.path 
>
> I do use magit, but I'm not good with it.  In particular, I wanted to
> walk thru my changes with EDiff, but, when ediff brought up the buffers,
> the buffers were in org-mode and everything was folded and I didn't see
> how to tell ediff to not fold so I could see the diffs.

Usually, the diff provided in M-x magit-status is good enough.
You could also use M-x org-show-all to unfold everything.

>  To assist project planning, TODO items can be labeled with a date
> -and/or a time.  The specially formatted string carrying the date and
> +and/or a time for purposes like a timestamp on an event, a deadline
> +for a task, or clocking time on a task as described in later sections
> +of this chapter.  The specially formatted string carrying the date and
>  time information is called a /timestamp/ in Org mode.

IMHO, this is just creating confusion.
Remember that this manual/guide is going to be read by people who are
not yet familiar with Org mode terminology. What is "timestamp on an
event"? What if you put a timestamp on a non-event? What is "clocking
time"?

>  
>A simple timestamp just assigns a date/time to an item.  This is
>just like writing down an appointment or event in a paper agenda.
> +  There can be multiple timestamps in an event.

Why event? What about tasks? Can just use more general "heading" or "entry".

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Bug: org-checkbox face for alphabetical items is not set [9.4.4,(9.4.4-16-g0abd4a-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20210201/)]

2023-06-14 Thread Ihor Radchenko
che...@posteo.org writes:

> I set org-list-allow-alphabetical to allow alphabetical item
> enumeration. But it seems that the org-checkbox face is not set if there
> are checkboxes.
>
> Example:
>
> #+begin_src org
> - [ ] Hello
>1. [ ] World
>   a. [ ] foo
> #+end_src
>
> In my setup, the [ ] at 'a. [ ] foo' does not appear as
> checkbox. However, the interaction, e.g. C-c C-c for toggle, does still 
> work.

Fixed.
See 
https://orgmode.org/list/CAHewz5N5vNMiWFuG3t=bzoyvmsyswyerz6vslc88dgtxr+a...@mail.gmail.com

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] No org-checkbox face when using alphabetical bullets

2023-06-14 Thread Ihor Radchenko
pondersson  writes:

> The org-checkbox face does not get applied when using alphabetical
> bullets in plain lists. See the attached ECM.

Thanks for reporting and taking time to search previous reports!
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a07260856

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org-babel-expand-call-block

2023-06-14 Thread Samuel Culpepper

> Do I understand correctly that you are trying to get #+calls to LOB
> blocks expanded as usual via org-babel-expand-src-block?

Sure, uniformity in "expansion" is the ideal case.

I use LOB pretty extensively, so this hack allows such uniformity along
the "kill-expanded-SRC".

Would you consider a patch to org-babel-expand-src-block which
generalizes in this manner?

-- 
Best regards,
Samuel Culpepper


signature.asc
Description: PGP signature


[PATCH] org-faq.org: rename org-export-htmlize-* options to org-html-htmlize-*

2023-06-14 Thread dongdigua

look at this commit:
https://git.sr.ht/~bzg/org-mode/commit/8134e80bdfb55bbce9aecf3f5958a2bd43cc0b63
the document didn't catch up with source code

I encountered this problem in: 
https://emacs-china.org/t/org-emacs-script-org-publish-all/20782

and documented it in: https://dongdigua.github.io/org_export_highlight


--- a/org-faq.org
+++ b/org-faq.org
@@ -3793,7 +3793,7 @@
options or via global variables. See 
[[https://orgmode.org/manual/Export-settings.html#Export-settings][this 
section]] of the manual for a

full list.

-** How can I preserve faces when I export an agenda from the command 
line?
+** How can I preserve faces when I export an org file from the command 
line?

   :PROPERTIES:
   :CUSTOM_ID: preserving-faces-during-batch-export
   :END:
@@ -3821,18 +3821,18 @@
definitions. If you'd like to use more complex styles, you'll have to
make sure that the export process only assigns classes instead of
direct color values. This can be done by binding the variable
-=org-export-htmlize-output-style= to =css= for the duration of the
+=org-html-htmlize-output-style= to =css= for the duration of the
export, for example with

: emacs -batch -l ~/.emacs
-: -eval '(let ((org-export-htmlize-generate-css (quote css)))
+: -eval '(let ((org-html-htmlize-generate-css (quote css)))
: (org-batch-agenda "e"))'

Then you can use a style file to make these classes look any way you
like. To generate face definitions for a CSS file based on any faces
you are currently using in Emacs, you can use the following command:

-: M-x org-export-htmlize-generate-css RET
+: M-x org-html-htmlize-generate-css RET

This will generate a =...= section, the content of
which you can add to your style file.
---
https://dongdigua.github.io






Re: Interest in an Org video meetup?

2023-06-14 Thread Ravi Sagar
Hello,

Thanks a lot for letting me know. I will join the discussion.

Ravi

On Mon, Jun 12, 2023 at 11:34 AM Ihor Radchenko  wrote:

> Russell Adams  writes:
>
> > On Wed, Apr 26, 2023 at 04:13:47PM -0500, Corwin Brust wrote:
> >> On Wed, Apr 26, 2023 at 9:31 AM Matt  wrote:
> >> >
> >> > FSF associate members have access to a FSF hosted Jitsi instance.
> I'm an FSF associate member and could host it using that if I'm able to
> make the time.
> >> >
> >>
> >> We can make EmacsConf instance of BigBlueButton (BBB) available, as
> >> well.  FWIW I had more success with BBB than Jitsi for larger
> >> meetings.
>
> CCing Ravi Sagar. He expressed an interest in hosting some Org-related
> meetups in https://www.youtube.com/watch?v=v0U_uC8molg
>
> Web-link to this discussion:
> https://list.orgmode.org/Yz7WCJTmJonuuiMr@tahm/
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>


-- 
Ravi Sagar 
Principal Consultant, Sparxsys 


Re: Where does headline data end for the purpose of `org-adapt-indentation´ == ´headline-data

2023-06-14 Thread Jens Schmidt

On 2023-06-09  09:34, Ihor Radchenko wrote:


Emacs master tracks the latest stable Org release.


OK, so I cobbled up Org main with branch emacs-29.

./src/emacs -Q

M-x org-version

Org mode version 9.7-pre (release_9.6.6-408-g9082fa @ ...)

(setq org-adapt-indentation 'headline-data)

Paste the following into a new org file, headline A being the on the
first line:

 snip 
** Headline A



** Headline B



** Headline C
   :properties:
 snip 

Then try TAB on lines (my humble opinion in parentheses)

2: no indent (NOK)
3: no indent (OK)
6: indent (OK)
7: indent (NOK)
11: no indent (NOK)

I could try "fixing" that, but I'm not sure what is intended an what not.

WDYT?




[BUG] Source block indentation does not work properly for yaml-mode [9.6.6 ( @ /home/user/.emacs.d/elpa/org-9.6.6/)]

2023-06-14 Thread wolf
Hello,

when editing a source block of yaml type, the indentation does not work properly
(tabs are used instead of spaces).  I am not sure if org or yaml-mode are the
cause, however since RET is bound to org-return, I am reporting it here first.

I did test it inside a container with nothing but emacs, so no user
configuration is involved at all.

Reproduction steps:
1. Have org-mode and yaml-mode installed.
2. C-x C-f /tmp/x.org RET
3. Type in:

#+begin_src yaml
  a:
b:
  c:
d:
#+end_src

After each line, press RET to go to the next one.  RET is bound to org-return.
Notice that when you press RET after `c:', emacs will insert a TAB character,
instead of expected 8 spaces.

When editing a yaml document in yaml-mode (either a separate document, or using
the C-c '), the indentation works properly.



yaml-mode: version 0.0.15 (but I did test the latest from melpa with same 
result)

Emacs  : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, 
cairo version 1.16.0)
Package: Org mode version 9.6.6 ( @ /home/wolf/.emacs.d/elpa/org-9.6.6/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300^A\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-cycle-optimize-window-after-visibility-change
  org-cycle-display-inline-images)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-fold-show-all append 
local] 5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all 
append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-confirm-shell-link-function 'yes-or-no-p
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow :complete
org-attach-complete-link)
   ("id" :follow org-id-open)
   ("eww" :follow org-eww-open :store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store 
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link 
:export
org-irc-export)
   ("info" :follow org-info-open :export org-info-export 
:store
org-info-store-link :insert-description
org-info-description-as-command)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export 
org-docview-export :store
org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store 
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export 
:complete
org-bbdb-complete-link :store org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link)
   ("doi" :follow org-link-doi-open :export 
org-link-doi-export)
   ("file+sys") ("file+emacs") ("shell" :follow 
org-link--open-shell)
   ("news" :follow
#[514 "\301\300\302^DQ^B\"\207" ["news" browse-url ":"] 
6
  "\n\n(fn URL ARG)"]
)
   ("mailto" :follow
#[514 "\301\300\302^DQ^B\"\207" ["mailto" browse-url 
":"] 6
  "\n\n(fn URL ARG)"]
)
   ("https" :follow
#[514 "\301\300\302^DQ^B\"\207" ["https" browse-url 
":"] 

Re: How to export to the simplest possible HTML?

2023-06-14 Thread Thomas Redelberger

Dear Marcin and everybody,

I had a similar requirement for "simplest HTML" and have documented how I 
tackled this under
 http://web222.webclient5.de/doc/swdev/emacs/orgmode/html

In summary, it is
- a few settings in init.el:
  + org-html-text-markup-alist similar to below
  + setting org-export-allow-bind-keywords to t
- seeting quite some org variables via in-buffer settings
- elisp to steer a final XSLT transformation of the generated HTML


I had coded a derived export back-end (for Emacs 25.1) and used it quite for 
some time. When I moved to Emacs 27.2, the derived back-end did not work any 
more, hence I changed to above aproach.

Best regards
Thomas


Am 2023-05-30 um 20:48 schrieb Marcin Borkowski:


On 2023-05-30, at 17:32, Max Nikulin  wrote:


On 30/05/2023 10:47, Marcin Borkowski wrote:

since I'm going to
call my exporting function in a loop over many elements.  I tried
(org-export-with-backend 'html (org-element-at-point (point)))


There is `org-export-string-as', but likely it is not suitable for
you. My guess is that you are going to export headings (blog posts) to
separate html files.


Correct, dear Holmes. ;-)


This is /italic/.
can become e.g.
This is italic.


I am curious whether  is more friendly to screen readers
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em


Good point.  You're right, I'll probably go with `' then.  (The
reason I wanted `' was that I wan't somewhat atypical styling,
namely letterspace.  But of course css magic can make `' do this,
too.)


I'm considering writing a custom (derived) export backend, but maybe
that is an overkill?  Any ideas?


I just have noticed

(defcustom org-html-text-markup-alist
   '((bold . "%s")
 (code . "%s")
 (italic . "%s")
 (strike-through . "%s")
 (underline . "%s")
 (verbatim . "%s"))
   "Alist of HTML expressions to convert text markup.

You may look into ox-html customizations such as
(:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
(:html-html5-fancy nil "html5-fancy" org-html-html5-fancy)

I have never tried ox-slimhtml:
Laszlo Elo. ox-slimhtml. Mon, 14 Dec 2020 00:48:27
-0500. https://list.orgmode.org/41d2e10d-bcff-4604-8417-b499514af...@bald.cat


Ah, that looks interesting, too.

Thanks!





Re: Is this proper time format?

2023-06-14 Thread David Masterson
Ihor Radchenko  writes:

> Would you mind updating the patch?

See below.

> If you do not use magit, you can easily re-create patches for a given
> file from Emacs using
> M-x vc-diff  M-x write-file  /path/to/your.path 

I do use magit, but I'm not good with it.  In particular, I wanted to
walk thru my changes with EDiff, but, when ediff brought up the buffers,
the buffers were in org-mode and everything was folded and I didn't see
how to tell ediff to not fold so I could see the diffs.

Change log:

Doc change to explain timestamps better

doc/org-guide.org (Dates and Times): purpose of timestamp + examples
doc/org-manual.org (Dates and Times): purpose of timestamp + examples


diff --git a/doc/org-guide.org b/doc/org-guide.org
index 95828e4c0..3a19027ba 100644
--- a/doc/org-guide.org
+++ b/doc/org-guide.org
@@ -1080,7 +1080,9 @@ Tags and Properties]].
 :END:
 
 To assist project planning, TODO items can be labeled with a date
-and/or a time.  The specially formatted string carrying the date and
+and/or a time for purposes like a timestamp on an event, a deadline
+for a task, or clocking time on a task as described in later sections
+of this chapter.  The specially formatted string carrying the date and
 time information is called a /timestamp/ in Org mode.
 
 ** Timestamps
@@ -1099,20 +1101,24 @@ the agenda (see [[*The Weekly/Daily Agenda]]).  We distinguish:
 
   A simple timestamp just assigns a date/time to an item.  This is
   just like writing down an appointment or event in a paper agenda.
+  There can be multiple timestamps in an event.
 
   #+begin_example
   ,* Meet Peter at the movies
 <2006-11-01 Wed 19:15>
   ,* Discussion on climate change
 <2006-11-02 Thu 20:00-22:00>
+  ,* My days off
+<2006-11-03 Fri>
+<2006-11-06 Mon>
   #+end_example
 
 - Timestamp with repeater interval ::
 
   A timestamp may contain a /repeater interval/, indicating that it
-  applies not only on the given date, but again and again after
-  a certain interval of N days (d), weeks (w), months (m), or years
-  (y).  The following shows up in the agenda every Wednesday:
+  applies not only on the given date, but again and again after a
+  certain interval of N hours (h), days (d), weeks (w), months (m), or
+  years (y).  The following shows up in the agenda every Wednesday:
 
   #+begin_example
   ,* Pick up Sam at school
@@ -1121,8 +1127,6 @@ the agenda (see [[*The Weekly/Daily Agenda]]).  We distinguish:
 
 - Diary-style expression entries ::
 
-  #+cindex: diary style timestamps
-  #+cindex: sexp timestamps
   For more complex date specifications, Org mode supports using the
   special expression diary entries implemented in the Emacs Calendar
   package.  For example, with optional time:
@@ -1132,13 +1136,28 @@ the agenda (see [[*The Weekly/Daily Agenda]]).  We distinguish:
 <%%(diary-float t 4 2)>
   #+end_example
 
+- Time range
+
+  Time range is a timestamp having two time units connected by =-=
+
+  #+begin_example
+  ,* Discussion on climate change
+<2006-11-02 Thu 10:00-12:00>
+  #+end_example
+
 - Time/Date range ::
 
-  Two timestamps connected by =--= denote a range.
+  Two timestamps connected by =--= denote a range.  In the agenda, the
+  headline is shown on the first and last day of the range, and on any
+  dates that are displayed and fall in the range.  The first example
+  specifies just the dates of the range while the second example
+  specifies a time range for each date.
 
   #+begin_example
   ,** Meeting in Amsterdam
  <2004-08-23 Mon>--<2004-08-26 Thu>
+  ,** This weeks committee meetings
+ <2004-08-23 Mon 10:00-11:00>--<2004-08-26 Thu 10:00-11:00>
   #+end_example
 
 - Inactive timestamp ::
diff --git a/doc/org-manual.org b/doc/org-manual.org
index c11694849..3ec9bc10b 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -5978,10 +5978,11 @@ or a dynamic block.
 #+cindex: dates
 #+cindex: times
 #+cindex: timestamp
-#+cindex: date stamp
 
 To assist project planning, TODO items can be labeled with a date
-and/or a time.  The specially formatted string carrying the date and
+and/or a time for purposes like a timestamp on an event, a deadline
+for a task, or clocking time on a task as described in later sections
+of this chapter.  The specially formatted string carrying the date and
 time information is called a /timestamp/ in Org mode.  This may be
 a little confusing because timestamp is often used as indicating when
 something was created or last changed.  However, in Org mode this term
@@ -5993,16 +5994,15 @@ is used in a much wider sense.
 :END:
 #+cindex: timestamps
 #+cindex: ranges, time
-#+cindex: date stamps
 #+cindex: deadlines
 #+cindex: scheduling
 
-A timestamp is a specification of a date (possibly with a time) in a
-special format, either =<2003-09-16 Tue>= or
-=<2003-09-16 Tue 09:39>=[fn:19].  A timestamp can appear anywhere in
-the headline or body of an Org tree entry.  Its presence causes
-entries to