Re: Experimental public branch for inline special blocks

2024-04-10 Thread Juan Manuel Macías
Ihor Radchenko writes:

> Max Nikulin  writes:
>
>> On 09/04/2024 15:52, Ihor Radchenko wrote:
>>> Aside: It looks like your public branch is not up-to-date as the time
>>>of writing this email - I do not see commits changing the syntax to
>>>@foo{...} and @@{...} yet,
>>
>> Do you have in your local copy the following?
>> ...
>
> I do now. Apparently, I somehow reviewed an earlier local copy of the
> branch.

Hi, Ihor. Thanks for all your comments. I will try to answer each of the
questions you have raised. Let's see if I can find a space next week...

The latest added to the branch are Maxim's proposals (and code) for
backend control. See this thread:

https://list.orgmode.org/?t=20240321102752

And this other thread, continuation of the previous one:

https://list.orgmode.org/877ciavnwo.fsf...@posteo.net/

Best regards,

Juan Manuel 



Re: Agenda preserve setting on date change

2024-04-10 Thread Samuel Wales
actually you migt be betst ignoring the notes as they were written many
years before even the tses in it.  but the code wfm.

On Wednesday, April 10, 2024, Samuel Wales  wrote:

> to me, the concepts of the log mode feature and the showing inactive tses
> feature are so close that they are worth merging into the same
> functionality, parameterized if needed [not needed for me].
>
> in my own case, i basically want all [log mode and inactive tses] off or
> all on.  years ago, i implemented a toggle, using log mode as the toggle.
> i made lots of notes, but the notes might not be comprehensible to anybody.
>
> i also wanted certain information to show or not show regarding state
> changes.
>
> the code is trivial.  it merely toggles inactive when you toggle log mode.
>
> ;; [[id:26806393-dca3-43a6-a92d-d8985d32f4bd][COMMENT issues with my
> inactive thing -- need to have v L still respect inactive, but pre-empt
> when state change]]
> ;;
> ;; if i want to see state changes i have to do v L, but inactive
> ;; disappears.  so i need to do l twice to fix it, but that
> ;; deletes state changes
> ;;
> ;; currently implemented options are state changes but no
> ;; inactive, state changes with redundant inactive, and only
> ;; inactive.
> ;;
> ;; i want inactive preempted by state change.  but don't care
> ;; much if i can just get inactive, which i do.
> ;;
> ;; =later this might or might not be analogous to closed being
> ;; tagged ts and thus correctly not tsia.
>
> ;;l or v l is for log mode: closed (doneish), clock, and state if
> ;;you set that.
> ;;
> ;;what about notes?
> ;;
> ;; too confusing to have two levels of log mode unless i really
> ;; want to always show something (like closed deadline) and
> ;; toggle showing all.  which i don't really need.  i prefer all
> ;; or none i think.
> ;;
> ;;super log mode (/logall/ log all) c-u l or v L is particularly
> ;;useful as it includes state changes with fewer bugs than [ (but
> ;;still not yet other inactive timestamps).
> ;;
> ;; maybe i can use the intermediate sort thing -- the thing sacha
> ;; used and that i use to sort or set scores or something -- to
> ;; eliminate duplicates after setting logall and also using my
> ;; inactive.  [2016-04-07 Thu 20:37]  
> org-agenda-before-sorting-filter-function
> ka
> ;;
> ;; try setting org-agenda-log-mode-items to allow state and find
> ;; out what gets duplicated.  i think it is just that it shows as
> ;; a bare inactive timetamp and as a state change.
> ;;
> ;; [ is different from log mode.
> ;;
> ;; [ provides nothing with my current setup which shows inactive
> ;; timestamps without duplicates.
> ;;
> ;;there are bugs with [
> ;;  [ with no log mode loses information
> ;;repeater state is just nextrepeat
> ;;  [ resets upon navigation while l does not
> ;;you can't make it persist or start up with it
> ;;  log mode (if you include state change) gets duplicated
> ;;it finds the inactive timestamp?
> ;;but only for state changes, not all?  =could check
> ;;  active timestamps including deadline and scheduled do not show
> ;;presumably this is ok because will be elsewhere
> ;;=later this needs detail
> ;;
> ;;adding state to org-agenda-log-mode-items makes l and log
> ;;mode at startup do the same thing as logall = c-u l or v L.
> ;;
> ;; state in org-agenda-log-mode-items duplicates inactive
> ;; (presumably because inactive does not exclude it).  it is sort
> ;; of useful.  i'd like bangification or todo kw.  if needed i
> ;; can use logall (c-u l or v L).
> ;;
> ;; =later i think i implemented bangification for ts agenda, with
> ;; slightly different semantics from bangification for search
> ;; agenda.  because more useful not to bangify known d s or so.
> ;;
> ;; /log mode does not show inactive timestamps/ ka.
> ;;   to me, the concepts are similar enough that they should be
> ;;   merged into the same mechanism.  i do that here.  also [ is
> ;;   conflated between two unrelated features.
> ;;
> ;;the default of org-agenda-log-mode-items is closed and clock
> ;;which is good.  that leaves out inactive, but i have a solution
> ;;for that.  but perhaps i can do state and filter it.
> ;;  [2016-04-26 Tue 11:05] sometimes it duplicates my inactive
> '(with-eval-after-load 'org-agenda
>   (add-to-list 'org-agenda-log-mode-items 'state))
> ;;
> ;;this is a good solution, but it is a defvar not defcustom.  it
> ;;might exclude the ts in the closed ts.  which is good in this
> ;;case because we show closed in org-agenda-log-mode-items.  and
> ;;that shows them in a closed face with closed leader.
> ;;
> ;; this is problematic when org-agenda-start-with-log-mode is
> ;; nil.  we want it nil then.  and then (as i have it) toggle it
> ;; on when doing log mode.
> ;; [2018-12-10 Mon 19:31] turning off because i have start with log mode
> off
> ;; (setq org-agenda-include-inactive-timestamps nil)
> ;; (setq org-agenda-include-inactive-timestamps t)
> ;;this way i can see what i did so far in 

Re: Agenda preserve setting on date change

2024-04-10 Thread Samuel Wales
to me, the concepts of the log mode feature and the showing inactive tses
feature are so close that they are worth merging into the same
functionality, parameterized if needed [not needed for me].

in my own case, i basically want all [log mode and inactive tses] off or
all on.  years ago, i implemented a toggle, using log mode as the toggle.
i made lots of notes, but the notes might not be comprehensible to anybody.

i also wanted certain information to show or not show regarding state
changes.

the code is trivial.  it merely toggles inactive when you toggle log mode.

;; [[id:26806393-dca3-43a6-a92d-d8985d32f4bd][COMMENT issues with my
inactive thing -- need to have v L still respect inactive, but pre-empt
when state change]]
;;
;; if i want to see state changes i have to do v L, but inactive
;; disappears.  so i need to do l twice to fix it, but that
;; deletes state changes
;;
;; currently implemented options are state changes but no
;; inactive, state changes with redundant inactive, and only
;; inactive.
;;
;; i want inactive preempted by state change.  but don't care
;; much if i can just get inactive, which i do.
;;
;; =later this might or might not be analogous to closed being
;; tagged ts and thus correctly not tsia.

;;l or v l is for log mode: closed (doneish), clock, and state if
;;you set that.
;;
;;what about notes?
;;
;; too confusing to have two levels of log mode unless i really
;; want to always show something (like closed deadline) and
;; toggle showing all.  which i don't really need.  i prefer all
;; or none i think.
;;
;;super log mode (/logall/ log all) c-u l or v L is particularly
;;useful as it includes state changes with fewer bugs than [ (but
;;still not yet other inactive timestamps).
;;
;; maybe i can use the intermediate sort thing -- the thing sacha
;; used and that i use to sort or set scores or something -- to
;; eliminate duplicates after setting logall and also using my
;; inactive.  [2016-04-07 Thu 20:37]
org-agenda-before-sorting-filter-function ka
;;
;; try setting org-agenda-log-mode-items to allow state and find
;; out what gets duplicated.  i think it is just that it shows as
;; a bare inactive timetamp and as a state change.
;;
;; [ is different from log mode.
;;
;; [ provides nothing with my current setup which shows inactive
;; timestamps without duplicates.
;;
;;there are bugs with [
;;  [ with no log mode loses information
;;repeater state is just nextrepeat
;;  [ resets upon navigation while l does not
;;you can't make it persist or start up with it
;;  log mode (if you include state change) gets duplicated
;;it finds the inactive timestamp?
;;but only for state changes, not all?  =could check
;;  active timestamps including deadline and scheduled do not show
;;presumably this is ok because will be elsewhere
;;=later this needs detail
;;
;;adding state to org-agenda-log-mode-items makes l and log
;;mode at startup do the same thing as logall = c-u l or v L.
;;
;; state in org-agenda-log-mode-items duplicates inactive
;; (presumably because inactive does not exclude it).  it is sort
;; of useful.  i'd like bangification or todo kw.  if needed i
;; can use logall (c-u l or v L).
;;
;; =later i think i implemented bangification for ts agenda, with
;; slightly different semantics from bangification for search
;; agenda.  because more useful not to bangify known d s or so.
;;
;; /log mode does not show inactive timestamps/ ka.
;;   to me, the concepts are similar enough that they should be
;;   merged into the same mechanism.  i do that here.  also [ is
;;   conflated between two unrelated features.
;;
;;the default of org-agenda-log-mode-items is closed and clock
;;which is good.  that leaves out inactive, but i have a solution
;;for that.  but perhaps i can do state and filter it.
;;  [2016-04-26 Tue 11:05] sometimes it duplicates my inactive
'(with-eval-after-load 'org-agenda
  (add-to-list 'org-agenda-log-mode-items 'state))
;;
;;this is a good solution, but it is a defvar not defcustom.  it
;;might exclude the ts in the closed ts.  which is good in this
;;case because we show closed in org-agenda-log-mode-items.  and
;;that shows them in a closed face with closed leader.
;;
;; this is problematic when org-agenda-start-with-log-mode is
;; nil.  we want it nil then.  and then (as i have it) toggle it
;; on when doing log mode.
;; [2018-12-10 Mon 19:31] turning off because i have start with log mode off
;; (setq org-agenda-include-inactive-timestamps nil)
;; (setq org-agenda-include-inactive-timestamps t)
;;this way i can see what i did so far in the day and remind me
;;of good or bad things i did.
;; l toggles
;; [2018-11-24 Sat 15:53] trying without it to not clutter
;; (setq org-agenda-start-with-log-mode nil)
;; (setq org-agenda-start-with-log-mode t)
;; (defadvice org-agenda-log-mode
;; (around toggle-off-inactive-also activate compile)
;;   (let ((org-agenda-include-inactive-timestamps t)
;; ad-do-it))
;; fixme maybe i 

Re: [PATCH] lisp/org-element.el: Add repeater-deadline support to org-element

2024-04-10 Thread Morgan Smith
Apologies for the delay.  I had lots of social events surrounding the
solar eclipse.  The eclipse was really cool, I do recommend.

See two patches attached again.  All tests pass on my computer.

I decided to add an extra `let' statement to my changes to
`org-element-timestamp-parser'.  I think it adds a touch of clarity and
maybe performance.

Ihor Radchenko  writes:

>> My change in org-syntax.org now implies that a repeater
>> must come before a delay.  I don't know what syntax to use that doesn't
>> make that implication.  Although I don't see the harm in telling people
>> to put the repeater first.
>
> We can simply leave the previous REPEATER-OR-DELAY, but expand on it
> that REPEATER-OR-DELAY is an instance of REPEATER or an instance of
> DELAY. Does it make sense?

Done.

>> Done.  It's my first time using rx though.  I don't know if I should be
>> compiling it or something for performance?
>
> `rx' is a macro. It will be expanded during compilation.

Thank you for the piece of mind.  I'll have to use `rx' more often :).


Thanks for the reviews!  I'll start switching org-habit over to the
element API soon.  I've already played with that a bit

>From 582d4e7372c005f098f213b496de6f85c0c11d2f Mon Sep 17 00:00:00 2001
From: Morgan Smith 
Date: Wed, 3 Apr 2024 16:30:42 -0400
Subject: [PATCH] lisp/org-element.el: Add repeater-deadline support to
 org-element

* lisp/org-element.el (org-element-timestamp-parser,
org-element-timestamp-interpreter): Add support for repeater
deadlines.  Adds two new properties: ':repeater-deadline-value' and
':repeater-deadline-unit'.

* testing/lisp/test-org-element.el (test-org-element/timestamp-parser,
test-org-element/timestamp-interpreter): Test support for repeater
deadlines.

* etc/ORG-NEWS: Add relevant news.
---
 etc/ORG-NEWS | 14 +++
 lisp/org-element.el  | 70 +++-
 testing/lisp/test-org-element.el | 38 -
 3 files changed, 100 insertions(+), 22 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index aeb7ffd4b..2b418cd3c 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -512,6 +512,20 @@ timestamp object.  Possible values: ~timerange~, ~daterange~, ~nil~.
 ~org-element-timestamp-interpreter~ takes into account this property
 and returns an appropriate timestamp string.
 
+ New properties =:repeater-deadline-value= and =:repeater-deadline-unit= for org-element timestamp object
+
+~org-element-timestamp-parser~ now adds =:repeater-deadline-value= and
+=:repeater-deadline-unit= properties to each timestamp object that has
+a repeater deadline.
+
+Possible values for =:repeater-deadline-value=: ~positive integer~, ~nil~.
+
+Possible values for =:repeater-deadline-unit=: ~hour~, ~day~, ~week~,
+~month~, ~year~.
+
+~org-element-timestamp-interpreter~ takes into account these properties
+and returns an appropriate timestamp string.
+
  =org-link= store functions are passed an ~interactive?~ argument
 
 The ~:store:~ functions set for link types using
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 8e5416d8b..49a312694 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4288,12 +4288,13 @@ Assume point is at the target."
   "Parse time stamp at point, if any.
 
 When at a time stamp, return a new syntax node of `timestamp' type
-containing `:type', `:range-type', `:raw-value', `:year-start', `:month-start',
-`:day-start', `:hour-start', `:minute-start', `:year-end',
-`:month-end', `:day-end', `:hour-end', `:minute-end',
+containing `:type', `:range-type', `:raw-value', `:year-start',
+`:month-start', `:day-start', `:hour-start', `:minute-start',
+`:year-end', `:month-end', `:day-end', `:hour-end', `:minute-end',
 `:repeater-type', `:repeater-value', `:repeater-unit',
-`:warning-type', `:warning-value', `:warning-unit', `:begin', `:end'
-and `:post-blank' properties.  Otherwise, return nil.
+`:repeater-deadline-value', `:repeater-deadline-unit', `:warning-type',
+`:warning-value', `:warning-unit', `:begin', `:end' and `:post-blank'
+properties.  Otherwise, return nil.
 
 Assume point is at the beginning of the timestamp."
   (when (looking-at-p org-element--timestamp-regexp)
@@ -4326,20 +4327,38 @@ Assume point is at the beginning of the timestamp."
   (date-end 'daterange)
   (time-range 'timerange)
   (t nil)))
-	 (repeater-props
-	  (and (not diaryp)
-		   (string-match "\\([.+]?\\+\\)\\([0-9]+\\)\\([hdwmy]\\)"
- raw-value)
-		   (list
-		:repeater-type
-		(let ((type (match-string 1 raw-value)))
-		  (cond ((equal "++" type) 'catch-up)
-			((equal ".+" type) 'restart)
-			(t 'cumulate)))
-		:repeater-value (string-to-number (match-string 2 raw-value))
-		:repeater-unit
-		(pcase (string-to-char (match-string 3 raw-value))
-		  (?h 'hour) (?d 'day) (?w 'week) (?m 'month) (_ 'year)
+ (repeater-props
+  (and (not 

Re: [DISCUSSION] "quick-help" popup for org-columns (column view)

2024-04-10 Thread Sławomir Grochowski
Thank you Philip for the explanation and preparing the code snippet. 

So what are the next steps?
Can you merge your patch?

-- 
Slawomir Grochowski



org-clone-subtree-with-time-shift with reverse order

2024-04-10 Thread Christian Barthel
I'd like to suggest adding a new prefix arg i.e.
`C-u C-u org-clone-subtree-with-item-shift' to reverse
the order of newly created / cloned siblings.  Would
that be of interest for other orgmode users?

Diff file is attached.

--
Christian Barthel
diff -u --label \#\ --label \#\ /tmp/buffer-content-gd7Tiz /tmp/buffer-content-QbeeNi
--- #
+++ #
@@ -7342,7 +7342,11 @@
 As described above, N+1 clones are produced when the original
 subtree has a repeater.  Setting N to 0, then, can be used to
 remove the repeater from a subtree and create a shifted clone
-with the original repeater."
+with the original repeater.
+
+The new siblings will normally be appended.  When using `C-u C-u'
+prefix argument, the siblings will be prepended.
+"
   (interactive "nNumber of clones to produce: ")
   (unless (wholenump n) (user-error "Invalid number of replications %s" n))
   (when (org-before-first-heading-p) (user-error "No subtree to clone"))
@@ -7388,7 +7392,7 @@
 	(setq nmin 0)
 	(setq nmax (1+ nmax))
 	(setq n-no-remove nmax))
-  (goto-char end)
+  (goto-char (if (equal current-prefix-arg '(16)) beg end))
   (cl-loop for n from nmin to nmax do
 	   (insert
 		;; Prepare clone.
@@ -7418,7 +7422,8 @@
 			  (goto-char (match-beginning 0))
 			  (when (looking-at "<[^<>\n]+\\( +[.+]?\\+[0-9]+[hdwmy]\\)")
 			(delete-region (match-beginning 1) (match-end 1)))
-		  (buffer-string)
+		  (buffer-string)))
+	   (if (equal current-prefix-arg '(16)) (goto-char beg
 (goto-char beg)))

 ;;; Outline path

Diff finished.  Wed Apr 10 11:42:21 2024


Re: When src block result is an image, how to define caption, html and latex attributes ?

2024-04-10 Thread Sébastien Gendre


"Fraga, Eric"  writes:
> I tend to name every src block
> anyway as it makes navigation easier (using
> org-babel-goto-named-src-block).


I didn't know this function exist. Thank you very much. :)



Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)]

2024-04-10 Thread Ihor Radchenko
Protesilaos Stavrou  writes:

> Though I should have clarified my intent earlier: the idea is to use the
> label as a fixed reference to the footnote, so that the link does not
> change between exports. This is the same principle as what we do with
> links to headings that have a CUSTOM_ID.
>
> As such, the anchor text can still be the way it is now as an
> automatically generated number sequence (^1, ^2, etc.), but the HTML
> "id" and "href" values will be constructed based on the label of the
> footnote, NOT its number in the sequence.
>
> What do you think?

That may work. One may simply change the anchors for footnote references
and footnotes when they are labeled. However, we should be careful when
labels are duplicated (multiple references to the same named footnote) -
only a single back-reference is possible from the footnote definition
back to footnote reference.

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



Re: Agenda preserve setting on date change

2024-04-10 Thread Ihor Radchenko
Russell Adams  writes:

> I pull up a file in 'emacs -Q'.
>
> M-x org-agenda 1 a   (restricted to current file, create agenda view).
> Now viewing the weekly agenda in buffer *Org Agenda*.
> Press "L" to enable logbook.
> Press "[" to enable inactive timestamps.
>
> I now see the full week with log and timestamps.
>
> Press "b" to go back one week.
>
> I now see last week's agenda. Logbook mode is still enabled. Inactive
> timestamps are missing.
>
> Pressing "[" will enable inactive timestamps again.

Ok. I can see what is happening.
Unlike agenda log-mode, where L toggles the mode on/off, the inactive
timestamps are not toggled; they can only be enabled and re-enable
manually when the agenda view is refreshed.

This is consistent with the documentation:

‘v [’ or short ‘[’ (‘org-agenda-manipulate-query-add’)
 Include inactive timestamps into the current view.  Only for
 weekly/daily agenda.

Note how there no word "toggle" in the manual. It explicitly refers to
the "current view".

I am not sure why it is done this way and I cannot see any explanations
in the git logs.

I do not see why it should not be possible to make inactive timestamp
display into a toggle.
Patches welcome. It is an easy patch.

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



Re: Link to #ID-id:

2024-04-10 Thread Ihor Radchenko
Daniel Clemente  writes:

> Hi,
>   after updating org-mode and emacs to latest commits, I have seen that
> some links to IDs in different files are exported like this:
> some link: link
>
>   Shouldn't it be?:   otherfile.html#c5m2je81pue0

It should be otherfile.html#ID-c5m2je81pue0
But what you are seeing is indeed a bug.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ead3f9990

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



Re: Agenda preserve setting on date change

2024-04-10 Thread Russell Adams
On Mon, Apr 08, 2024 at 07:31:10PM +, Ihor Radchenko wrote:
> Russell Adams  writes:
>
> > I have noticed that when I pull up an agenda view, if I enable/disable
> > items (ie: enable logbook, enable inactive timestamps), that if I
> > change to a new time period (ie: forward/backward day/week/month/view)
> > that I lose some settings. Generally it's the inactive timestamps,
> > though logbook stays.
>
> May you please provide more detailed instructions starting from emacs -Q?

I pull up a file in 'emacs -Q'.

M-x org-agenda 1 a   (restricted to current file, create agenda view).
Now viewing the weekly agenda in buffer *Org Agenda*.
Press "L" to enable logbook.
Press "[" to enable inactive timestamps.

I now see the full week with log and timestamps.

Press "b" to go back one week.

I now see last week's agenda. Logbook mode is still enabled. Inactive
timestamps are missing.

Pressing "[" will enable inactive timestamps again.

If I navigate again, forward or backward in time, or change between
daily/weekly/monthly view, timestamps are missing.

It appears that the agenda settings in the current view are not reused
when refreshing for a new time.



--
Russell Adamsrlad...@adamsinfoserv.com
https://www.adamsinfoserv.com/



Re: Seeing all the steps when I run an R code block

2024-04-10 Thread Ihor Radchenko
William Denton  writes:

>> Do you still see it on your side?
>
> Thanks for following up.  No, I don't see it any more ... an ESS upgrade or 
> something fixed the problem.

Thanks for checking!
Canceled.

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



Re: [BUG] Org-Agenda leaves frame around [9.7-pre (release_9.6.8-785-g72bbf8.dirty @ /home/bidar/.local/private/etc/emacs/lib/org/lisp/)]

2024-04-10 Thread Ihor Radchenko
Björn Bidar  writes:

> The bug also seems to affect `org-attach`.

Fixed, on main. Alongside with other similar places.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=78e9dd0c4

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



Re: [BUG] org-element-at-point warning with org-timer in agenda [9.7-pre, release_N/A-N/A-b45b39 @ /home/bhavin/.emacs.d/elpa/org-9.7pre0.20240405.140341/, ]

2024-04-10 Thread Ihor Radchenko
Bhavin Gandhi  writes:

> When running org-timer-set-timer (bound to `;') in an Org agenda buffer,
> I get following warning:
>
> ⛔ Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org
> buffer # (org-agenda-mode)

Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=129a18abf

I used an alternative fix, making use of some agenda-specific data.

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



#7 [[bbb:OrgMeetup]] on Wed, Apr 24, 19:00 UTC+3

2024-04-10 Thread Ihor Radchenko
Dear all,

Another OrgMeetup will be scheduled on the last Wednesday of February,
in two weeks. (Sorry, I cannot make it second Wednesday this time, and
even third.)

Previous meetup notes:
https://list.orgmode.org/87ttk9hbhv.fsf@localhost/T/#u

URL: https://bbb.emacsverse.org/b/iho-h7r-qg8-led
Time & Date: <2024-04-24 Wed 19:00-21:00 @+03,Europe/Istanbul>
The room will be open half an hour before the official start.

During the meetup, we can:

- Give advice to new users
- Showcase Org configs or workflows
- Demo/discuss interesting packages
- Troubleshoot each-other's issues
- Discuss Org mode development
- Discuss "Org mode" section of Emacs news (https://sachachua.com/blog/)
- Discuss anything else Org-related

Everyone is free to join the discussion/chat or lurk around silently,
listening.

We will _not_ do any recording by default.

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



Re: [DISCUSSION] "quick-help" popup for org-columns (column view)

2024-04-10 Thread Philip Kaludercic
Sławomir Grochowski  writes:

> Philip Kaludercic  writes:
>
>> We could add a `help-quick-use-map' variable and bind it to `global-map'
>> by default.  You can then re-bind it in your command.
>
> I'm sorry, but I don't quite understand it. 

Just this here:

diff --git a/lisp/help.el b/lisp/help.el
index 1ef46e394f3..5700f10fdc8 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -175,6 +175,9 @@ help-quick-sections
 COMMAND is the symbol of a command and DESCRIPTION is its short
 description, 10 to 15 char5acters at most.")
 
+(defvar help-quick-use-map global-map
+  "Keymap that `help-quick' should use to lookup bindings.")
+
 (declare-function prop-match-value "text-property-search" (match))
 
 ;; Inspired by a mg fork (https://github.com/troglobit/mg)
@@ -193,7 +196,7 @@ help-quick
 (let ((max-key-len 0) (max-cmd-len 0) keys)
   (dolist (ent (reverse (cdr section)))
 (catch 'skip
-  (let* ((bind (where-is-internal (car ent) nil t))
+  (let* ((bind (where-is-internal (car ent) help-quick-use-map t))
  (key (if bind
   (propertize
(key-description bind)

You would then only have to rebind `help-quick-use-map' in your custom
command.

> It seems to me that the simplest way is to add a parameter to the
> function, like this:
>
> (defun help-quick ( keymap)
>
> Because it will not change the behavior for previous calls to this
> function.  And it will allow to pass specific keymap, not need to pass
> and search in whole global-map. 
>
> What do you think?

Eli said that we shouldn't change the signature of public functions, so
I don't think that this is an option.


-- 
Philip Kaludercic on peregrine


[SUMMARY] #6 [[bbb:OrgMeetup]] on Wed, Feb 14, 19:00 UTC+3

2024-04-10 Thread Ihor Radchenko


[ This time, the meeting notes are incomplete. I only took partial
  notes and then came back to them after a long time, when I had only
  selective long-term memory to work with. ]

- Gerard showcased interactive interface to select different export
  styles for code blocks when exporting to pdf.
  - The interface not only offers a choice between the allowed values
of ~org-latex-src-block-backend~, but provides extra customization
of the styling of engraved code blocks (with and without box
around the code blocks)
  - https://github.com/gav451/org-exp-exp/blob/main/any-backend/any-backend.el

- Gerard's demo was a showcase of a weird bug he encountered with
  =engrave-faces= LaTeX output. In his reproducer, the code block
  spacing is sometimes off
  - More details in https://list.orgmode.org/87le7f7e90.fsf@localhost/T/#t

- William asked about
  : #+caption[Short caption]: Long caption
  syntax.
  - This caption syntax allows setting an alternative "short" caption
for a given Org element
  - Short captions are mainly used for export, when generating TOC or list of 
tables/figures.
  - See https://orgmode.org/manual/Captions.html

- Gerard asked about using ~org-occur~

- https://sachachua.com/blog/2024/02/2024-02-12-emacs-news/>

:comments:
[16:34] Welcome to [[bbb:OrgMeetup]]!For help on using 
BigBlueButton see these (short) https://www.bigbluebutton.org/html5; 
target="_blank">tutorial videos.To join the audio bridge 
click the phone button.  Use a headset to avoid causing background noise for 
others.This server is running https://docs.bigbluebutton.org/; target="_blank">BigBlueButton.
[16:58] Gerard Vermeulen : hello everybody
[17:00] cryptk : hello
[17:01] Gerard Vermeulen : I have a demo how to switch source block export 
backends that I want to show in the context of an engraved bug
[17:02] William Denton : No questions from me ... recent news would be great to 
hear.
[17:02] Gerard Vermeulen : Yes, I share my complete screen
[17:03] Dave M : I see it
[17:19] William Denton : I've never seen a line like "#+caption[Something 
something]: before ... what is that?
[17:22] Ihor Radchenko : @William: See 12.8 Captions . It is  a short caption
[17:25] William Denton : Aha, thanks.  I never noticed that.
[17:40] Ihor Radchenko : the
[17:54] Gerard Vermeulen : No, I did not use speed keys
[17:59] Ihor Radchenko : 
https://sachachua.com/blog/2024/02/2024-02-12-emacs-news/
[17:59] Ihor Radchenko : 
https://gist.github.com/kepi/2f4acc3cc93403c75fbba5684c5d852d
[17:59] Ihor Radchenko : how to archive hierarchically
[18:05] Ihor Radchenko : https://github.com/tecosaur/org-pandoc-import
[18:06] Ihor Radchenko : https://github.com/emacsorphanage/ox-pandoc
[18:10] Ihor Radchenko : 
https://howardism.org/Technical/Emacs/literate-devops.html
[18:10] Ihor Radchenko : blog post on literate programming
[18:17] Ihor Radchenko : https://list.orgmode.org/875y0m1uy8.fsf@localhost/
[18:18] Ihor Radchenko : About inserting sub-heading
[18:18] Ihor Radchenko : C- + TAB TAB TAB
[18:22] Gerard Vermeulen : we can wrapup
[18:22] kickingvegas : thanks!
[18:23] Gerard Vermeulen : Thanks
[18:23] cryptk : thanks
:end:

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



Re: [BUG] Customizing org-emphasis-alist does not work as expected [9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)]

2024-04-10 Thread Ihor Radchenko
Chang Xiaoduan  writes:

> I am trying to customizing `org-emphasis-alist` so that ` can replace ~ as
> the code marker. I use the following code in my configuration file:
>
> ``` emacs-lisp
> (setq org-emphasis-alist
>   '(("*" bold)
> ("/" italic)
> ("_" underline)
> ("=" org-verbatim verbatim)
> ("`" org-code verbatim)
> ("+" (:strike-through t
> ```

Custom markup markers are not supported.
This customization is only useful to change the existing markup faces.

I have updated the docstring to explain this.
Handled, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=42cdf2a90

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



[BUG] Customizing org-emphasis-alist does not work as expected [9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)]

2024-04-10 Thread Chang Xiaoduan


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Hello,

I am trying to customizing `org-emphasis-alist` so that ` can replace ~ as
the code marker. I use the following code in my configuration file:

``` emacs-lisp
(setq org-emphasis-alist
  '(("*" bold)
("/" italic)
("_" underline)
("=" org-verbatim verbatim)
("`" org-code verbatim)
("+" (:strike-through t
```

After I restart Emacs, things does not work as I expected. Text
surrounded by ` is not rendered using the faces for code, and text
surrounded by ~ is rendered using a different face for code (different
from the faces before the customizing is applied). Also, I have set
`org-hide-emphasis-marker` to `t`, and ~ gets hidden but ` not.

This can be reproduced by launching Emacs using `emacs -Q`. Then
evaluate the code above in the *scratch* buffer. Then open an org-mode
buffer which contains text like "`code`" and "~code~". You can tell the
difference by launching Emacs using `emacs -Q` but does not evaluate the
above code.

Thank you

Emacs  : GNU Emacs 29.2 (build 2, x86_64-w64-mingw32)
 of 2024-02-02
Package: Org mode version 9.6.15 (release_9.6.15 @ 
d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)



Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)]

2024-04-10 Thread Protesilaos Stavrou
Thank you Ihor for looking into this!

> From: Ihor Radchenko 
> Date: Fri,  5 Apr 2024 14:33:49 +

> [... 13 lines elided]

>> I looked into the ox.el and noticed that the export data does include
>> the labels. But 'org-html-footnote-reference' does not have a call to
>> get the label: it assigns a number outright. To experiment with
>> retrieving the data, I tried this:
>> ...
>>(let* ((n (or
>>   (org-export-get-footnote-label footnote-reference)
>>   (org-export-get-footnote-number footnote-reference info)))
>> ...
>> Can we have footnotes with their label preserved? Or maybe is this going
>> to break a lot of functionality? I am aware the above not work for
>> footnote definitions, as those also get the number.
>
> The problem arises when only some footnotes have a label:
>
> This is a test 1 [fn:n24aa:These are the contents] and here is 
> more[fn::another one].
>
> What to do with the unlabelled ones? Assign a number? If yes, what kind
> of number? `org-export-get-footnote-number' counts all the footnotes,
> including labelled ones; so that returned number will be 2 in the above
> example, leading to awkward ^n24aa followed by ^2 footnote.
> But even without `org-export-get-footnote-number', ^n24aa ^1 mixture
> might be awkward.
>
> One way could be only using footnote labels when _all_ the footnotes
> are labelled.

I think it is fine to have an all or nothing approach, if this is easier
to do.

Though I should have clarified my intent earlier: the idea is to use the
label as a fixed reference to the footnote, so that the link does not
change between exports. This is the same principle as what we do with
links to headings that have a CUSTOM_ID.

As such, the anchor text can still be the way it is now as an
automatically generated number sequence (^1, ^2, etc.), but the HTML
"id" and "href" values will be constructed based on the label of the
footnote, NOT its number in the sequence.

What do you think?

Thank you again for your time and efforts!

-- 
Protesilaos Stavrou
https://protesilaos.com



Re: When src block result is an image, how to define caption, html and latex attributes ?

2024-04-10 Thread Fraga, Eric
On Tuesday,  9 Apr 2024 at 18:58, Sébastien Gendre wrote:
> If I name the source block, it work.

Excellent.

> Is it because:
>
> * When a source block is named, it's result is also named
>
> * When a result is named, Org-mode can locate it and replace its value
>
> * But when a result is not named, Org-mode insert a #+RESULTS: just
>   after the block and create a new one if it cannot found the previous
>   one right after the block

Yes, pretty much my understanding.  I tend to name every src block
anyway as it makes navigation easier (using
org-babel-goto-named-src-block).

-- 
: Eric S Fraga, with org release_9.6.23-1314-g945046 in Emacs 30.0.50