[BUG] Conflict between Org hyperlink and auto-complete (I think) [9.6 ( @ /home/dsmasterson/.emacs.d/elpa/org-9.6/)]

2023-01-05 Thread David Masterson
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.


I think there is a conflict between Org hyperlinks and auto-complete.
Specifically, when I tried to create a hyperlink of the form
"[[*section][section]]", Emacs would go into some infinite loop just
after I typed the first ']' and I'd have to kill Emacs (sometimes with
'-9'), I think auto-complete popped up just after typing the '*', so I
think auto-complete was scanning what I was typing and crashed when I
got to the ']'.  So, this could be a problem with auto-complete?

Not yet sure how to minimize my setup to build a reproducible case or
further debug this, but I thought I'd get the bug out to others who
might know better.


Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll 
bars)
 of 2021-03-27, modified by Debian
Package: Org mode version 9.6 ( @ /home/dsmasterson/.emacs.d/elpa/org-9.6/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-blank-before-new-entry '((heading) (plain-list-item . auto))
 org-texinfo-format-headline-function 
'org-texinfo-format-headline-default-function
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9)
  (org-agenda-files :tag . "RFL"))
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-use-property-inheritance '("DOCTOR")
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-agenda-files '("/home/dsmasterson/DSM/MyOrg/")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-tag-alist '(("RFL" . 82) ("TBD" . 84) ("FLAGGED" . 70) ("NEXT" . 78)
 ("CONSIDER" . 67) (:startgroup) ("Context") (:grouptags) 
("@Bank")
 ("@Car") ("@Computer") ("@Dentist") ("@Doctor") ("@EyeDoc") 
("@Grocery")
 ("@Hardware") ("@Home") ("@Internet") ("@Lawyer") ("@Library")
 ("@MedLab") ("@Meeting") ("@PetStore") ("@Pharmacy") ("@Phone")
 ("@Retail") ("@School") ("@Transit") ("@TV") ("@Work") 
(:endgroup)
 (:startgrouptag) ("People") (:grouptags) ("DAVID" . 68) 
("SUSAN" . 83)
 ("SANAH" . 115) ("FAMILY" . 70) ("David") ("Susan") ("Sanah")
 ("Chiffon" . 99) ("Mom") ("Rob") ("Val") ("Brenda") 
("Behrouz") ("Ashi")
 ("Nayer") (:endgrouptag))
 org-reveal-start-hook '(org-decrypt-entry)
 org-startup-folded t
 org-blocker-hook '(org-edna-blocker-function)
 org-super-agenda-mode t
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook before-save-hook org-encrypt-entries nil t] 5]
 #[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
 #[0 "\301\211.\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 beginend-org-mode org-ac/setup-current-buffer)
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-outline-path-complete-in-steps nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-startup-indented t
 org-agenda-todo-list-sublevels nil
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-crypt-key nil
 org-export-with-planning t
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-agenda-timegrid-use-ampm t
 org-brain-visualize-mode-hook '(org-brain-polymode)
 org-export-backends '(ascii html icalendar latex odt org texinfo)
 org-ascii-format-drawer-function #[771 ".\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-agenda-add-entry-text-maxlines 5
 org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-trigger-hook '(org-edna-trigger-function)
 org-priority-lowest 69
 org-a

Re: LaTeX tutorial (focused on what Org exports) ??

2023-01-05 Thread David Masterson
Pedro Andres Aranda Gutierrez  writes:

> David Masterson writes:
>> "Fraga, Eric"  writes:
>>> On Sunday,  1 Jan 2023 at 13:43, Ihor Radchenko wrote:
 I think that it is not very clear how to use it.
 Abstract says that it is self-explaining, but it appears that not every
 pdf viewer supports showing the explanations.
>>>
>>> Yes, that's true.  The PDF viewer has to support popups.  I normally use
>>> zathura to view PDF documents but that's one example of a viewer that
>>> doesn't work with this document.  In cases like this, I switch to evince
>>> (others also work).
>>>
>>> But I find this document very useful.
>> 
>>> Um, when I viewed it in my Emacs pdfviewer, it appeared to look fine
>>> *EXCEPT* that it appeared to be in Latin (good Latin, I think, but I
>>> don't read Latin).
>
> LoL... My kleines Latinum, though not completely fit right now, tells me that
> indeed it is very, very good Latin :-)

:-)

> Now seriously, I'm using org for my academic activities (producing lecture 
> presentations and notes and laboratory scripts) and I'm extremely happy with
> what I achieve. There's always a slight grief in that I can't forward search 
> to
> or reverse search from a PDF...
>
> But anyhow, if you need a proofreader, happy to help..

With the Org files that you create, how many levels of headers do you
use?  I use Org for personal task management mostly, but I'd like to
produce good PDFs to give to my wife (Org is too complicated).  My
problem is that I'll structure my documents with many (5+) header
levels with tasks at the bottom.  The problem is that the 'article' and
'report' document classes used by Org don't look right if you go beyond
3 levels -- if you know what I mean.  (NOTE: LaTeX newbie)

-- 
David Masterson



Re: When is a function an interactive function? [was Re: Is function 'org-insert-property-drawer' usable?]

2023-01-05 Thread Max Nikulin

On 06/01/2023 06:13, Alain.Cochard wrote:

For example, with the cursor on 'org-capture-finalize' in the manual,
'C-h f ' gives nothing right away; 'C-h f org-capture' does
not offer 'org-capture-finalize' as a completion; 'C-h f
org-capture-fin' does complete and says that
'org-capture-finalize' is interactive; and then it becomes possible to
use it with 'M-x'.


To improve loading speed, Org starts with minimal set of packages, other 
should be loaded on demand. See `org-modules'.


For C-h f (`describe-function') behavior see
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60085
"`help-enable-autoload' is not fully obeyed"

As to `org-capture-finalize', while being interactive, it is of little 
use before capture is started and so org-capture is loaded. That is why 
it is not marked for autoload and unavailable for M-x. In future it 
might be restricted to a specific "capture" mode.


Perhaps there is a way to generate TAGS file for Org files an to 
instruct Emacs to lookup collected symbols there.





Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Max Nikulin

On 06/01/2023 02:19, Jean Louis wrote:


The Concept and More Ideas:
---


Was there any messages with arguments that Org should stick to blocking 
menu?


It is not about UI ideas, it is not about counting people who agrees 
that menu should be non-blocking (I do not remember who is on the 
opposite side).


It is about providing a patch that implements a better menu UI. Of 
course, the code must be maintainable and it should not have confusing 
behavior.


For a while quick and dirty blocking menu allowed to emerge great 
variety of export backends and to postpone issues related to interaction 
between buffers when user is not restricted in respect to jumping to 
another buffer.


Making more noise and repeating obvious ideas does not help to create a 
consistent implementation.





Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Max Nikulin

On 06/01/2023 02:37, Jean Louis wrote:

* Ihor Radchenko [2023-01-05 14:17]:

Could you please elaborate what is bad about the design and maybe
provide some ideas how it can be improved?


There was choice back in time, before 10 years, to provide to user few
keys to run some functions, like Org export.


Sorry, but your response just repeats complains concerning blocking menu 
that you posted earlier many times. I do not see anything related to 
your original statement:



After looking into it, into `org-export-registered-backends', I will
not use it, neither follow the chain of poor design.


Could you, please, concentrate on your vision of proper 
`org-export-registered-backends' design? Personally, I see no major 
issues, the approach is usual for enabling third-party plugins. From my 
point of view, the structure is organized well enough to allow 
alternative implementations of export menu. That is why I am surprised 
that such statement appeared in a topic dedicated to UI.


Do not repeat that blocking menu is not convenient enough sometimes. Say 
what should be used instead of `org-export-registered-backends'.






Re: [MAINTENANCE] Org orphanage?

2023-01-05 Thread Samuel Wales
what it it were made emacs-wide?  and linked all over with "things you
can do to contribute"?

On 1/5/23, Bastien  wrote:
> Ihor Radchenko  writes:
>
 I am not sure why we need to wait with an optional offer.
>>>
>>> You mean, the optional offer of providing a proper shelter for orphan
>>> packages?
>>
>> Yes.
>
> Well, if too few people care about Org orphan packages to document
> them on worg/org-orphanage.org I'm a bit pessimistic about people
> helping to maintain the new shelter -- but please go ahead.
>
> --
>  Bastien
>
>


-- 
The Kafka Pandemic

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



Re: [TASK] Enhance Worg HTML styling

2023-01-05 Thread Tim Cross


Leo Butler  writes:

> On Fri, Jan 06 2023, Tim Cross  wrote:
>
>> alain.coch...@unistra.fr writes:
>>
>>> Tim Cross writes on Thu  5 Jan 2023 09:43:
>>>
>>>  > As a simple example, try increasing the font size and see what
>>>  > happens to the menus. Keep in mind that some users require a very
>>>  > large font (for example, I use a 26 or 28 pt font.
>>>
>>> OK, I understand.  (Even with default font size, I hate that the table
>>> of contents hides some parts of the text -- I had forgotten about
>>> that.)
>>>
>>>  > [...] There have also been numerous other issues (many have already
>>>  > been addressed) such as broken links, links to data which doesn't
>>>  > exist or has wrong MIME type [...]  Perhaps even more unfortunate
>>>  > is that sometimes, you can come across some good information in the
>>>  > worg site, but finding that same information again at a latter date
>>>  > is often extremely challenging.
>>>
>>> But that's not "Org styling", right?  Or am I confused about what
>>> "styling" means?
>>>
>>> At any rate, I agree with your other examples, understand why the
>>> styling (as I understand it) should be improved, and am no longer
>>> worried about changes.  Thank you very much for your time.
>>
>> It isn't just about the styling - that is just one aspect and the one I
>> planned to start with. However, styling and presentation will also be
>> part of providing better links/navigation, which I think is also
>> necessary to make exploration and discovery easier and more consistent.
>> .
>
> Can you give us an example/model of a site that does these things
> better? I agree with your assessment, but feel that some kind of target
> is needed.
>
> TIA,
> Leo

As Bastien said, small increments is likely the way to go.

So, for an initial target, how about just having set of CSS styles which
support different screen sizes and different font sizes - one where,
unlike the current one, the page content is not obscured by the menus
and navigation buttons.

For an added bonus, a design which provides consistency and convenience
which helps with both general browsing and locating specific information
within the site would be good. 

As for an example site, I don't have anything specific in mind and have
ideas taken from various sites. Examples are of little benefit IMO - it
really just comes down to someone having the time to define a new style,
apply it to a development site (likely also on sourcehut) and then get
feedback. We don't need to over think this or get too bogged down in
design - just go for functional and see what falls out the other end.

One question I'm not sure about is whether it would be better to craft
CSS from scratch or better to adopt a CSS framework (which is
appropriately licensed) and use that. I tend to feel the latter would be
better, but others may have different opinions.



When is a function an interactive function? [was Re: Is function 'org-insert-property-drawer' usable?]

2023-01-05 Thread Alain . Cochard
Max Nikulin writes on Wed  4 Jan 2023 18:53:

 > I suppose, the idea is to invoke it like
 > 
 >  C-u M-x org-insert-drawer

Yes, I got it.  

Let me enlarge the scope (hence the new title). The manual says, in
1.5 Typesetting Conventions Used in this Manual (Key bindings and
commands):

   In the manual we will, wherever possible, give the function that is
   internally called by the generic command.

so I was trying to understand if there is a way to deduce whether or
not a particular function is a command.  Based on several examples
such as

   ‘M-’ (‘org-do-demote’)

I conjectured that, when an interactive function does correspond to a
command, it is just mentioned between parentheses, right after its
corresponding key combination.  I tried to check this in an as much
systematic way as I could and investigated 330 such instances (based
on the manual of version 9.5).

I concluded that, out of the 330, at most 9 of them are counter
examples (and I think even less; see list below).

9 is a very small proportion, which leads me to say that, in my
opinion, it would be nice:

- that this conjecture be transformed into a theorem (i.e., that
  exceptions be removed),

- that this convention be mentioned in the aforementioned section
  1.5,

- that even if a function is _not_ mentioned in that conventional
  form, it be explicitly stated in the manual that it is
  non-interactive (just as was recently proposed for
  'org-insert-property-drawer' by Ihor+Bastien).

(And if that convention is not to be adopted, then all the more reason
to duly mention exceptions to the quasi-rule.)

Regards

PS: as an aside note: during my quest, I met the following unsettling
(to me) cases, of functions that are not interactive "right away", but
appear (to me) to become interactive after "something" has been loaded
(please forgive the informal wording: I don't know the proper
terminology).  They are the 'org-capture-*' and the 'org-attach-*'
functions.

For example, with the cursor on 'org-capture-finalize' in the manual,
'C-h f ' gives nothing right away; 'C-h f org-capture' does
not offer 'org-capture-finalize' as a completion; 'C-h f
org-capture-fin' does complete and says that
'org-capture-finalize' is interactive; and then it becomes possible to
use it with 'M-x'.

Similarly, as far I as can see, 'M-x org-attach-attach' fails right
away, but works after having been used once with the standard (menu)
way.

I can understand why it is like that, but still find it disconcerting.
If it is to stay this way, perhaps things could be made more explicit
in the manual.

---

List (of non interactive functions that might be thought interactive
to the ignorant):

- ‘C-u C-u ’ (‘org-set-startup-visibility’)

- ‘S-’ (‘org-clocktable-try-shift’)

- ‘C-0 C-c C-w’ or ‘C-u C-u C-u C-c C-w’ (‘org-refile-cache-clear’)

- ‘M-’ (‘org-table-fedit-scroll-up’) 

  It feels strange to me that 'org-table-fedit-scroll-down' be an
  interactive function but not the 'scroll-up' version; in fact: 'C-h
  f org-table-fedit-scroll-up' -> (No matches)

- ‘S-’ (‘org-property-next-allowed-values’) 

  Shouldn't it be 'org-property-next-allowed-value'?

- ‘U’ (‘org-agenda-bulk-remove-all-marks’) 

  Shouldn't it be 'org-agenda-bulk-unmark-all'?

- ‘C-c C-e’ (‘org-export’) 

  Shouldn't this one be 'org-export-dispatch'?

- ‘C-c '’ (‘org-edit~special’) 

  This must be a typo, right?

- ‘C-c C-e o o’ (‘org-export-to-odt’) 

  Shouldn't it be 'org-odt-export-to-odt'?

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




[BUG] Package keyval Error: margins undefined. [9.6 (release_9.6-61-g63e073f @ /home/data1/protected/Programming/Software/emacs/lisp/org/)]

2023-01-05 Thread Jean Louis



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.


Can't generate PDF file, though it worked just before days.

ERROR: Package keyval Error: margins undefined.

--- TeX said ---

See the keyval package documentation for explanation.
Type  H   for immediate help.
 ...  
  
l.1005 \ProcessOptionsKV[p]{Gm}
   %
--- HELP ---
No help available

P.S. And when I "include Org configuration" then byte compiled functions
can't be sent by Emacs as they are non-printable characters.



Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo 
version 1.17.6, Xaw3d scroll bars)
 of 2022-12-22
Package: Org mode version 9.6 (release_9.6-61-g63e073f @ 
/home/data1/protected/Programming/Software/emacs/lisp/org/)

current state:
==
 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-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-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)
   ("help" :follow org-link--open-help :store
org-link--store-help)
   ("file" :complete org-link-complete-file)
   ("elisp" :follow org-link--open-elisp))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 )
-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Eduardo Ochs
On Thu, 5 Jan 2023 at 12:19,  wrote:
>
> Max Nikulin writes on Thu  5 Jan 2023 22:00:
>
>  > Sometimes I start emacs in a terminal application to copy some
>  > "special" text (holding [Shift]).
>
> Great!  It worked for the *Org Select* buffer.
>
> I did not know that trick.

Hi Alain,

here is what I am doing to try to understand those buffers using
eev-isms. I am keeping this in one part of my notes,

  (org-mode)
  (debug-on-entry'read-char-exclusive)
  (eek "C-c C-e")
  (cancel-debug-on-entry 'read-char-exclusive)
  (fundamental-mode)

and to make the "*Org Export Dispatcher*" appear I run the first three
sexps with my favorite variant of `C-e C-x C-e'.

Then I did this to pretty-print the buffer-list,

  (find-eppp (buffer-list))

and this to save the contents of that buffer in a variable:

  (with-current-buffer "*Org Export Dispatcher*"
(setq o (buffer-string)))

Cheers,
  Eduardo Ochs
  http://angg.twu.net/#eev



Re: [TASK] Enhance Worg HTML styling

2023-01-05 Thread Leo Butler
On Fri, Jan 06 2023, Tim Cross  wrote:

> alain.coch...@unistra.fr writes:
>
>> Tim Cross writes on Thu  5 Jan 2023 09:43:
>>
>>  > As a simple example, try increasing the font size and see what
>>  > happens to the menus. Keep in mind that some users require a very
>>  > large font (for example, I use a 26 or 28 pt font.
>>
>> OK, I understand.  (Even with default font size, I hate that the table
>> of contents hides some parts of the text -- I had forgotten about
>> that.)
>>
>>  > [...] There have also been numerous other issues (many have already
>>  > been addressed) such as broken links, links to data which doesn't
>>  > exist or has wrong MIME type [...]  Perhaps even more unfortunate
>>  > is that sometimes, you can come across some good information in the
>>  > worg site, but finding that same information again at a latter date
>>  > is often extremely challenging.
>>
>> But that's not "Org styling", right?  Or am I confused about what
>> "styling" means?
>>
>> At any rate, I agree with your other examples, understand why the
>> styling (as I understand it) should be improved, and am no longer
>> worried about changes.  Thank you very much for your time.
>
> It isn't just about the styling - that is just one aspect and the one I
> planned to start with. However, styling and presentation will also be
> part of providing better links/navigation, which I think is also
> necessary to make exploration and discovery easier and more consistent.
> .

Can you give us an example/model of a site that does these things
better? I agree with your assessment, but feel that some kind of target
is needed.

TIA,
Leo


Re: [PATCH] lisp/ob-octave.el, was [PATCH] rfc: using ert-deftest with side-effects

2023-01-05 Thread Leo Butler
On Mon, Jan 02 2023, Ihor Radchenko  wrote:

> Ihor Radchenko  writes:
>
>> Ihor Radchenko  writes:
>>
 There is a race condition between writing the contents of the graphics
 file to disk and emacs checking the file size. My guess is that this is
 causing the problem (and that the same failure applies for emacs-2{6,7},
 since only the emacs-28 reports the exact test failure).
>>>
>>> Maybe we can just add several `sleep-for' calls to the test?
>>
>> I just did this. Let's see if CI errs again.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e5c45358a
>
> Apparently, `sleep-for' 1 second was not enough, and I decided to remove
> checking file size completely.

Hello Ihor,

Is there an environment variable that could be used to determine is the
tests are being run on sourcehut? This would let us cut out that test on
sourcehut, while still keeping it elsewhere.

>
> Upon doing this, another failure popped up. This time, it looks like an
> actual Elisp issue:
>
> https://builds.sr.ht/~bzg/job/914954
> 2 unexpected results:
>FAILED  ob-octave/graphics-file  ((should-not (get-buffer "*Org-Babel
>Error Output*")) :form (get-buffer "*Org-Babel Error Output*") :value
>#) 
>FAILED  ob-octave/graphics-file-space  ((should-not (get-buffer
>"*Org-Babel Error Output*")) :form (get-buffer "*Org-Babel Error
>Output*") :value #) 
>
> As you can see *Org-Babel Error Output* buffer does not exist when
> running the test.
>
> Leo, could you please take a look?

An earlier test is creating that *Org Babel Error Output* buffer. That
is killed on the first test, before the test is actually run. But
GET-BUFFER behaves in an undocumented way: it returns a non-nil value,
#. To remedy that, I have wrapped the calls in
BUFFER-LIVE-P.

See the attached patch.

Leo

From b84f2f50b88fe6da3dcca3d751f6d75f7177ddaf Mon Sep 17 00:00:00 2001
From: Leo Butler 
Date: Thu, 5 Jan 2023 13:53:44 -0600
Subject: [PATCH] test-ob-octave.el: wrap get-buffer in buffer-live-p

* testing/lisp/test-ob-octave.el (ob-octave/graphics-file):
(ob-octave/graphics-file-session):
(ob-octave/graphics-file-space): Wrap GET-BUFFER in BUFFER-LIVE-P.
This ensures that a killed buffer does not cause an incorrect failure
of a test.

Link: https://orgmode.org/list/87bknh5nva.fsf@localhost
---
 testing/lisp/test-ob-octave.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testing/lisp/test-ob-octave.el b/testing/lisp/test-ob-octave.el
index 4e9fea97b..0b8ecea3b 100644
--- a/testing/lisp/test-ob-octave.el
+++ b/testing/lisp/test-ob-octave.el
@@ -79,7 +79,7 @@ sombrero;
   (org-babel-execute-src-block)
   (should (search-forward (format "[[file:%s]]" file) nil nil))
   (should (file-readable-p file))
-  (should-not (get-buffer "*Org-Babel Error Output*")))
+  (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"
   ;; clean-up
   (delete-file file)
   (when (get-buffer "*Org-Babel Error Output*")
@@ -99,7 +99,7 @@ sombrero;
   (should (get-buffer "*Inferior Octave*"))
   (should (search-forward (format "[[file:%s]]" file) nil nil))
   (should (file-readable-p file))
-  (should-not (get-buffer "*Org-Babel Error Output*")))
+  (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"
   ;; clean-up
   (delete-file file)
   (let (kill-buffer-query-functions kill-buffer-hook)
@@ -119,7 +119,7 @@ sombrero;
   (org-babel-execute-src-block)
   (should (search-forward (format "[[file:%s]]" file) nil nil))
   (should (file-readable-p file))
-  (should-not (get-buffer "*Org-Babel Error Output*")))
+  (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"
   ;; clean-up
   (delete-file file)
   (when (get-buffer "*Org-Babel Error Output*")
-- 
2.39.0



Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Jean Louis
* alain.coch...@unistra.fr  [2023-01-05 17:46]:
> Ihor Radchenko writes on Thu  5 Jan 2023 11:07:
> 
>  > However, I doubt that you can make much use of the buffer itself -
>  > it is nothing but text.
> 
> Without my suggesting that anything at all should be done, I am
> commenting that sometimes one might need that text, if only for
> personal notes, and it would be convenient if one could access all
> buffers just like we can for (say) the *Messages* buffer. For example,
> I recently needed what is seen in the *Org Select* buffer.  I wasted a
> bit of time trying, then an extra bit of time managing otherwise.

Thanks for feedback.

I could when there are 5 people with feedback, there may be other 500
thinking about it.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Jean Louis
* Ihor Radchenko  [2023-01-05 14:17]:
> Could you please elaborate what is bad about the design and maybe
> provide some ideas how it can be improved?

There was choice back in time, before 10 years, to provide to user few
keys to run some functions, like Org export. That itself is not bad,
but when it started expanding into now more than 100+ different
exports, Org requires every new package to define what? Keys? So every
package author is supposed to provide keys and various snippets of
text, because they have to accommodate initial and outdated notion on
using simple menu.

Org Export is not any more simple menu.

And Org users are in quite peculiar mode, with headings, TODO, tags,
so in my personal logic it does not make sense NOT to provide to Org
users Org based buffers where they can fold or unfold headings, freely
use mouse to export, or keys, and watch in one window the buffer with
menu like RCD Org Export, and in other windows other exports appearing
in various versions, minimizing repetition, and helping user become
more efficient.

The ideas have been sent as concept to you, then as full package,
which I now use daily, so it is to derive the mode, define key
bindings, decide how to display toggling of variables for body, scope,
async, etc. and generate hyperlinks for export.

RCD Dashboard package is made to help other similar things to be
created, and I wish to liberate it even from Org mode.

I use daily RCD Dashboard, as it is package for packages in now
multiple screens appearing automatically, imagine intersections of
elementary objects like headings, or files, with their names,
appearing in generated Org buffers with hyperlinks.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Jean Louis
* Ihor Radchenko  [2023-01-05 14:16]:
> Jean Louis  writes:
> 
> > Though, we speak here of non-blicking Org Export, and there are many
> > ways to do it, we speak of decisions that are not user friendly, made
> > before more than 10 years.
> >
> > There was enough time to use whatever one wish. I can't wait for
> > somebody in mainstream Org to make it user friendly, mouse clickable,
> > and so there is enough of it for you to adapt it to your own needs as
> > in main stream. 
> 
> I was hoping that you might be interested to provide a patch for Org
> upstream.

Question is: did you try it out?

Once you try it out, then let me know to continue.


The Concept and More Ideas:
---

1. You can create derived mode, for example Org derived mode.

2. You can create key bindings freely for that derived mode.

3. You can create read-only, temporary buffers for export in that
   derived mode.

4. Because it is read only, similar to modal modes, you do not need
   complicated key bindings, you don't need to use C-combinations for
   few simple things, use simply letter. 

5. Though it implies you can use same key bindings for
   "compatibility", but I would say it rather honestly for bad habits,
   as in the derived.

6. Thus you may make toggling functions.

7. You are free to draw in the buffer and give to user visual feedback
   of what you have toggled or set. Draw it as you wish, ON/OFF or
   BODY/SCOPE, or similar.

8. Use global variables for toggling of Org export settings.

9. Constuct Org elisp: links, but do they support key bindings? You
   can define both.

10. You could even "remember" the global variables in such Org export
file simply by using file variables.  

11. Org links could provide export.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: [PATCH] org-datetree.el: Allow datetrees with TODO, priority, tags

2023-01-05 Thread Ilya Chernyshov



Thanks!
Instead of manually constructing the regexp, you can use
`org-complex-heading-regexp-format'.


Thanks for the tip. Applied changes in the new patch.

>From 8a32385ae2ccbbc0caa35eda9a8184c165e3afcd Mon Sep 17 00:00:00 2001
From: Ilya Chernyshov 
Date: Thu, 15 Dec 2022 02:08:15 +0600
Subject: [PATCH] lisp/org-datetree.el: Allow datetrees with TODO, priority,
 tags

* org-datetree.el (org-datetree--find-create,
org-datetree--find-create-group, org-datetree-find-iso-week-create):
Allow finding a datetree with TODO state, priority, tags, statistics
cookies, or COMMENT keyword.

* testing/lisp/test-org-datetree.el
(test-org-datetree/find-date-create,
test-org-datetree/find-iso-week-create): Add tests for a datetree with
tags, TODO or priority keywords.

* etc/ORG-NEWS (Datetree structure headlines can now be complex):
Document the change.

* doc/org-manual.org: Update datetree definition.
---
 doc/org-manual.org|  3 ++-
 etc/ORG-NEWS  |  7 +++
 lisp/org-datetree.el  | 23 +++
 testing/lisp/test-org-datetree.el | 16 
 4 files changed, 36 insertions(+), 13 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index f3b77ebad..f816f8725 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -22507,7 +22507,8 @@ level.
 ,*** 2022-10-08 Saturday
 #+end_example
 
-Tags are allowed in the tree structure.
+TODO state, priority, tags, statistics cookies, and COMMENT keywords
+are allowed in the tree structure.
 
 [fn:31] This is always the other, not the user.  See the variable
 ~org-link-from-user-regexp~.
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index c5d9bdf6e..0c9c7bf91 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -55,6 +55,13 @@ document header:
 ,#+LATEX_HEADER: \DefineVerbatimEnvironment{lstlisting}{Verbatim}{...whatever...}
 #+END_src
 
+** New features
+*** Datetree structure headlines can now be complex
+
+~org-datetree--find-create~ function can now find datetree
+headlines with TODO state, priority, tags, statistics cookies, or
+COMMENT keyword
+
 * Version 9.6
 
 ** Important announcements and breaking changes
diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el
index 035ef047a..cebb4e279 100644
--- a/lisp/org-datetree.el
+++ b/lisp/org-datetree.el
@@ -99,15 +99,14 @@ If time-period is month, then group entries by month."
 	  (month (calendar-extract-month d))
 	  (day (calendar-extract-day d)))
   (org-datetree--find-create
-   "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\
-\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
+   "\\([12][0-9]\\{3\\}\\)"
year)
   (org-datetree--find-create
-   "^\\*+[ \t]+%d-\\([01][0-9]\\) \\w+$"
+   "%d-\\([01][0-9]\\) \\w+"
year month)
   (when (eq time-grouping 'day)
 	(org-datetree--find-create
-	 "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
+ "%d-%02d-\\([0123][0-9]\\) \\w+"
 	 year month day)
 
 ;;;###autoload
@@ -147,17 +146,16 @@ will be built under the headline at point."
 	   (week (nth 0 iso-date)))
   ;; ISO 8601 week format is %G-W%V(-%u)
   (org-datetree--find-create
-   "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\
-\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
+   "\\([12][0-9]\\{3\\}\\)"
weekyear nil nil
(format-time-string "%G" time))
   (org-datetree--find-create
-   "^\\*+[ \t]+%d-W\\([0-5][0-9]\\)$"
+   "%d-W\\([0-5][0-9]\\)"
weekyear week nil
(format-time-string "%G-W%V" time))
   ;; For the actual day we use the regular date instead of ISO week.
   (org-datetree--find-create
-   "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
+   "%d-%02d-\\([0123][0-9]\\) \\w+"
year month day
 
 (defun org-datetree--find-create
@@ -169,18 +167,19 @@ component.  If INSERT is non-nil and there is no match then it is
 inserted into the buffer."
   (when (or month day)
 (org-narrow-to-subtree))
-  (let ((re (format regex-template year month day))
+  (let ((re (format org-complex-heading-regexp-format
+(format regex-template year month day)))
 	match)
 (goto-char (point-min))
 (while (and (setq match (re-search-forward re nil t))
-		(goto-char (match-beginning 1))
-		(< (string-to-number (match-string 1)) (or day month year
+		(goto-char (match-beginning 5))
+		(< (string-to-number (match-string 5)) (or day month year
 (cond
  ((not match)
   (goto-char (point-max))
   (unless (bolp) (insert "\n"))
   (org-datetree-insert-line year month day insert))
- ((= (string-to-number (match-string 1)) (or day month year))
+ ((= (string-to-number (match-string 5)) (or day month year))
   (beginning-of-line))
  (t
   (beginning-of-line)
diff --git a/testing/lisp/test-org-datetree.el b/testing/lisp/test-org-datetree.el
index 59ef8c33b..bd06462f2 100644
--- a/testing/lisp/test-org-datetree.el
+++ b/testing/lisp/test-org-datetree.el
@@ -58,6 +58,14 @@
 (

How to make change the appearance of org-date inside a drawer?

2023-01-05 Thread William Denton
I would like to make drawers look fainter and smaller.  I have this mostly 
working, with this:


(face-spec-set 'org-drawer '((t (:foreground "dim gray" :weight normal :height 
0.9
(face-spec-set 'org-special-keyword '((t (:foreground "dim gray" :weight normal 
:height 0.9
(face-spec-set 'org-property-value '((t (:weight normal :height 0.9

But then there is this case:

:LOGBOOK:
CLOCK: [2023-01-04 Wed 14:05]--[2023-01-04 Wed 17:33] =>  3:28
:END:

Here LOGBOOK and CLOCK are smaller, but the timestamps are full size.  (This 
won't come across in plain text email, of course.)


describe-char there tells me the timestamp has the face org-date.  Is there a 
way to make org-date smaller when it's in a drawer?  I don't want to make a 
global setting for it, because I often use dates in headings.



Thanks,

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada



Re: [TASK] Enhance Worg HTML styling (was: [BUG] worg-setup.org is outdated)

2023-01-05 Thread Tim Cross


alain.coch...@unistra.fr writes:

> Tim Cross writes on Thu  5 Jan 2023 09:43:
>
>  > As a simple example, try increasing the font size and see what
>  > happens to the menus. Keep in mind that some users require a very
>  > large font (for example, I use a 26 or 28 pt font.
>
> OK, I understand.  (Even with default font size, I hate that the table
> of contents hides some parts of the text -- I had forgotten about
> that.)
>
>  > [...] There have also been numerous other issues (many have already
>  > been addressed) such as broken links, links to data which doesn't
>  > exist or has wrong MIME type [...]  Perhaps even more unfortunate
>  > is that sometimes, you can come across some good information in the
>  > worg site, but finding that same information again at a latter date
>  > is often extremely challenging.
>
> But that's not "Org styling", right?  Or am I confused about what
> "styling" means?
>
> At any rate, I agree with your other examples, understand why the
> styling (as I understand it) should be improved, and am no longer
> worried about changes.  Thank you very much for your time.

It isn't just about the styling - that is just one aspect and the one I
planned to start with. However, styling and presentation will also be
part of providing better links/navigation, which I think is also
necessary to make exploration and discovery easier and more consistent.
.




Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Eduardo Ochs
On Thu, 5 Jan 2023 at 08:06, Ihor Radchenko  wrote:
>
> Eduardo Ochs  writes:
>
> > sorry, I thought that that would be something like a 5-line change... =(
> >
> > A few messages again I mentioned that one of my plans for these holidays
> > was to learn several techniques for debugging elisp that I've postponing
> > learning for ages. I'll do that and then I'll try solving this problem
> > again.
>
> One way could be M-x debug-on-entry  read-char-exclusive  and
> then running the dispatcher. This will pause Elisp execution and leave
> the export menu buffer actionable.
>
> However, I doubt that you can make much use of the buffer itself - it is
> nothing but text. You need to read the source to understand the logic.
> You can use the source code links Jean provided.

Hi Ihor,

thanks, good idea! A few days ago I had a similar idea, but mine
was worse... I found, by running this,

  (find-orggrep "grep --color=auto -nH --null -e read-char-exclusive *.el")

that `read-char-exclusive' appears in 29 places in the Org
source, and I was thinking of replacing some of them by a
`my-read-char-exclusive', and then set a breakpoint in
`my-read-char-exclusive'...

I have just tried running this in an Org file,

  (debug-on-entry'read-char-exclusive)
  (eek "C-c C-e")
  (cancel-debug-on-entry 'read-char-exclusive)

and after running the first two sexps above with my favorite
variant of `C-x C-e' the backtrace showed me that this

  (find-efunction 'org-export--dispatch-action "read-char-exclusive")

is the occurrence that matters - the one inside
`org-export--dispatch-action'. I'll play more with that
soon!

  Cheers =),
Eduardo Ochs
http://angg.twu.net/#eev



Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Alain . Cochard
Max Nikulin writes on Thu  5 Jan 2023 22:00:

 > Sometimes I start emacs in a terminal application to copy some
 > "special" text (holding [Shift]).

Great!  It worked for the *Org Select* buffer.

I did not know that trick. 

Thanks.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Max Nikulin

On 05/01/2023 21:41, Alain.Cochard wrote:


I am
commenting that sometimes one might need that text, if only for
personal notes, and it would be convenient if one could access all
buffers just like we can for (say) the *Messages* buffer. For example,
I recently needed what is seen in the *Org Select* buffer.  I wasted a
bit of time trying, then an extra bit of time managing otherwise.


Sometimes I start emacs in a terminal application to copy some "special" 
text (holding [Shift]).


I do not like that in a Gtk window I can not select text appeared in the 
echo area using mouse.






Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Alain . Cochard
Ihor Radchenko writes on Thu  5 Jan 2023 11:07:

 > However, I doubt that you can make much use of the buffer itself -
 > it is nothing but text.

Without my suggesting that anything at all should be done, I am
commenting that sometimes one might need that text, if only for
personal notes, and it would be convenient if one could access all
buffers just like we can for (say) the *Messages* buffer. For example,
I recently needed what is seen in the *Org Select* buffer.  I wasted a
bit of time trying, then an extra bit of time managing otherwise.


-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




Re: [TASK] Enhance Worg HTML styling (was: [BUG] worg-setup.org is outdated)

2023-01-05 Thread Alain . Cochard
Tim Cross writes on Thu  5 Jan 2023 09:43:

 > As a simple example, try increasing the font size and see what
 > happens to the menus. Keep in mind that some users require a very
 > large font (for example, I use a 26 or 28 pt font.

OK, I understand.  (Even with default font size, I hate that the table
of contents hides some parts of the text -- I had forgotten about
that.)

 > [...] There have also been numerous other issues (many have already
 > been addressed) such as broken links, links to data which doesn't
 > exist or has wrong MIME type [...]  Perhaps even more unfortunate
 > is that sometimes, you can come across some good information in the
 > worg site, but finding that same information again at a latter date
 > is often extremely challenging.

But that's not "Org styling", right?  Or am I confused about what
"styling" means?

At any rate, I agree with your other examples, understand why the
styling (as I understand it) should be improved, and am no longer
worried about changes.  Thank you very much for your time.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France | [ slot available for rent ]




[BUG] Org agenda misbehaves in a side window [9.5 (9.5-g0a86ad @ /home/zellerin/.emacs.d/elpa/org-9.5/)]

2023-01-05 Thread Tomas Zellerin


When Agenda buffer is in a side window, several actions fail with
"Cannot make side window the only window".

Example:

emacs -Q
in *scratch*, (setq display-buffer-alist '(("\\*Org Agenda\\*"
display-buffer-in-side-window)))
M-x org-agenda t to display Todo agenda
in org-agenda buffer, another M-x org-agenda is observed fails with error above,
expected is display the menu to select agenda command

Other failing commands are for example changes of todo state in agenda
buffer.

The reason seems that org-agenda-get-restriction-and-command calls
delete-other-window; however, this is not something user observes and
expects as effect of those commands.

Observed on Org 9.6 as well.

Emacs  : GNU Emacs 29.0.60 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 
3.24.35, cairo version 1.17.6)
 of 2022-12-22
Package: Org mode version 9.5 (9.5-g0a86ad @ 
/home/zellerin/.emacs.d/elpa/org-9.5/)



Re: [BUG] ox-html: incorrect figure numbers [9.6 ( @ /home/contrapunctus/.emacs.d/elpa/org-9.6/)]

2023-01-05 Thread Ihor Radchenko
Canceled.



Re: [BUG] ox-html: incorrect figure numbers [9.6 ( @ /home/contrapunctus/.emacs.d/elpa/org-9.6/)]

2023-01-05 Thread Ihor Radchenko
contrapunctus  writes:

> I have the following test file -
> ```org
> #+CAPTION: caption 1
> [[file:img/orig/img1.jpg][file:img/small/img1.jpg]]
> #+CAPTION: caption 2
> [[file:img/orig/img2.jpg][file:img/small/img2.jpg]]
> #+CAPTION: caption 3
> [[file:img/orig/img3.jpg][file:img/small/img3.jpg]]
> #+CAPTION: caption 4
> [[file:img/orig/img4.jpg][file:img/small/img4.jpg]]
> ...
> ...
> But with Org v9.6, M-x org-html-export-to-html numbers each caption as -
>
> Figure 1: caption 1
> Figure 2: caption 2
> Figure 1: caption 3
> Figure 1: caption 4
> ...

Duplicate of
https://orgmode.org/list/CAFyQvY342ee8OgWVQdv=z3v1_3rglttb2s0v27jljf0kimh...@mail.gmail.com

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



[BUG] ox-html: incorrect figure numbers [9.6 ( @ /home/contrapunctus/.emacs.d/elpa/org-9.6/)]

2023-01-05 Thread contrapunctus


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.


I have the following test file -
```org
#+CAPTION: caption 1
[[file:img/orig/img1.jpg][file:img/small/img1.jpg]]
#+CAPTION: caption 2
[[file:img/orig/img2.jpg][file:img/small/img2.jpg]]
#+CAPTION: caption 3
[[file:img/orig/img3.jpg][file:img/small/img3.jpg]]
#+CAPTION: caption 4
[[file:img/orig/img4.jpg][file:img/small/img4.jpg]]
...
```

With Org v9.5.5, M-x org-html-export-to-html numbers each caption as -

Figure 1: caption 1
Figure 2: caption 2
Figure 3: caption 3
Figure 4: caption 4
...

But with Org v9.6, M-x org-html-export-to-html numbers each caption as -

Figure 1: caption 1
Figure 2: caption 2
Figure 1: caption 3
Figure 1: caption 4
...

Emacs  : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, 
cairo version 1.16.0)
 of 2022-12-20, modified by Debian
Package: Org mode version 9.6 ( @ /home/contrapunctus/.emacs.d/elpa/org-9.6/)



Re: [MAINTENANCE] Org orphanage?

2023-01-05 Thread Bastien
Ihor Radchenko  writes:

>>> I am not sure why we need to wait with an optional offer.
>>
>> You mean, the optional offer of providing a proper shelter for orphan
>> packages?
>
> Yes.

Well, if too few people care about Org orphan packages to document
them on worg/org-orphanage.org I'm a bit pessimistic about people
helping to maintain the new shelter -- but please go ahead.

-- 
 Bastien



Re: Using header-args to set default TODO state?

2023-01-05 Thread Ihor Radchenko
Michael Maurer  writes:

> I've been wondering if it's possible to define a default todo-state
> for all items appearing under a headline, like
>
> * shopping list
> :PROPERTIES:
> :header-args: todo-state: TOBUY
> :END:
> ** bananas
> ** bread
>
> so when calling org-agenda both bananas and bread have the todo-state
> TOBUY applied to them. Obviously placing "todo-state" after
> :header-args: doesn't work, it's just an example of how I imagine it
> could work.

You can use `org-agenda-custom-commands' and define an appropriate
matcher.

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



Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-05 Thread Bastien Guerry
Ihor Radchenko  writes:

>> I'm not able to push to git://git.sv.gnu.org/emacs/org-mode.git.

My bad: I did not warn Emacs maintainers in time.  Now it is done,
I will let you know when they grand you access to the Emacs project.

-- 
 Bastien



Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Ihor Radchenko
Jean Louis  writes:

> * Max Nikulin  [2023-01-03 15:18]:
>> Jean might be happy with the posted mock-up. Unfortunately that code is too
>> far from been ready to be used for all users. E.g. it does not use
>> `org-export-registered-backends', not to mention that all menus in the
>> package should be consistent. It is OK to have a bunch of repetitive code
>> for a demo, but it can not be taken as is.
>
> After looking into it, into `org-export-registered-backends', I will
> not use it, neither follow the chain of poor design.
>
> Users can get the choice otherwise in my package. I can have my own
> setup and recognition of various exports. 
>
> I can't follow the bad design that happen to take place, so I will not
> lean on this below, I find that complex, while it need not be.

Could you please elaborate what is bad about the design and maybe
provide some ideas how it can be improved?

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



Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Ihor Radchenko
Jean Louis  writes:

> Though, we speak here of non-blicking Org Export, and there are many
> ways to do it, we speak of decisions that are not user friendly, made
> before more than 10 years.
>
> There was enough time to use whatever one wish. I can't wait for
> somebody in mainstream Org to make it user friendly, mouse clickable,
> and so there is enough of it for you to adapt it to your own needs as
> in main stream. 

I was hoping that you might be interested to provide a patch for Org
upstream.

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



Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,

2023-01-05 Thread Ihor Radchenko
Eduardo Ochs  writes:

> sorry, I thought that that would be something like a 5-line change... =(
>
> A few messages again I mentioned that one of my plans for these holidays
> was to learn several techniques for debugging elisp that I've postponing
> learning for ages. I'll do that and then I'll try solving this problem
> again.

One way could be M-x debug-on-entry  read-char-exclusive  and
then running the dispatcher. This will pause Elisp execution and leave
the export menu buffer actionable.

However, I doubt that you can make much use of the buffer itself - it is
nothing but text. You need to read the source to understand the logic.
You can use the source code links Jean provided.

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



Re: [MAINTENANCE] Org orphanage?

2023-01-05 Thread Ihor Radchenko
Bastien  writes:

>> I am not sure why we need to wait with an optional offer.
>
> You mean, the optional offer of providing a proper shelter for orphan
> packages?

Yes.

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



Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-05 Thread Ihor Radchenko
Matt  writes:

>  > Feel free to push upstream.
>
> I'm not able to push to git://git.sv.gnu.org/emacs/org-mode.git.
>
> I've read through the following and, as far as I can tell, I've followed the 
> directions.
>
> - https://orgmode.org/worg/org-contribute.html
> - https://orgmode.org/worg/org-maintenance.html
> - https://www.emacswiki.org/emacs/GitForEmacsDevs

Adding Bastien to the loop.

Meanwhile, can you check if you are listed as a member of "emacs" group
in ?

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



Re: Is function 'org-insert-property-drawer' usable?

2023-01-05 Thread Bastien Guerry
Hi,

Ihor Radchenko  writes:

> I still don't understand why it was turned into a function since I
> cannot find the relevant discussion.

C-u C-c C-x d will call org-insert-property-drawer - I don't think 
this function needs to be a command with its own keybinding.

The discussion is here:

https://list.orgmode.org/87vcnzeo8d@gmail.com/

> If not making `org-insert-property-drawer' a command back, we can amend
> the manual, as suggested.

Yes, I think amending the manual is good enough!

Thanks,

-- 
 Bastien



Re: [PATCH] org-datetree.el: Allow datetrees with TODO, priority, tags

2023-01-05 Thread Ihor Radchenko
Ilya Chernyshov  writes:

> Here is a patch that allows to find datetree headlines that contain tags,
> TODO or priority keywords.
>
> Sometimes you need to set TODOs or tags to such headlines. When you do
> this, next time you capture under this datetree, you get a new datetree
> with the same date in the same file, which is annoying. This patch fixes it.

Thanks!
Instead of manually constructing the regexp, you can use
`org-complex-heading-regexp-format'.

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



Re: Is function 'org-insert-property-drawer' usable?

2023-01-05 Thread Ihor Radchenko
Max Nikulin  writes:

>> I guess we can just make it into a command. I see no downsides.
>
> At least it was an intentional change:
>
> commit 471ddbd14e2bb3e7689cdca5e6a461e54b8be9d8
> Author: Bastien Guerry
> Date:   Thu Jan 26 09:18:10 2012 +0100
>
>  Improve `org-insert-drawer' and related documentation.

Thanks for checking!
I still don't understand why it was turned into a function since I
cannot find the relevant discussion.

Bastien?

If not making `org-insert-property-drawer' a command back, we can amend
the manual, as suggested.

See the attached patch.

>From 3b930ccaf4f53d203cbbe84001d4d861cbcbb262 Mon Sep 17 00:00:00 2001
Message-Id: <3b930ccaf4f53d203cbbe84001d4d861cbcbb262.1672911565.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Thu, 5 Jan 2023 12:38:26 +0300
Subject: [PATCH] org-manual.org: Clarify that `org-insert-property-drawer' is
 not a command

* doc/org-manual.org (Drawers): Emphasize that
`org-insert-property-drawer' is not interactive command, but a
function.

Reported-by: alain.coch...@unistra.fr
Link: https://orgmode.org/list/tp3pbi$dk$1...@ciao.gmane.io
---
 doc/org-manual.org | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index f3b77ebad..4466af8e4 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -1253,11 +1253,12 @@ ** Drawers
 #+findex: org-insert-drawer
 You can interactively insert a drawer at point by calling
 ~org-insert-drawer~, which is bound to {{{kbd(C-c C-x d)}}}.  With an
-active region, this command puts the region inside the drawer.  With
-a prefix argument, this command calls ~org-insert-property-drawer~,
-which creates a =PROPERTIES= drawer right below the current headline.
-Org mode uses this special drawer for storing properties (see
-[[*Properties and Columns]]).  You cannot use it for anything else.
+active region, this command puts the region inside the drawer.  With a
+prefix argument, this command calls non-interactive function
+~org-insert-property-drawer~, which creates a =PROPERTIES= drawer
+right below the current headline.  Org mode uses this special drawer
+for storing properties (see [[*Properties and Columns]]).  You cannot use
+it for anything else.
 
 Completion over drawer keywords is also possible using
 {{{kbd(M-TAB)}}}[fn:6].
-- 
2.38.1


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


[BUG] CUSTOM_id ignored on blocks by ox-beamer

2023-01-05 Thread Ihor Radchenko
Confirmed.

alan.schm...@polytechnique.org writes:

> I’m writing course slides in org-mode (exported currently to beamer, but
> I want to also have html export in the long run), and I have trouble
> linking blocks (for theorems or definitions), as the CUSTOM_ID property
> is ignored by ox-beamer on blocks.
>
> I see this issue has already been raised on the list
> (https://list.orgmode.org/87lflg9ts2@nicolasgoaziou.fr/T/), and
> looking at the code it seems that it still needs to be modified.
> Unfortunately the code for org-beamer--format-block is quite complex and
> I do not see how to change it to add a label. Could someone on the list
> please give me a hand?

If you look inside `org-beamer--format-block', it uses
`org-beamer-environments-default' and `org-beamer-environments-extra' to
format the blocks. See docstring for the latter for details.

The code responsible for LaTeX block generation is

 (when (nth 2 env-format) ; when we non-column block
  (concat
   (org-fill-template ...) ; opening \begin lines
   contents ; block body
   ... ; block closing \end lines
   )

org-fill-template is using the template from the
`org-beamer-environments-*' replacing %-chars as described in the
docstring.

In order to handle CUSTOM_ID property, you can
(1) Introduce a new %-substitude to be handled in org-fill-template
call. It will insert block ID. (for example, using
`org-beamer--get-label')
(2) modify `org-beamer-environments-default' to insert label
appropriately.

Patches welcome!

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



Re: on inlinetask's 1st line inserts a star

2023-01-05 Thread Ihor Radchenko
alain.coch...@unistra.fr writes:

> release_9.6-193-g30314c
>
> A  right after 'M-x org-inlinetask-insert-task' adds a star to
> the 15 already there; another , another star, and so on.  Same
> thing with cursor after a TODO keyword.
>
> The behavior is the same if there is some content inside the
> inlinetask (i.e., not on the 1st line).

Thanks for reporting!
Fixed on main (inlinetasks are tricky; I do not want yet to risk changes
on bugfix).
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a3815a169

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



Re: Babel (scheme): Evaluation errors are not shown

2023-01-05 Thread Marc Nieper-Wißkirchen
Despite the unfortunate lack of a maintainer, I hope the (latest
version of the) patch can still be applied as the current behavior of
ob-scheme.el, namely, silencing any evaluation errors is infeasible.

Do you need any FSF copyright assignments from me? (I already
contributed to GCC and Gnulib under such an assignment in the past.)

Thanks,

Marc

Am Mo., 2. Jan. 2023 um 10:52 Uhr schrieb Marc Nieper-Wißkirchen
:
>
> Am Mo., 2. Jan. 2023 um 10:38 Uhr schrieb Ihor Radchenko 
> :
> >
> > Marc Nieper-Wißkirchen  writes:
> >
> > > Fixed.
> >
> > Thanks!
> > Note that your patch does not apply onto main.
>
> Rebased against the latest main.  Please see the appended patch.
>
> >
> > > -   (setq result (if output
> > > +  (let ((err (geiser-eval--retort-error ret)))
> > > +(setq result (cond
> > > +  (err nil)
> >
> > We may still provide output, if any. Even in the case of error. Not sure
> > if it makes sense for ob-scheme though.
>
> I switched the two cases, "err" and "output," in the attached patch.
> For a value result, providing a result in case of an error does not
> make sense.
>
> Thanks for your patience,
>
> Marc



Re: Refactor org-babel-shell-initialize? (was Re: ob-shell intentions and paperwork (was Bash results broken?))

2023-01-05 Thread Ihor Radchenko
Ihor Radchenko  writes:

>> Is there a way to see the definition of`org-babel-execute:csh' using the 
>> current `org-babel-shell-initialize', that is, when generated by a function?
>
> https://github.com/Wilfred/helpful displays the function code in such
> scenario. Probably, I need to raise this problem on emacs-devel.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60568

>> (alist-get "csh" org-babel-shell-set-prompt-commands nil nil 'equal)
>>
>> Then, it will return the prompt associated with "csh".
>
> Good point. Would you mind making a patch?

Fixed on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=93339de71

>>
>> I'm curious your thoughts about removing the `:set' function from 
>> `org-babel-shell-names' and using `add-variable-watcher' instead.  In my 
>> explorations, the watcher gets called when using customize, as well as when 
>> a new shell is added to `org-babel-shell-names' using `add-to-list'.
>
> I have never seen using variable watcher for this purpose.
> I suggest asking on emacs-devel first to hear what they think of it.

https://yhetil.org/emacs-devel/87a62xiewa.fsf@localhost/T/#u

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