Re: Bug: Off-by-one when archiving to top level date [9.3.6 (9.3.6-17-g389288-elpa @ /home/charlestam/.emacs.d/elpa/org-20200224/)]

2020-11-11 Thread Kyle Meyer
Charles Tam writes:

> Wow it's been a while. Sorry I dropped this!
>
> To reproduce the bug, open the following content in `emacs -q` and run
> org-archive-subtree on the TEST ITEM:
>
> #+COMMENT: Local Variables:
> #+COMMENT: mode: org
> #+COMMENT: org-archive-location: "::datetree/"
> #+COMMENT: org-odd-levels-only: t
> #+COMMENT: End:
>
> * TEST ITEM
>
> You can check that the indentation of the TEST ITEM is more correct if you
> set org-odd-levels-only to nil. More weirdness also happens if you set
> org-archive-location to "::datetree/* Archive Header" (while
> org-odd-levels-only is t).

Thanks for the reproducer.  Should be fixed with 262777294.



Re: manual omission - effort command in agenda remote editing section

2020-11-11 Thread Kyle Meyer
Ian Garmaise writes:

> The following command is missing from section 11.5, Commands in the Agenda
> Buffer, Remote editing commands
>
> C-c C-x e or short e (org-set-effort)

Thanks for catching that.  Added in f6cf6bb6e.



Re: Thoughts on the standardization of Org

2020-11-11 Thread Greg Minshall
Jean Louis,

> Like alias cat='sequence off; cat' something like that
> 
> Somebody already mentioned there is cat -v to show nonprinting
> characters with notation ^- and M- so that may be the solution and I
> may be wrong there.

yes, 'cat -v' will do it for you.  (or, i'd like to know if i've been
wrong all these years! :)

: cat `which cat` | cat -v | less

cheers.



Re: Missing argument in org-reset-checkbox-state-subtree?

2020-11-11 Thread Kyle Meyer
Bob Wilson writes:

> I’m writing about a possible bug in
> org-reset-checkbox-state-subtree. This function calls
> org-update-checkbox-count-maybe with argument 'all, but this value is
> not defined in the function (or anywhere else that I can see).

[ I'm looking at the copy on master (e9c3993ee), though org-list.el
  hasn't changed since that last release. ]

org-reset-checkbox-state-subtree calls

(org-update-checkbox-count-maybe 'all)

and org-update-checkbox-count-maybe calls

(org-update-checkbox-count all)

And org-update-checkbox-count considers ALL, so I'm not spotting
anything that's undefined.

> I’d like this value to be nil because I don’t want to update the
> statistics cookies in the entire buffer, but I don’t see a way to do
> this (pardon my limited elisp). My workaround is to add an optional
> all argument to org-reset-checkbox-state-subtree and pass it to
> org-update-checkbox-count-maybe.

Why does refreshing the stats for the entire buffer cause a problem for
you?

> This seems like the desired functionality unless I’m missing
> something. Is the current implementation intentional?

Yes, the change was made with a0bc3bdeb (org-list: fix update of
check-boxes cookies in whole trees, 2011-06-20).  The example that
prompted that change was reported at
.

Here's a reduced example:

  * a
  ** aa [1/1]
  - [X] l
  ** ab [1/1]
  - [X] m

Calling org-reset-checkbox-state-subtree with point at the top-level "a"
should uncheck l and m and the stats of both subheadings should go to
[0/1]:

  * a
  ** aa [0/1]
  - [ ] l
  ** ab [0/1]
  - [ ] m

If you were to drop `all' from -reset-checkbox-state-subtree's the call
to -update-checkbox-count-maybe, the result would instead be

  * a
  ** aa [1/1]
  - [ ] l
  ** ab [0/1]
  - [ ] m



[ANN] org-ql: Bookmarks, dynamic blocks, and links

2020-11-11 Thread Adam Porter
Hi all,

FYI, I've recently added some new features to org-ql[0]:

1.  Dynamic Blocks[1] allow you to insert a block that lists headings in
a document which match a query, formatting them into certain columns.
For example (please excuse the wrapped header line for this message):

#+BEGIN: org-ql :query "todo: priority:A,B" \
:columns (todo (priority "P") deadline heading) \
:sort (deadline priority) :take 7 :ts-format "%Y-%m-%d %H:%M"
| Todo | P | Deadline | Heading   |
|--+---+--+---|
| TODO | A | 2017-07-07 00:00 | Take over the world   |
| TODO | B | 2017-07-10 00:00 | Renew membership in supervillain club |
| TODO | A | 2017-07-15 00:00 | Take over the universe|
| TODO | B | 2017-07-21 00:00 | Internet  |
| TODO | A | 2017-08-01 00:00 | Spaceship lease   |
| TODO | A |  | Skype with president of Antarctica|
| TODO | B |  | Take over Mars|
#+END:

2. Links[2] allow you to access an Org QL View by clicking on a link,
like:

[[org-ql-search:todo:NEXT priority:A]]

It integrates with the Org link storing and inserting commands (`C-c l`
and `C-c C-l`), so you can easily create a custom search view and insert
a link to it into an Org file.  Then you can click the link to run the
search.

3.  Bookmarks allow Org QL View buffers to be bookmarked with Emacs
bookmark commands, like "C-x r m".  This also integrates with my new
buffer/window/frame/workspace-restoration package, Burly.[3]

Together, these features allow agenda-like views and searches to be
easily and quickly designed, saved, and accessed.

Please let me know if you have any feedback.

Thanks,
Adam

0: https://github.com/alphapapa/org-ql
1: https://github.com/alphapapa/org-ql#dynamic-block
2: https://github.com/alphapapa/org-ql#links
3: https://github.com/alphapapa/burly.el




Re: Non-interactively filter the agenda using tags?

2020-11-11 Thread Ihor Radchenko
You can try org-agenda-filter-preset, though it will apply to all the
agenda view, not just (agenda ...) block.

Also, there is always org-agenda-skip-function.

Best,
Ihor

o.ro...@posteo.net writes:

> Hello everyone,
>
> I hope I'm not asking something that has been answered 100 times, I made 
> a search to ensure nothing extremely obious slipped under the radar (I 
> also asked on IRC).
>
> I know that when you are in the agenda view that displays appointments, 
> it is possible to interactively filter in order to take into account a 
> specific tag (inclusive or exclusive). However, I would like to make an 
> agenda view which does this non-interactively.
>
> Essentially, what I would love to have at my disposal is to have 
> something like the MATCH you have in (tags-todo MATCH ...) for agenda - 
> because as of yet, this seems to be impossible. I have tried to look for 
> different variables and/or functions but couldn't find anything that 
> matches.
>
> Am I overlooking something obvious? If so, feel free to point me to 
> solutions so I can do my homework properly ;-)
>
> Greetings, have a good day,
> Olivier



Re: [PATCH] New "project" option for org-link-file-path-type

2020-11-11 Thread Jack Kamm
Thanks, I've fixed the remaining issues you pointed out and pushed this
in 5371b30fe.

Cheers,
Jack



Re: Non-interactively filter the agenda using tags?

2020-11-11 Thread Justin Abrahms


I think you're looking for org-super-agenda[0]. This is how I'm using it
in my own emacs config.

```
(use-package org-super-agenda
  :init (setq org-super-agenda-groups
  '(
(:priority "A" :name "High priority")
(:auto-property "WAITING_ON" :log t)

;; by project (more specific first)
(:name "mobile opex" :tag "mobile")
(:name "glass" :tag "glass")
(:name "opex" :tag "opex")
(:name "writing" :tag "writing")

;; normal priority
(:name "Misc" :not (:priority "A"
  :config (org-super-agenda-mode 1))
```

[0]: https://github.com/alphapapa/org-super-agenda

o.ro...@posteo.net writes:

> Hello everyone,
>
> I hope I'm not asking something that has been answered 100 times, I made 
> a search to ensure nothing extremely obious slipped under the radar (I 
> also asked on IRC).
>
> I know that when you are in the agenda view that displays appointments, 
> it is possible to interactively filter in order to take into account a 
> specific tag (inclusive or exclusive). However, I would like to make an 
> agenda view which does this non-interactively.
>
> Essentially, what I would love to have at my disposal is to have 
> something like the MATCH you have in (tags-todo MATCH ...) for agenda - 
> because as of yet, this seems to be impossible. I have tried to look for 
> different variables and/or functions but couldn't find anything that 
> matches.
>
> Am I overlooking something obvious? If so, feel free to point me to 
> solutions so I can do my homework properly ;-)
>
> Greetings, have a good day,
> Olivier




Non-interactively filter the agenda using tags?

2020-11-11 Thread o . rojon

Hello everyone,

I hope I'm not asking something that has been answered 100 times, I made 
a search to ensure nothing extremely obious slipped under the radar (I 
also asked on IRC).


I know that when you are in the agenda view that displays appointments, 
it is possible to interactively filter in order to take into account a 
specific tag (inclusive or exclusive). However, I would like to make an 
agenda view which does this non-interactively.


Essentially, what I would love to have at my disposal is to have 
something like the MATCH you have in (tags-todo MATCH ...) for agenda - 
because as of yet, this seems to be impossible. I have tried to look for 
different variables and/or functions but couldn't find anything that 
matches.


Am I overlooking something obvious? If so, feel free to point me to 
solutions so I can do my homework properly ;-)


Greetings, have a good day,
Olivier



Bug: ODT export incorrect when org file contains a Byte Order Mark [9.4 (9.4-29-g20374f-elpaplus @ /home/br/.emacs.d/elpa/org-plus-contrib-20201102/)]

2020-11-11 Thread Bruno Raoult

When an org buffer coding system is "utf-8-with-signature-unix" (the first 3 
bytes in file are 0xEF 0xBB 0xBF), export to ODT gives following LibreOffice 
error when opening the exported file :
"The file 'test.odt' is corrupt and therefore cannot be opened. LibreOffice can 
try to repair the file. [etc...]".

If we set the encoding to "utf-8-unix" (no BOM), export is correct, and 
LibreOffice does not complain.

To reproduce: Create a minimal org buffer, change the coding system 
(set-buffer-file-coding-system) to "utf-8-with-signature-unix", then export to 
ODT (C-c C-e o o), and open the generated odt file with LibreOffice.

Note: Export to different formats (html, PDF, LaTeX) look correct.

Versions:
  System:  Xubuntu 20.04.1 LTS (focal)
  Emacs:   27.1
  Org: 9.4
  LibreOffice: 6.4

Regards,

br.

Attachement: test.org, a faulty org file (with Byte Order Mark).

$ file test.org
test.org: UTF-8 Unicode (with BOM) text



Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32)
 of 2020-10-29
Package: Org mode version 9.4 (9.4-29-g20374f-elpaplus @ 
/home/br/.emacs.d/elpa/org-plus-contrib-20201102/)

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-babel-after-execute-hook '(org-redisplay-inline-images)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-startup-folded 'content
 org-mode-hook '(my/org-mode-hook org-tempo-setup
 #[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
 #[0 "\301\211.\207" [imenu-create-index-function 
org-imenu-get-tree]
   2]
 org-eldoc-load)
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 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-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-babel-load-languages '((calc . t) (emacs-lisp . t) (sql . t) (perl . t)
(shell . t))
 org-html-text-markup-alist '((verbatim . "%s")
  (verbatim . "%s")
  (verbatim . "%s")
  (verbatim . "%s")
  (verbatim . "%s")
  (verbatim . "%s")
  (bold . "%s") (code . "%s")
  (italic . "%s")
  (strike-through . "%s")
  (underline . "%s")
  (verbatim . "%s"))
 org-ascii-format-drawer-function #[771 ".\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-agenda-loop-over-headlines-in-active-region nil
 org-src-lang-modes '(("arduino" . arduino) ("browser" . html) ("redis" . redis)
  ("php" . php) ("C" . c) ("C++" . c++) ("asymptote" . asy)
  ("bash" . sh) ("beamer" . latex) ("calc" . fundamental)
  ("cpp" . c++) ("ditaa" . artist) ("dot" . fundamental)
  ("elisp" . emacs-lisp) ("ocaml" . tuareg)
  ("screen" . shell-script) ("shell" . sh) ("sqlite" . sql))
 org-src-preserve-indentation t
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO" "STARTED" "WAITING" "|" "DONE" 
"CANCELED"))
 org-support-shift-select t
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("perl" . "pl") ("emacs-lisp" . "el") ("elisp" . 
"el"))
 org-export-before-parsing-hook '(org-attach-expand-links)
 

Re: Thoughts on the standardization of Org

2020-11-11 Thread Jean Louis
* Maxim Nikulin  [2020-11-11 20:17]:
> 2020-11-11 Jean Louis wrote:
> > * Maxim Nikulin [2020-11-10 19:31]:
> > > 2020-11-10 Greg Minshall wrote:
> > > > 
> > > > i would guess
> > > > using 'cat -v' to read e-mail is 100% safe.  even throwing in
> > > > uudecode(1), or whatever is needed to decode base64, (and then piping
> > > > through 'cat -v', of course ), it's probably still safe.
> > > 
> > > Please, check that you have at least updated tmux before applying such
> > > "safe" handler: https://www.openwall.com/lists/oss-security/2020/11/05/3 
> > > The
> > > news are too recent to not mention the link in such context.
> > > 
> > > The sour story is that it is unsafe to feed non-trusted files directly to
> > > terminal. A filter against control sequences is required.
> > 
> > Is there anyway to disable control sequences? Than cat can be aliased.
> 
> We were kidding.
> 
> You do not need a terminal if you do not need control sequences. They plays
> the role of interface to allow line (or full screen) editing that is why
> control sequences is the essence of terminals. I suppose you would get tired
> almost immediately having to type everything strictly sequential without
> ability to remove even the last character. Some terminals allows to disable
> particular features, e.g. setting of title in xterm. But there are still a
> lot of rather basic capabilities.

I know what you mean. I did not express myself very specific. What I
meant is to alias cat to something else that specifically turns off
control sequences.

Like alias cat='sequence off; cat' something like that

Somebody already mentioned there is cat -v to show nonprinting
characters with notation ^- and M- so that may be the solution and I
may be wrong there.

I am often using cat to view files and for some remote files I have to
put attention.




Missing argument in org-reset-checkbox-state-subtree?

2020-11-11 Thread Bob Wilson
Hi folks,
   I’m writing about a possible bug in org-reset-checkbox-state-subtree. This 
function calls org-update-checkbox-count-maybe with argument 'all, but this 
value is not defined in the function (or anywhere else that I can see). 

I’d like this value to be nil because I don’t want to update the statistics 
cookies in the entire buffer, but I don’t see a way to do this (pardon my 
limited elisp). My workaround is to add an optional all argument to 
org-reset-checkbox-state-subtree and pass it to org-update-checkbox-count-maybe.

This seems like the desired functionality unless I’m missing something. Is the 
current implementation intentional?

Kind regards,
Bob Wilson


Re: Thoughts on the standardization of Org

2020-11-11 Thread Maxim Nikulin

2020-11-11 Jean Louis wrote:

* Maxim Nikulin [2020-11-10 19:31]:

2020-11-10 Greg Minshall wrote:


i would guess
using 'cat -v' to read e-mail is 100% safe.  even throwing in
uudecode(1), or whatever is needed to decode base64, (and then piping
through 'cat -v', of course ), it's probably still safe.


Please, check that you have at least updated tmux before applying such
"safe" handler: https://www.openwall.com/lists/oss-security/2020/11/05/3 The
news are too recent to not mention the link in such context.

The sour story is that it is unsafe to feed non-trusted files directly to
terminal. A filter against control sequences is required.


Is there anyway to disable control sequences? Than cat can be aliased.


We were kidding.

You do not need a terminal if you do not need control sequences. They 
plays the role of interface to allow line (or full screen) editing that 
is why control sequences is the essence of terminals. I suppose you 
would get tired almost immediately having to type everything strictly 
sequential without ability to remove even the last character. Some 
terminals allows to disable particular features, e.g. setting of title 
in xterm. But there are still a lot of rather basic capabilities.


Likely pasting a command from a web page is a more real threat. E.g. zsh 
could be more restrictive than bash during copy a peace of text into 
terminal. If you have to work in non-trusted environments, some general 
recommendations (e.g. keep you system up to date) and isolation 
techniques (virtual machines or at least separate system users) could be 
applied.


My point was that MIME handlers have to be carefully chosen. Even well 
known applications could have special options. And sorry, I somehow 
missed "-v" option of cat in Greg's message. It is exactly the case of a 
tool that everyone knows and a significantly more rare option.





More on design of org-contacts.el - Re: [UPDATED PATCH] Re: add new link type "contact:" for org-contacts.el

2020-11-11 Thread Jean Louis
* stardiviner  [2020-11-11 15:05]:
  :PROPERTIES:
  :CREATED:  [2020-11-11 Wed 16:57]
  :ID:   17d463d2-ff0c-4614-93da-06e3de8e6035
  :END:
> Thank you too.
> I indeed want to extend org-contacts.el. So I would like to be it's
> maintainer.
> 
> Currently how many org-mode maintainer(mailing list manager)?
> If patch need to wait a month. Because I spend less time on org-mode too
> comparing before time. I agree with that, I might will add multiple PATCHes
> together.

Side notes:

I have looked into contacts. It relies on a query to find a contact. I
hope that I am right.

Text based Org mode anyway may rely on built-in text searches like
incremental Emacs's search.

org-contact wishes to pin point to specific contact. It wants to
create a hyperlink to one specific contact. It does not want to find 2
contacts with the same query or more of them. 

As I have 195000 contacts in PostgreSQL database I know from browsing
them that many of them have same unique names. To reference to a
specific contact by using name query would be useless as I could miss
it and take other contact. Thus search involves narrowing contacts by
maybe state, location and other filters. Each contact has its own
uniquely assigned ID number. An integer assigned by the database
automatically.

By using the ID number I can easily capture the reference link to th
contact from the database and insert such link into the Org file. As
long as I do not change the ID number even if contact name is changed
I would be able to pin point the specific number.

Thus for org-contacts I recommend creation of unique IDs in the
properties for headings for each contact so that contact may be
referenced by the unique ID.

Additional proposals:

Each hyperdocument (within or without Emacs) that allows back linking
to its specifical parts should have a function or key binding to
quickly obtain the link reference.

For example if user browses heading for *** John Doe anywhere within
such heading user should be able to press a key to capture the link to
the contact automatically.

In the file my-contacts.org:

*** John Doe
:PROPERTIES:
:ID:   cc400d57-2adf-47af-90d9-c4d9fdd70d2b
:CREATED:  [2020-11-11 Wed 16:57]
:END:

DATA

 DATA
 :PROPERTIES:
 :CREATED:  [2020-11-11 Wed 16:57]
 :ID:   19781b53-211b-4291-af48-5f3655dd7cec
 :END:

 DATA
 :PROPERTIES:
 :CREATED:  [2020-11-11 Wed 16:57]
 :ID:   e8eb6647-8d8e-4ec6-b759-43dcfd60d17b
 :END:

Anywhere within the subtree for John Doe user should be able to obtain
the reference to the contact. For example by clicking `C-x w'.

Upon key press following link could then be stored into memory, or
register, whatever is better design:

[[org-contact:~/file/my-contacts.org#cc400d57-2adf-47af-90d9-c4d9fdd70d2b][John 
Doe]]

Then user would go to other Org file and use `C-y' to yank the contact
into the new file.

One shall consider that obtaining the object reference should be
on the fly customizable. As maybe I wish to have in the link:

- Contact's first name only like when addressing friends

- Contact's full name, with or without middle names

- Contact's name plus city and country

Having several ways to obtain quickly reference to the contact (to
generate link in memory) is useful feature that shortens the time and
makes it less error prone for the user. If only query is used with
simple typo contact link will not work. What will follow is tedious
browsing and opening of files to find the right contact.

User can have many Org contact files and file reference should be
included into the file. This assumes that files should be fixed in
file system.

This proposal follows the Doug Engelbart's Technology Template Project
for Open Hyperdocument Systems (OHS) in relation to addressing:
https://www.dougengelbart.org/content/view/110/460/#2b1

Global, Human-Understandable, Object Addresses

Every object that someone might validly want/need to cite or otherwise
access should have an unambiguous address, capable of being portrayed
in a human readable and interpretable manner. Most common existing
spreadsheet programs have provisions similar to this for cell
addressibility

And:

Link Addresses That Are Readable and Interpretable by Humans
https://www.dougengelbart.org/content/view/110/460/#2b1b

It should be possible to display and specify the complete link address
of any object in the global domain of the OHS. This human-readable
description of the "address path" leading to the cited object should
permit a transparent possibility for human understanding of the path
including the possibility of reading, interpretation, and conceptually
following the specification

As Emacs already supports remote files, contact path can be
automatically obtained. If I am editing contacts on remote VPS server,
maybe users on the remote server and their details, then my local Org
file should be able to point to remote server. Such link would look
like:


Re: official orgmode parser

2020-11-11 Thread Daniele Nicolodi
On 11/11/2020 10:15, Bastien wrote:
> Hi Daniele,
> 
> Daniele Nicolodi  writes:
> 
>> Would it make sense to have one "official" (or a set of) org-mode test
>> files and the corresponding syntax tree as parsed by org-elements (maybe
>> in a format easier to read from other programming languages than
>> s-expressions, json maybe?) to make testing other parser against the
>> reference implementation easier?
> 
> I think it is a very good idea.
> 
> The example file would be also good to help users track for small
> syntactic changes, when they happen.
> 
> Would you like to work on such a file?

I don't have enough motivation to see this climb high enough in my TODO
list to see any meaningful progress in a reasonable time frame.  I am
mote than happy to contribute to Org, but it is more effective to keep
these contributions related to my daily use of Org.

Cheers,
Dan



Re: [UPDATED PATCH] Re: add new link type "contact:" for org-contacts.el

2020-11-11 Thread stardiviner
Thank you too.
I indeed want to extend org-contacts.el. So I would like to be it's
maintainer.

Currently how many org-mode maintainer(mailing list manager)?
If patch need to wait a month. Because I spend less time on org-mode too
comparing before time. I agree with that, I might will add multiple PATCHes
together.


[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


On Wed, Nov 11, 2020 at 4:37 PM Bastien  wrote:

> Hi Stardiviner,
>
> stardiviner  writes:
>
> > You're right. Thanks for suggestion.
> > I attached new patch now.
>
> Applied, thanks.
>
> Would you like to be org-contacts.el maintainer?
>
> Beware that, since it is in contrib/, it will soon be extracted from
> org-mode.git and temporarily live in a org-contrib.git repository.
>
> Files in this org-contrib.git will wait for maintainers to take over
> and maintain the file elsewhere, so you'd be free to maintain it where
> you see fit.
>
> --
>  Bastien
>


Re: official orgmode parser

2020-11-11 Thread Bastien
Hi Daniele,

Daniele Nicolodi  writes:

> Would it make sense to have one "official" (or a set of) org-mode test
> files and the corresponding syntax tree as parsed by org-elements (maybe
> in a format easier to read from other programming languages than
> s-expressions, json maybe?) to make testing other parser against the
> reference implementation easier?

I think it is a very good idea.

The example file would be also good to help users track for small
syntactic changes, when they happen.

Would you like to work on such a file?

-- 
 Bastien



Re: official orgmode parser

2020-11-11 Thread Bastien
Hi Tom,

Tom Gillespie  writes:

>> which Ruby org-mode parser does Github use?
>
> I'm pretty sure that github uses https://github.com/wallyqs/org-ruby.
> It is ... not compliant, shall we say. I have making some fixes to the
> footnote parsing section on my todo list, but I don't expect to get to
> it any time in the near future.

Can you contact GitHub and see what they use?

Whatever they use, I suggest we ask them to support the org library
they use to let their users display Org files.

Maybe the same should be done with gitlab.com, since they also parse
Org files somehow.

-- 
 Bastien



Re: [PATCH] org-manual.org: Remove languages list and update worg link

2020-11-11 Thread Bastien
Hi Kyle,

Kyle Meyer  writes:

> ian martins writes:
>
>> I pushed two days ago, but the manual hasn't updated yet. I guess it
>> doesn't update on git hooks like worg. is there a scheduled process or is
>> there something that must be done?
>
> The online manual corresponds to the latest release and updated with
> each release (as far as I know, though hopefully Bastien or others will
> correct me if I'm wrong).

Yes, that's correct.

-- 
 Bastien



Re: official orgmode parser

2020-11-11 Thread Bastien
Hi Ken,

Ken Mankoff  writes:

> Yes, I meant to write that I think Org syntax is maybe *not*
> context-free, and therefore EBNF can't capture all of it. But it could
> still be very helpful and capture most of it.

Perhaps.  Or you willing to give it a try and report here?

-- 
 Bastien



Re: official orgmode parser

2020-11-11 Thread Bastien
Hi Ken,

Ken Mankoff  writes:

> On 2020-10-26 at 09:24 -07, Nicolas Goaziou  wrote...
>> # This is a comment (1)
>>
>> #+begin_example
>> # This is not a comment (2)
>> #+end_example
>>
>> AFAICT, you cannot distinguish between lines (1) and (2) with EBNF.
>
> I agree. I think this is a better (correct?) example than the
> footnotes on Org Syntax page.

Can you suggest a patch?

-- 
 Bastien



Re: official orgmode parser

2020-11-11 Thread Bastien
Hi Sébastien,

rey-coyrehourcq  writes:

> Some partial org Parsers (AST or regex...) i found on the web for a
> recent state of the art : 

Thanks -- I've updated https://orgmode.org/worg/org-tools/ with this
information. 

Best,

-- 
 Bastien



Re: [UPDATED PATCH] Re: add new link type "contact:" for org-contacts.el

2020-11-11 Thread Bastien
Hi Stardiviner,

stardiviner  writes:

> You're right. Thanks for suggestion.
> I attached new patch now.

Applied, thanks.

Would you like to be org-contacts.el maintainer?

Beware that, since it is in contrib/, it will soon be extracted from
org-mode.git and temporarily live in a org-contrib.git repository.

Files in this org-contrib.git will wait for maintainers to take over
and maintain the file elsewhere, so you'd be free to maintain it where
you see fit.

-- 
 Bastien



Re: [PATCH] add new link type "contact:" for org-contacts.el

2020-11-11 Thread Bastien
Hi Stardiviner,

stardiviner  writes:

> After waited some days, still no reponse, so I popup this email.

I suggest we collectively adopt a convention of waiting at least 
*one month* before bumping up threads.

It might seem long, especially if you initiated the thread with a
patch or a bug report, but given the activity on this list, I think
it's reasonable.

I've documented this suggested policy on Worg, see the section "What
to do if you don't receive an answer" :

  https://orgmode.org/worg/org-mailing-list.html#org3a98a57

Thanks,

-- 
 Bastien



Re: Inconsistency between code and manual: org-lowest-priority or org-priority-lowest

2020-11-11 Thread Bastien
Hi Kyle,

Kyle Meyer  writes:

> Daniele Nicolodi writes:
>
>> On 30/10/2020 05:57, Kyle Meyer wrote:
>
>>> The org-X-priority -> org-priority-X rename happened in v9.4, with
>>> org-X-priority names retained as aliases.  So, it sounds like there are
>>> some leftover bits in the code.
>>
>> You are absolutely right. This is what you get when you read the manual
>> for the latest version but look at the code for an old one...
>
> Quickly grepping, a few instances of the old names remain in the code
> base, if you're still interested in sending a patch.

I fixed the ones I've found in 370cf49cd and ff5fd323b.  Thanks!

-- 
 Bastien



Re: default :results

2020-11-11 Thread Bastien
Hi Ian,

ian martins  writes:

> The doc says functional mode (=:results value=) is the default for
> most Babel libraries [1].  I haven't looked at many, but it is the
> default for ob-python and ob-shell. Scripting mode (=:results output
> =) is the default for ob-C, and the old ob-java (neither of these
> provided a functional mode).
>
> When I added functional mode to ob-java, I made it the default since
> that seemed correct.  But that change breaks anyone that relied on
> the old default (the workaround is to add a =:results output=
> header).  I will change the default in the short term to unbreak the
> experience, but what, if anything, should be done long term?

The default for ob-shell execution was to use the output, not the
value.  Then we had a long discussion, leading to this:

- The default (no :result) is to display the functional value

- For some languages, it may break expectations, so in this case we
  allow a variable that let the default (no :result) use the output
  instead of the functional value.

  This is what is being done for ob-shell.el where we have 
  `org-babel-shell-results-defaults-to-output' set to `t'.

See https://orgmode.org/list/877dt5trjr@bzg.fr/ for the conclusion
of the discussion.

Also see `org-babel-shell-results-defaults-to-output' docstring:

  Let shell execution defaults to ":results output".
  
  When set to t, use ":results output" when no :results setting
  is set.  This is especially useful for inline source blocks.
  
  When set to nil, stick to the convention of using :results value
  as the default setting when no :results is set, the "value" of
  a shell execution being its exit code.
  
> And is this inconsistent behavior across languages something that
> should be fixed? or is it intentional or at least not worth doing
> anything about?

What was suggested is to have a page on Worg listing the behavior of
various packages regarding block execution.

I started a section on https://orgmode.org/worg/library-of-babel.html
with a table -- feel free to add more to this table.

Thanks,

-- 
 Bastien