Re: Is this proper time format?

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

>> I am mostly questioning "for purposes described in this chapter".
>> All the TODO items can be labelled with multiple dates/times, not just in
>> "this chapter".
>
> I see.  I'm trying to say that the rest of this chapter describes how,
> where and why you would use dates/times in an Org file.  For example,
> the Timestamps subchapter describes what a timestamp looks like and that
> it can be used in any header or paragraph in an Org file and how the
> timestamp affects the agenda.

Maybe add a short second paragraph summarizing about timestamps,
scheduled, deadlines, and clocking? That's what people commonly do in
literature.

> I think I see what you're saying.  I'm fine with dropping "/times".
> ...
> Ah, then just drop the "and time" change.

Would you mind updating the patch?

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 

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



Re: Org element cache in indirect buffers

2023-06-13 Thread Ihor Radchenko
Ihor Radchenko  writes:

>> I also wonder if this means the caching is performed by each indirect buffer 
>> independently, and doesn't carry over.
>
> Caching is using base buffer actually.
> I guess we can explicitly set reference to the cache root to nil in
> indirect buffers.

Done, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2f7b35ac8
But I would not expect much actual gain from this. Maybe in some edge cases.

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



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-13 Thread Ihor Radchenko
John Wiegley  writes:

>> Ihor Radchenko  writes:
>
>> Changing the current behaviour will be a breaking change.
>>
>> I am inclined to change the current behaviour and document it, unless there
>> are objections.
>
> I would also note that in Org-mode 8 and earlier, ‘/ ’ would limit to
> all untagged entries, which is why I had that expectations.

Are you sure?
I can see 124017b6d that changes

(setq org-agenda-tag-filter
(cons (concat (if exclude "-" "+") tag)
  current))

to

(setq org-agenda-tag-filter
(cons (concat (if exclude "-" "+") tag)
  (if accumulate current nil)))

The former would leave the current filter unchanged.

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

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



Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-06-13 Thread Ihor Radchenko
Rudolf Adamkovič  writes:

> Max Nikulin  writes:
>
>> Perhaps it is better to keep current behavior with error by default
>> and just to recommend [...] a user is experimenting with sqlite
>> features.
>
> This is exactly the case where the user SHOULD use
>
> #+PROPERTY: header-args:sqlite :db 
>
> to avoid mistyping  across their SQLite blocks.
>
> [Hence, defaulting to ":memory:" would NOT hurt.]

I do not mind falling back to ":memory:" when :db is not specified, but
we should display a warning to notify the users. Maybe not as a warning
every time src block is executed, but at least via org-lint.

Rudolf, WDYT?

-- 
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-13 Thread Ihor Radchenko
Ruijie Yu  writes:

> -Worried about aligning free text tables?
> -Org mode does it in a single keystroke -- =tab=.
> +担心无法在文本表格中对齐?你只需按一个键 - =tab=​。

 May I know the purpose of adding extra "-"?
>>>
>>> Double-dash only renders as a short dash on HTML, whereas quintuple-dash
>>> yields a long dash.  This is more in the spirit of Chinese writing,
>>> because we usually use two full-width dashes as a "dash punctuation".
>>
>> Maybe just use \mdash entity then?
>
> Sure, I find double-\mdash looks good on HTML as well.

May you please rebase the patchset onto current master?
I had problems applying the patchset on my side.

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



Re: Org element cache in indirect buffers

2023-06-13 Thread Ihor Radchenko
[Adding Org ML back to CC]

Sebastian  writes:

> Thank you so much for the detailed explanation!
>
> Maybe memory-report is counting what's at the end of the reference, and
> your change fixes it.

memory-report is counting buffer data separately, even when buffer-local
variables reference to the same data objects.
I just reported this upstream: 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64050

My change simply clears the references to AVL-tree roots that are copied
over when Emacs clones the buffer. The edge cases I was talking about
are when the main AVL-tree changes its root. That would make indirect
buffer actually keep reference to obsolete root and the rest of the
obsolete AVL-tree, preventing it from being garbage-collected.

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



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

2023-06-13 Thread pondersson
The org-checkbox face does not get applied when using alphabetical
bullets in plain lists. See the attached ECM.

This might be intentional, and if so I'd like to know the reasoning
behind it, but I couldn't find any information about it in the code or
the manual. When checking Org's git history I found that the current
version of the responsible regexp dates back to 2010 whereas
alphabetical bullets were added in 2011, so I figure there's a chance
that it's just an oversight.

Here is a link to the regexp in question:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org.el?h=main#n5852

This issue was reported a couple of years ago but ignored:
https://lists.gnu.org/archive/html/emacs-orgmode/2021-02/msg00395.html

I'm using the latest development version of Org at the time of sending
this email.

Thanks


minimal.emacs
Description: Binary data
Numerical bullet, checkbox gets the org-checkbox face:
1) [X] item
Alphabetical bullet, no face:
a) [X] item


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

2023-06-13 Thread Samuel Wales
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.

does anybody know of a good replacement, different version, etc.?

ime it's a highly useful package.  it highlights and activates org
links and timestamps, but perhaps embark or a dedicated package has
superseded it?  (then i'd have to figure out embark,  which is
currently inscrutable.]

i know of hyperbole, but it doesn't seem to be quite for me.  it feels
a bit heavyweight, or so.  just me though.

here is the bt for the error.

Debugger entered--Lisp error: (error "org-link is not a valid folding spec")
  signal(error ("org-link is not a valid folding spec"))
  error("%s is not a valid folding spec" org-link)
  org-fold-core-set-folding-spec-property(org-link :visible nil)
  org-link-descriptive-ensure()
  org-toggle-link-display()
  org-link-minor-mode()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook sh-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook
sh-mode-hook))
  run-mode-hooks(sh-mode-hook)
  sh-mode()
  set-auto-mode-0(sh-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  ...

thanks.  [i just upgraded to current bugfix on 27.1 so that i won't
hit showstopper bugs later etc.  amazing: non-luddite.]

-- 
The Kafka Pandemic

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



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

2023-06-13 Thread Samuel Wales
seems this bug also prevents further loading of stuff like my fixme
highlighting.

On 6/13/23, Samuel Wales  wrote:
> 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.
>
> does anybody know of a good replacement, different version, etc.?
>
> ime it's a highly useful package.  it highlights and activates org
> links and timestamps, but perhaps embark or a dedicated package has
> superseded it?  (then i'd have to figure out embark,  which is
> currently inscrutable.]
>
> i know of hyperbole, but it doesn't seem to be quite for me.  it feels
> a bit heavyweight, or so.  just me though.
>
> here is the bt for the error.
>
> Debugger entered--Lisp error: (error "org-link is not a valid folding
> spec")
>   signal(error ("org-link is not a valid folding spec"))
>   error("%s is not a valid folding spec" org-link)
>   org-fold-core-set-folding-spec-property(org-link :visible nil)
>   org-link-descriptive-ensure()
>   org-toggle-link-display()
>   org-link-minor-mode()
>   run-hooks(change-major-mode-after-body-hook prog-mode-hook sh-mode-hook)
>   apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook
> sh-mode-hook))
>   run-mode-hooks(sh-mode-hook)
>   sh-mode()
>   set-auto-mode-0(sh-mode nil)
>   set-auto-mode()
>   normal-mode(t)
>   after-find-file(nil t)
>   ...
>
> thanks.  [i just upgraded to current bugfix on 27.1 so that i won't
> hit showstopper bugs later etc.  amazing: non-luddite.]
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

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



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

2023-06-13 Thread General discussions about Org-mode.
On Jun 13, 2023, at 20:02, Ihor Radchenko  wrote:
> 
> Ruijie Yu  writes:
> 
>> -Worried about aligning free text tables?
>> -Org mode does it in a single keystroke -- =tab=.
>> +担心无法在文本表格中对齐?你只需按一个键 - =tab=​。
> 
> May I know the purpose of adding extra "-"?
 
 Double-dash only renders as a short dash on HTML, whereas quintuple-dash
 yields a long dash.  This is more in the spirit of Chinese writing,
 because we usually use two full-width dashes as a "dash punctuation".
>>> 
>>> Maybe just use \mdash entity then?
>> 
>> Sure, I find double-\mdash looks good on HTML as well.
> 
> 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. 

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




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-13 Thread John Wiegley
> "IR" == Ihor Radchenko  writes:

IR> Are you sure?
IR> I can see 124017b6d that changes

IR> (setq org-agenda-tag-filter
IR> (cons (concat (if exclude "-" "+") tag)
IR>   current))

IR> to

IR> (setq org-agenda-tag-filter
IR> (cons (concat (if exclude "-" "+") tag)
IR>   (if accumulate current nil)))

IR> The former would leave the current filter unchanged.

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.

Since my data should all still be compatible with the old version I was using,
I’ll see if I can bisect this. I know I was used to that binding, but I’m not
100% certain it wasn’t due to extenuating factors in my configuration.

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



Re: Is this proper time format?

2023-06-13 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 b