Documentation: incorrect character name in line breaks

2023-07-21 Thread Tom Alexander
The documentation for line breaks says that PRE is:

> Anything but backspace (`\`).

I suspect this is supposed to say "backslash" (ascii 92) not "backspace" (ascii 
8)

Link to the documentation: https://orgmode.org/worg/org-syntax.html#Line_Breaks



Re: Is there a better (built-in) way to insert an org link with title as description?

2023-07-21 Thread Max Nikulin

On 21/07/2023 20:04, Arthur Miller wrote:

I copy a link from a readme file or a piece of code or elsewhere and
wish to stash it away in a note but not necessary open in a browser. You know,
"todo" to come back later for it :).


If a file is opened in Emacs then it sounds like a case for 
`org-capture' or `org-store-link'. Perhaps storing link is better 
compatible with `url-retrive' callback and it makes delay for 
`org-insert-link' due to network roundtrip less probable.


When I add a link to my notes, often I mention where I noticed it.


Anyway I suggest to split non-interactive part of the command to allow code
reuse (for drag and drop, etc.).


Tell me more here? Can I drag a link from one buffer into a note buffer, or how
can I use it?


My idea is to handle dropping of text into Org buffers. Currently it 
causes opening links in eww. I think, there are better options: convert 
from html to Org using pandoc and insert text, `org-capture', 
`org-store-link'. I have not tried to implement it. Currently I have 
just a couple of hints in my notes: `dnd-protocol-alist' and 
https://github.com/abo-abo/org-download/blob/master/org-download.el as 
an example of code.






Re: [PATCH] lisp/org-table.el: Allow named columns on lhs

2023-07-21 Thread Max Nikulin

On 22/07/2023 01:33, Gavin Downard wrote:


Max Nikulin writes:

When I tried table formulas a couple of years ago I was surprised that it is not
possible to use column names to specify target cells. At first glance it should
be a great feature. Have you searched the mailing list archive whether it was
requested earlier? There are might be reasons why it has not been implemented.
Org spreadsheets are quite complicated.


Surprisingly, I wasn't able to find much. Generally all I could find
talked about hline references , which are similarly unsupported.


Quick search revealed some messages where the feature was mentioned. 
However there are no objections from the developers and maintainers:


https://list.orgmode.org/caa3095_pfhosfdzfqsfyb3dee-pbmrbnhkwzpefx4chxlhu...@mail.gmail.com/T/#u
Bug: assignment to named column - not working as expected 2020-02-29

https://list.orgmode.org/CAJcAo8sF=2ug0onvq4ssprlykfo-0vjfhsfmuerojokovcl...@mail.gmail.com/T/#u
is this spreadsheet correct? 2012-12-01

https://list.orgmode.org/CALPHr6yH_etZa0=GajRMbu7x-oEJGdAP=3xeveljnpef0tq...@mail.gmail.com/
Bug: column names in tables cannot be used as target in table formula 
2011-08-19


Perhaps git blame for the manual may give some hints. If the change is 
really old then org.texi (removed at certain moment) should be inspected 
as well.


By the way, the manual needs an update if the suggested patch is applied.




Documentation: Equal sign incorrectly listed as disallowed in plain links

2023-07-21 Thread Tom Alexander
The documentation for plain links states that PATHPLAIN is:

> A string containing non-whitespace non-bracket (()[]<>=) characters, 
> optionally containing parenthesis-wrapped non-whitespace non-bracket 
> substrings up to a depth of two. The string must end with either a 
> non-punctation non-whitespace character, a forwards slash, or a 
> parenthesis-wrapped substring.

but if we create an org-mode document with the following test content:
```
http://foo/bar=baz

http://foo/bar[baz
```

and run a M-x eval-expression (message "%s" (pp-to-string 
(org-element-parse-buffer)))

Then we can see that it allows the equals sign in the PATHPLAIN (output pasted 
below)

Link to the documentation: https://orgmode.org/worg/org-syntax.html#org6934900

Syntax tree:
```
(org-data
(:begin 1 :contents-begin 1 :contents-end 40 :end 40 :robust-begin 3 
:robust-end 38 :post-blank 0 :post-affiliated 1 :path "/tmp/test/test.org" 
:mode org-data :CATEGORY "test" :granularity nil)
(section
  (:begin 1 :end 40 :contents-begin 1 :contents-end 40 :robust-begin 1 
:robust-end 38 :post-blank 0 :post-affiliated 1 :mode first-section 
:granularity nil :parent #0)
  (paragraph
   (:begin 1 :end 21 :contents-begin 1 :contents-end 20 :post-blank 1 
:post-affiliated 1 :mode top-comment :granularity nil :parent #1)
   (link
(:type "http" :path "//foo/bar=baz" :format plain :raw-link 
"http://foo/bar=baz; :application nil :search-option nil :begin 1 :end 19 
:contents-begin nil :contents-end nil :post-blank 0 :parent #2))
   #("\n" 0 1
 (:parent #2)))
  (paragraph
   (:begin 21 :end 40 :contents-begin 21 :contents-end 40 :post-blank 0 
:post-affiliated 21 :mode nil :granularity nil :parent #1)
   (link
(:type "http" :path "//foo/bar" :format plain :raw-link "http://foo/bar; 
:application nil :search-option nil :begin 21 :end 35 :contents-begin nil 
:contents-end nil :post-blank 0 :parent #2))
   #("[baz\n" 0 5
 (:parent #2)
```




Documentation: Reference to BODY field that is not specified in the grammar

2023-07-21 Thread Tom Alexander
The documentation for Inline Babel Calls mentions that opening and closing 
square brackets must be balanced within BODY but the grammar above it only 
defines NAME, ARGUMENTS, HEADER1, and HEADER2.

Link to the documentation: 
https://orgmode.org/worg/org-syntax.html#Inline_Babel_Calls



Documentation: Reference to "KEYCITES" field that is not specified in grammar

2023-07-21 Thread Tom Alexander
The documentation for Citations when specifying which syntactic elements have 
spaces between them references a "KEYCITES" syntactic element that does not 
appear anywhere else on the page.

Link to the documentation issue: 
https://orgmode.org/worg/org-syntax.html#Citations



Re: [FR] Respect `org-bibtex-headline-format-function' in `org-bibtex-create' (was: org-bibtex manual)

2023-07-21 Thread Ihor Radchenko
Ypo  writes:

> What does [FR] mean?

Feature request.

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



[FR] Respect `org-bibtex-headline-format-function' in `org-bibtex-create' (was: org-bibtex manual)

2023-07-21 Thread Ypo

Thanks, Ihor.

What does [FR] mean?

Bests




Ypo  writes:

>/No, I mean customizing the generated headline. Instead of just title, to /
>/be like:/
>
>/* Author (year) /Title/. Publisher/

It would indeed make sense.
*From*: Ihor Radchenko
*Subject*: 	[FR] Respect `org-bibtex-headline-format-function' in 
`org-bibtex-create' (was: org-bibtex manual)

*Date*: Fri, 21 Jul 2023 07:42:36 +



Re: [PATCH] lisp/org-table.el: Allow named columns on lhs

2023-07-21 Thread Gavin Downard


Max Nikulin  writes:
> When I tried table formulas a couple of years ago I was surprised that it is 
> not
> possible to use column names to specify target cells. At first glance it 
> should
> be a great feature. Have you searched the mailing list archive whether it was
> requested earlier? There are might be reasons why it has not been implemented.
> Org spreadsheets are quite complicated.

Surprisingly, I wasn't able to find much. Generally all I could find
talked about hline references , which are similarly unsupported.



Re: [BUG] [PATCH] Avoid interaction in test ~ob-tangle/detangle-false-positive~

2023-07-21 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Evgenii Klimov  writes:
>
>> Test ~ob-tangle/detangle-false-positive~ asks for confirmation to kill
>> the buffer, connected to testing/examples/babel.org file, that is
>> modified during the couse of the test.
>>
>> Way to reproduce the bug (from projects main dir):
>
> Thanks!
> Waiting for your copyright assignment before applying.

Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d6f3aed7b

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



Re: [PATCH] lisp/org-table.el: Allow named columns on lhs

2023-07-21 Thread Max Nikulin

On 19/07/2023 14:44, Ihor Radchenko wrote:


Do I understand correctly the named columns where not allowed at all in
the left side of the formulas previously?


When I tried table formulas a couple of years ago I was surprised that 
it is not possible to use column names to specify target cells. At first 
glance it should be a great feature. Have you searched the mailing list 
archive whether it was requested earlier? There are might be reasons why 
it has not been implemented. Org spreadsheets are quite complicated.





Re: Is there a better (built-in) way to insert an org link with title as description?

2023-07-21 Thread Arthur Miller
Ihor Radchenko  writes:

> Arthur Miller  writes:
>
>> I want to auto insert a title from an HTML page as description for an org 
>> link in
>> my notes. I stumbled upon some old message by Miro Bezjak on this list:
>>
>> https://lists.gnu.org/archive/html/emacs-orgmode/2012-09/msg01435.html
>>
>> I have seen the replies, but I am not sure how to use
>> org-make-link-description-function
>
> Since that time, Org got a capability to set description function
> per link type. Just use
>
> (org-link-set-parameters "http" :insert-description #'your-function)
> (org-link-set-parameters "https" :insert-description #'your-function)

Thanks, after some thinkering I got it:

#+begin_src emacs-lisp
(defun my-org-insert-link ()
  "Insert org link where default description is set to html title."
  (interactive)
  (let* ((url (or (current-kill 0) (read-string "URL: "
(org-insert-link nil url)))

(defun org-desc-from-clipboard (url _desc)
  "Insert an org link into current buffer from an URL in clipboard."
  (with-current-buffer (url-retrieve-synchronously url t)
(goto-char (point-min))
(let ((title "\\(.*\\)\\(/>\\|\\)"))
  (if (re-search-forward title nil t)
  (string-trim (match-string-no-properties 1))
url

(org-link-set-parameters "http" :insert-description #'org-desc-from-clipboard)
(org-link-set-parameters "https" :insert-description #'org-desc-from-clipboard)
#+end_src

And I can do it async too, *but*; this will affect all insertions of links,
right?

I am not sure if it is safe/possible always to access the internet or do
it asynchronously, so I'll abandon the ship and revert to home-cooked one just
for the precautios measures:

#+begin_src emacs-lisp
(defun org-link-from-clipboard ()
  "Insert an org link into current buffer from an URL in clipboard."
  (interactive)
  (let ((marker (point-marker))
(url (or (current-kill 0) (read-string "URL: "
(url-retrieve
 url
 (lambda (_status title)
   (goto-char (point-min))
   (when (re-search-forward title nil t)
 (setq title (string-trim (match-string-no-properties 1
   (with-current-buffer (marker-buffer marker)
 (save-excursion
   (goto-char (marker-position marker))
   (org-insert-link
nil url (or title url)
 '("\\(.*\\)\\(/>\\|\\)") t t)))
#end_src

But it was a bit of learning, thanks for pointing me in the right direction.



Re: [BUG] [PATCH] Avoid interaction in test ~ob-tangle/detangle-false-positive~

2023-07-21 Thread Evgenii Klimov


Ihor Radchenko  writes:

> Bastien Guerry  writes:
>
 Copyright assignment is complete.
>>>
>>> Bastien, may you confirm?
>>
>> Yes I do!  Thanks for the heads up.
>
> Thanks!
> Recorded.
> https://git.sr.ht/~bzg/worg/commit/daaa35a9

Thanks, what about the patch itself?



Re: Is there a better (built-in) way to insert an org link with title as description?

2023-07-21 Thread Arthur Miller
Max Nikulin  writes:

Hi thank you for the thorough and well-informed answer.

> On 19/07/2023 19:06, Arthur Miller wrote:
>> I want to auto insert a title from an HTML page as description for an org 
>> link in
>> my notes.
>> (defun org-link-from-clipboard ()
> ...
>>(url-retrieve url
>> (lambda (buffer)
>>   (goto-char (point-min))
>>   (when (re-search-forward "\\(.*\\)" nil t)
>
> What are origins of your links?

> If it is an URL opened in browser then `org-capture' or
> org-protocol:/store-link/ may be used. There are a number of browser 
> extensions
> for that.

I do use org-protocol, and I do have it in my FFX, so I am aware of it. But
sometimes I copy a link from a readme file or a piece of code or elsewhere and
wish to stash it away in a note but not necessary open in a browser. You know,
"todo" to come back later for it :).

> More metadata sometimes desired and just page title is not enough. For
> extracting it within Emacs see e.g. Ihor's
> https://github.com/yantar92/org-capture-ref
> Search for its discussions on this mailing lists.
>
> Some complications:
> - titles may have &...; entities
> - Not all pages have , so heuristics have to be used.
Yepp, I am aware, the goal was not to be 100% fool proof. I had experienced
sometimes a couple of characters that Emacs can't dissambiguate, but it is not a
problem and yes, in case of no title it will prompt; the other strategy I used
was to return just url itself or "no description". Perhaps I should revert to
just the url.

> - Some HTML files contains nothing besides JavaScript to load actual content
> - Some URLs are from minifiers or obfuscated by Outlook "protection",
>   trampolines to prevent leaking of data through the Referer header, etc. 
> Likely
>  redirection target should be saved, not original URL.
> - Some sites like GitHub have API that allows to get metadata in JSON format. 
> It
>  is better than parsing HTML with regexp.

Yes, I am aware and completely agree with you!

Luckely I am getting quite old by now and don't visit too many sites or sites of
dubious JS character, so for my needs IDC :).

Miros idea served me well for several years now, I just improved it a bit the
other day to skip prmpting for the URL and used asynchornous download to skip
that slight second or two of delay in some links.

> Anyway I suggest to split non-interactive part of the command to allow code
> reuse (for drag and drop, etc.).

Tell me more here? Can I drag a link from one buffer into a note buffer, or how
can I use it?

Thank you for the answer.



Re: Bug: org-anniversary dates not exported to iCalendar [9.4.6 (9.4.6-3-g37f69b-elpaplus @ /home/marcus/.emacs.d/elpa/org-plus-contrib-20210531/)]

2023-07-21 Thread Ihor Radchenko
Marcus Zibrowius  writes:

> I have an org-file with entries of the form
>
> * Abel's birthday party
>   <2023-11-13>
>
> and with entries of the form
>
> * Abel Jacobi
> %%(org-anniversary 1978 11 11) Abel %d
>
> Both types of events show up in my agenda view in emacs. However, when I
> export to ics (e.g. org-export-dispatch > [c] Export to icalendar > [f]
> Current file), only the former type of entries is included in the
> resulting ics-file.

This is because Emacs diary only looks
`icalendar-export-sexp-enumeration-days' days ahead from now when
exporting non-standard diary sexps. By default, it is 2 weeks.
So, you would see the anniversary in icalendar if it were 2 weeks from
now.

You can increase `icalendar-export-sexp-enumeration-days' to get the
anniversary occurrences exported up to that number of days ahead.

Also, `org-anniversary' does not support %d. AFAIK, it is only working
for built-in sexp types, which are handled specially.

-- 
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--cache parser error [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-07-21 Thread Ihor Radchenko
Ilja Kocken  writes:

> This is a bit of a messy bug report, but I've been experiencing it quite
>  regularly lately and it keeps insisting I report it, so I hope it's
> helpful, even if not specific at all...
>
>
> After running org for some time with multiple buffers open, I get this
>  error out of nowhere:
>
>  ■  Warning (org-element-cache): org-element--cache: Org parser error
> in compare_acycle_solutions.png::235494. Resetting.
>  The error was: (error "rx ‘**’ range error")

This tells that you tried to run and Org command inside non-Org (png) buffer.

If you are using the latest Org, you can set debug-on-error to see the
actual backtrace.

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



Re: [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?)

2023-07-21 Thread Jonathan Gregory



On 21 Jul 2023, Ihor Radchenko wrote:


The png is still a full page on my side.


That's not what I get. You're probably missing the paper settings:

#+begin_src lilypond :exports none
\version "2.20"
\paper {
 indent=0\mm
 tagline=""
 line-width=170\mm
 oddFooterMarkup=##f
 oddHeaderMarkup=##f
 bookTitleMarkup=##f
 scoreTitleMarkup=##f
}
#+end_src


Also, I am getting

Processing `/tmp/babel-xQweBZ/lilypond-WGdEvi'
Parsing...
/tmp/babel-xQweBZ/lilypond-WGdEvi:1: warning: no \version 
statement found, please add


\version "2.24.0"

for future compatibility
Interpreting music...[8]
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `ionian2.eps'...
Converting to PNG...
Success: compilation successfully completed
[ Babel evaluation exited with code 0 ]

which does not look necessary.


What is not necessary? The warning is expected. Other than that 
everything looks fine.



--
Jonathan



[BUG] org-element--cache parser error [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-07-21 Thread Ilja Kocken
This is a bit of a messy bug report, but I've been experiencing it quite
 regularly lately and it keeps insisting I report it, so I hope it's
helpful, even if not specific at all...


After running org for some time with multiple buffers open, I get this
 error out of nowhere:

 ■  Warning (org-element-cache): org-element--cache: Org parser error
in compare_acycle_solutions.png::235494. Resetting.
 The error was: (error "rx ‘**’ range error")
 Backtrace:
nil
 Please report this to Org mode mailing list (M-x org-submit-bug-report).

So here's the output of M-x org-submit-bug-report:

Thank you!

Ilja

Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.38, cairo version 1.17.8)
 of 2023-06-05
Package: Org mode version 9.6.6 (release_9.6.6 @
/usr/share/emacs/30.0.50/lisp/org/)

current state:
==
(setq
 org-noter--doc-goto-location-hook '(org-noter-pdftools--doc-goto-location
 org-noter-djvu--goto-location org-noter-nov--goto-location
 org-noter-pdf--goto-location)
 org-ref-bibtex-pdf-download-dir nil
 org-noter--check-location-property-hook '(org-noter-pdftools--check-link)
 org-link-elisp-confirm-function 'yes-or-no-p
 org-shiftdown-final-hook '(evil-org-shift-fallback-command)
 org-hierarchical-todo-statistics nil
 org-global-properties '(("Effort_ALL" . "0:05 0:15 0:30 1:00 2:00 3:00 4:00"))
 org-ref-cite-onclick-function #[257 "\300 \207"
[org-ref-citation-hydra/body] 2 "\n\n(fn _)"]
 org-hide-emphasis-markers t
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-export-with-sub-superscripts '{}
 org-pdftools-get-desc-function 'org-pdftools-get-desc-default
 org-ref-insert-cite-function 'org-ref-insert-cite-link
 org-num-skip-tags '("ignore" "nolatex" "noexport")
 org-log-done 'time
 org-roam-dailies-capture-templates '(("d" "default" entry "* %?" :if-new
   (file+head "%<%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n#+created:
%U\n#+last_modified: %U\n")
   :add-created t :jump-to-captured t)
  )
 org-agenda-custom-commands '(("i" "Inbox" tags "inbox")
  ("I" "Important"
   ((tags "PRIORITY=\"A\"/PROJ"
 ((org-agenda-overriding-header "High-priority projects:")))
(tags "PRIORITY=\"A\"/!-PROJ"
 ((org-agenda-skip-function
   '(org-agenda-skip-entry-if 'todo 'done))
  (org-agenda-overriding-header
   "High-priority unfinished tasks:")
  )
 )
)
   )
  ("A" "new block agenda"
   ((tags-todo "*"
 ((org-agenda-skip-function
   '(org-agenda-skip-if nil '(timestamp)))
  (org-agenda-skip-function
   `(org-agenda-skip-entry-if 'notregexp
 ,(format "\\[#%s\\]" (char-to-string
org-priority-highest)))
   )
  (org-agenda-block-separator nil)
  (org-agenda-overriding-header "Important tasks
without a date")
  )
 )
(todo "WAIT" ((org-agenda-overriding-header "\nTasks on hold")))
(agenda ""
 ((org-agenda-block-separator nil) (org-agenda-span 1)
  (org-deadline-warning-days 0) (org-scheduled-past-days 0)
  (org-deadline-past-days 0)
  (org-agenda-day-face-function (lambda (date)
'org-agenda-date))
  (org-agenda-format-date "%A %-e %B %Y")
  (org-agenda-overriding-header "\nToday's agenda"))
 )
(agenda ""
 ((org-agenda-start-on-weekday nil) (org-agenda-start-day "+1d")
  (org-agenda-span 7) (org-deadline-warning-days 0)
  (org-agenda-block-separator nil)
  (org-agenda-skip-function
   '(org-agenda-skip-entry-if 'todo 'done))
  (org-agenda-overriding-header "\nNext seven days"))
 )
(agenda ""
 ((org-agenda-time-grid nil) (org-agenda-start-on-weekday nil)
  (org-agenda-start-day "+7d") (org-agenda-span 14)
  (org-agenda-show-all-dates nil) (org-deadline-warning-days 0)
  (org-agenda-block-separator nil)
  (org-agenda-entry-types '(:deadline))
  (org-agenda-skip-function
   '(org-agenda-skip-entry-if 'todo 'done))
  (org-agenda-overriding-header "\nUpcoming deadlines (+14d)"))
 )
(agenda ""
 ((org-agenda-overriding-header "\nOverdue")
  (org-agenda-time-grid nil) (org-agenda-block-separator nil)
  (org-agenda-start-on-weekday nil)
  

Bug: org-anniversary dates not exported to iCalendar [9.4.6 (9.4.6-3-g37f69b-elpaplus @ /home/marcus/.emacs.d/elpa/org-plus-contrib-20210531/)]

2023-07-21 Thread Marcus Zibrowius

I have an org-file with entries of the form

* Abel's birthday party
  <2023-11-13>

and with entries of the form

* Abel Jacobi
%%(org-anniversary 1978 11 11) Abel %d

Both types of events show up in my agenda view in emacs. However, when I
export to ics (e.g. org-export-dispatch > [c] Export to icalendar > [f]
Current file), only the former type of entries is included in the
resulting ics-file.

User "phils" on the (emacs) StackExchange website suspected this is a bug and
directed me here.  Following their advice, I tried using diary-anniversary
instead of org-anniversary.  With this change, the event does get exported
correctly to icalendar, but it no longer shows up in my agenda view in
emacs. (Also, %d gets exported verbatim rather than converted to the
appopriate integer.)

https://emacs.stackexchange.com/q/78003/13054

==


Emacs  : GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
cairo version 1.16.0)
 of 2023-06-02
Package: Org mode version 9.4.6 (9.4.6-3-g37f69b-elpaplus @ 
/home/marcus/.emacs.d/elpa/org-plus-contrib-20210531/)

current state:
==
(setq
 org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s %b")
(todo . " %i %-12:c") (tags . " %i %-12:c")
(search . " %i %-12:c"))
 org-link-elisp-confirm-function 'yes-or-no-p
 org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled
 org-after-todo-state-change-hook '(org-checklist)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-log-done 'time
 org-agenda-tags-todo-honor-ignore-options t
 org-agenda-custom-commands '(("p" tags "PROJECT/-DONE" nil)
  ("r" "Routine"
   ((agenda "" ((org-agenda-span 'week)))
(tags "PROJECT/-DONE") (tags "ROUTINE"))
   )
  (" " "Overwiew"
   ((agenda ""
 ((org-agenda-ndays 1)
  (org-agenda-tag-filter-preset '("-routine")))
 )
)
   )
  )
 org-log-into-drawer t
 org-agenda-skip-scheduled-if-done t
 org-agenda-files '([NAMES REDACTED])
  org-refile-targets '((nil :maxlevel . 2) (org-agenda-files :maxlevel . 2))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-default-notes-file "~/uniNotes/refile.org"
 org-finalize-agenda-hook '((lambda nil
 (save-excursion
  (color-org-header "DAY:" "red" "white")
  (color-org-header "Home:" "azure" "black")
  (color-org-header "People:" "azure" "black")
  (color-org-header "Uni:" "white" "red")
  (color-org-header "UniS:" "white" "deep pink")
  (color-org-header "Conf:" "misty rose" "black"))
 )
)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-with-broken-links 'mark
 org-mode-hook '(my-adaptive-wrap-prefix-disable
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-all append local] 
5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all
append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes
 org-eldoc-load)
 org-agenda-skip-deadline-if-done t
 org-mairix-gnus-select-display-group-function 
'org-mairix-gnus-select-display-group-function-gg
 org-agenda-time-grid '((daily today remove-match)
(800 1000 1200 1400 1600 1800 2000) ".."
"")
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-priority-faces '((65 :foreground "red" :weight bold) (66 :foreground "red")
  (67 :foreground "gray"))
 org-icalendar-use-scheduled '(event-if-not-todo)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-reveal-start-hook '(org-decrypt-entry)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-checklist-export-function 'org-export-as-ascii
 org-stuck-projects 

Re: [BUG] org-element--cache parser error [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-07-21 Thread Ilja Kocken
Ah, I think it happened right after evaluating an org-source block (an
R source block with an interactive session that produces a file, using
this header:
#+begin_src R :results output graphics file :file
imgs/compare_acycle_solutions.png :width 1920 :height 1080
I have a hook to redisplay inline images after these types of C-c C-c
invocations, this may have triggered it?



Re: [BUG] [PATCH] Avoid interaction in test ~ob-tangle/detangle-false-positive~

2023-07-21 Thread Ihor Radchenko
Bastien Guerry  writes:

>>> Copyright assignment is complete.
>>
>> Bastien, may you confirm?
>
> Yes I do!  Thanks for the heads up.

Thanks!
Recorded.
https://git.sr.ht/~bzg/worg/commit/daaa35a9

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



Re: [BUG] [PATCH] Avoid interaction in test ~ob-tangle/detangle-false-positive~

2023-07-21 Thread Bastien Guerry
Ihor Radchenko  writes:

> Evgenii Klimov  writes:
>
>>> Waiting for your copyright assignment before applying.
>>
>> Copyright assignment is complete.
>
> Bastien, may you confirm?

Yes I do!  Thanks for the heads up.

-- 
 Bastien Guerry



Re: [ANN] lisp/ob-tangle-sync.el

2023-07-21 Thread Mehmet Tekman
Hello

> Ihor Radchenko  writes:
>
> P.S. There going to be Emacs meetup this Saturday, July 22
> (https://emacs-apac.gitlab.io/announcements/july-2023/). I plan to be
> there and, if you need it, we can try to resolve difficulties in more
> interactive way.

I am currently travelling this weekend, otherwise I happily would
attend so that this patch could speed forward. Next month maybe?

> This is failing because of subtlety in
> `org-test-with-temp-text' that inserts text after activating
> org-mode.  PROPERTY lines are only computed when org-mode is
> activated, unless you explicitly call
> `org-set-regexps-and-options' to refresh them.

Okay, it's working as intended now.

> This fails because you did not provide LANG for source block.
> override-document-and-heading-tfile-with-yes test is also
> missing LANG.

Thanks, I thought I fixed this last time you mentioned it but
apparently only in my mind...

> Side note: You are re-implementing the already available ERT
> features for failed test reporting. Instead of controlling
> which tests failed manually, you should better follow the
> example of all other tests and simply use a sequence of
> `should'/`should-not' forms.

Okay, I've re-written this to conform to the `should' macros.  I
*really* wish these macros could be named so that I could debug
failing statements better, but for now numbering them in the
comments and using the `l' binding works well enough for
debugging.

I have two tests that I've set to "should-not" pass for now, but
once the correct merging behaviour has been implemented, I
believe that I will change them to "should" pass statements:

- 9. do-not-tangle-this-block
- 12. tangle-file-with-spaces

Attached is the new diff (travelling makes it hard to write
meaningful commit messages so I did not use git-format-patch),
which should be used against the upstream/main.

Looking forward to further feedback!

Best,
Mehmet
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index c8dbd44f4..2b9326865 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -314,6 +314,151 @@ this is simple"
 (org-babel-next-src-block)
 (should (= 14 (org-babel-execute-src-block)
 
+
+(ert-deftest test-ob/merge-params ()
+  "Test the output of merging multiple header parameters.  The
+expected output is given in the contents of the source code block
+in each test.  The desired test header parameters are given
+either as a symbol or a list in the `idtest-alist' variable.
+Multiple header parameters must be separated by a newline and
+exactly two spaces in the block contents."
+  (let ((test-the-result
+ (lambda (test-prop)
+   (org-babel-next-src-block)
+   (org-set-regexps-and-options)
+   (string=
+(if (string= "symbol" (type-of test-prop))
+(format "%s" (assoc test-prop (nth 2 (org-babel-get-src-block-info
+  (mapconcat
+   (lambda (x) (format "%s" (assoc x (nth 2 (org-babel-get-src-block-info)
+   test-prop "\n  ")) ;; newline with exactly two spaces.
+(string-trim (org-element-property :value (org-element-at-point)))
+(should ;; 1. inherit-document-header-args
+ (org-test-with-temp-text
+ "\
+#+PROPERTY: header-args :tangle /tmp/default_tangle.txt
+* One
+#+begin_src conf
+  (:tangle . /tmp/default_tangle.txt)
+#+end_src"
+   (funcall test-the-result :tangle)))
+(should  ;; 2. inherit-document-header-with-local-sync-action
+ (org-test-with-temp-text
+ "\
+#+PROPERTY: header-args :tangle /tmp/default_tangle.txt
+* One
+#+begin_src conf :tangle skip
+  (:tangle . /tmp/default_tangle.txt skip)
+#+end_src"
+   (funcall test-the-result :tangle)))
+(should ;; 3. override-document-header-with-local-tfile
+ (org-test-with-temp-text
+ "\
+#+PROPERTY: header-args :tangle /tmp/default_tangle.txt
+* One
+#+begin_src conf :tangle randomfile sync
+  (:tangle . randomfile sync)
+#+end_src"
+   (funcall test-the-result :tangle)))
+(should  ;; 4. override-document-and-parent-header-with-local-tfile-and-action
+ (org-test-with-temp-text
+ "\
+#+PROPERTY: header-args :tangle /tmp/default_tangle.txt
+* One
+:PROPERTIES:
+:header-args: :tangle \"newfile.txt\" import
+:END:
+** Two
+#+begin_src conf :tangle randomfile sync
+  (:tangle . randomfile sync)
+#+end_src"
+   (funcall test-the-result :tangle)))
+(should ;; 5. test-tangle-and-default-results-param-together
+ (org-test-with-temp-text
+ "\
+* One
+#+begin_src conf  :tangle randomfile
+  (:tangle . randomfile)
+  (:results . replace)
+#+end_src"
+   (funcall test-the-result '(:tangle :results
+(should  ;; 6. inherit-document-tfile-take-only-last-local-sync-action
+ (org-test-with-temp-text
+ "\
+#+PROPERTY: header-args :tangle /tmp/default_tangle.txt
+* One
+#+begin_src conf  :tangle import export
+  (:tangle . /tmp/default_tangle.txt export)

Re: [BUG] SPACE jumps to tag in header line after hidden emphasis marker [9.7-pre (release_9.6.7-562-g5b6268 @ /home/jschmidt/work/org-mode/lisp/)]

2023-07-21 Thread Ihor Radchenko
Jens Schmidt  writes:

> On 2023-07-18  10:13, Ihor Radchenko wrote:
>
>> No, it is space. In particular, it is `org--align-tags-here' + some bug
>> in Emacs that screws up column computation.
>> 
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64696
>
> FWIW the third test yields
>
>   ■  Warning (emacs): Test #3:: ’word’ is hidden applying ’invisible 
> text property to heading body.
>   ■  Warning (emacs): Moved point after first ’word’
>   ■  Warning (emacs): 1:: current-column = 0
>   ■  Warning (emacs): redisplayed
>   ■  Warning (emacs): 2:: current-column = 0
>   ■  Warning (emacs): Indented to column 50
>   ■  Warning (emacs): 3:: current-column = 0
>   ■  Warning (emacs): redisplayed
>   ■  Warning (emacs): 4:: current-column = 0
>   ■  Warning (emacs): Enabled visible mode
>   ■  Warning (emacs): 5:: current-column = 50
>   ■  Warning (emacs): redisplayed
>   ■  Warning (emacs): 6:: current-column = 50
>
> on my system which seems to be different from what you described.

I think it is same.

> And for the fun of it: With (indent-tabs-mode -1) tests 3 and 4 report 
> column 54 for "5::" and "6::".

Interesting.
Same for me.
I will update the bug report.

P.S. You can reply to the bug report directly by sending email to
64...@debbugs.gnu.org

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



Re: [PATCH] Re: what is the purpose of "This link has already been stored"?

2023-07-21 Thread Ihor Radchenko
Samuel Wales  writes:

> On 7/15/23, Ihor Radchenko  wrote:
>> Applied, onto main.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c0dbcf361
>
> thank you!  will this reach bugfix too?

No, because it is a new feature. So, it is for the next release.

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



Re: [BUG] [PATCH] Avoid interaction in test ~ob-tangle/detangle-false-positive~

2023-07-21 Thread Ihor Radchenko
Evgenii Klimov  writes:

>> Waiting for your copyright assignment before applying.
>
> Copyright assignment is complete.

Bastien, may you confirm?

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



[FR] Respect `org-bibtex-headline-format-function' in `org-bibtex-create' (was: org-bibtex manual)

2023-07-21 Thread Ihor Radchenko
Ypo  writes:

> No, I mean customizing the generated headline. Instead of just title, to 
> be like:
>
> * Author (year) /Title/. Publisher

It would indeed make sense.

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



Re: [BUG] WORG example for ob-lilypond is no longer working as described (was: Moving some lisp/ob-*.el files to org-contrib - your advice?)

2023-07-21 Thread Ihor Radchenko
Jonathan Gregory  writes:

> On 20 Jul 2023, Ihor Radchenko wrote:
>
>> With your patch, I cannot produce png output. The file is just 
>> not created: [...]
>
> You're right. Thanks for the feedback.
>
> I've made some changes and was able to produce the correct results 
> using pdf, eps, and png (tested with 2.20.0 and 2.24.1). I think 
> this gets us closer to the old behaviour, assuming there are no 
> other issues, of course.

The png is still a full page on my side.
Also, I am getting

Processing `/tmp/babel-xQweBZ/lilypond-WGdEvi'
Parsing...
/tmp/babel-xQweBZ/lilypond-WGdEvi:1: warning: no \version statement found, 
please add

\version "2.24.0"

for future compatibility
Interpreting music...[8]
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `ionian2.eps'...
Converting to PNG...
Success: compilation successfully completed
[ Babel evaluation exited with code 0 ]

which does not look necessary.

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



Re: Unable to unfold a folded block having point directly after the folded block

2023-07-21 Thread Ihor Radchenko
Vlastimil Vondra  writes:

> Perfect, org-reveal is working as well, haven't known about that! But it
> would be good that org-reveal is called automatically before org-cycle,
> because when going through the task list, I'm just expanding by tab. It is
> not really convenient to use tab and when reaching error (or no unfold)
> then hitting C-c C-r. Maybe it's just me.

Try to customize `org-cycle-emulate-tab'. That way, `org-cycle' will try
to reveal current heading in more places instead of attempting to
perform indentation.

I do not think that calling org-reveal before org-cycle is a good idea -
it may lead to unexpected results depending on
`org-fold-show-context-detail'.

You can also create your own custom `personal/org-cycle' command that
will (1) call `org-reveal' (2) call `org-cycle'.

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