Re: [PATCH] Add new entity \-- serving as markup separator/escape symbol

2022-07-28 Thread tomas
On Thu, Jul 28, 2022 at 09:17:32PM +0800, Ihor Radchenko wrote:
> Ihor Radchenko  writes:
> 
> > I am attaching a tentative patch that will make Org export remove
> > zero-width spaces when those spaces actually separate the object
> > boundaries.
> >
> > Any objections?
> 
> Given the raised objections, zero-width space does not appear to be a
> useful escape symbol because it has its valid uses as a standalone space
> symbol.
> 
> The raised objections can be solved using some kind of intricate
> heuristics, but I do not feel like it is a good direction to go. The
> code will be too complex and fragile.
> 
> Therefore, I am proposing a different approach for shielding
> fontification: introducing a special entity.
> 
> The new entity is \--, which is a valid boundary between emphasis
> markup. It will be removed during export (replaced by "").

[...]

I like that approach very much. I'm impressed, really.

Cheers
-- 
t


signature.asc
Description: PGP signature


the comment environment does not work for checkboxes

2022-07-28 Thread Uwe Brauer



Hi

Please consider 

#+begin_src 

* Everything [3/4]
  :PROPERTIES:
  :COLUMNS:   %TODO %ITEM  %Nr %Comp1 %Comp2  
  :COOKIE_DATA: aggregate
  :TODO: [ ]
  :COMP1:[1/2]
  :COMP2:[1/2]
  :END:

# *** DONE Books
# :PROPERTIES:
# :Nr:   1
# :Comp1:[X]
# :Comp2:[X]
# :END:

** DONE Car 
   :PROPERTIES:
   :Nr:   2
   :Comp1:[X]
   :Comp2:[ ]
   :END:

** DONE Food 
   :PROPERTIES:
   :Nr:   3
   :COMP1:[ ]
   :COMP2:[X]
   :END:


#  WAIT  Computer
#  :PROPERTIES:
#  :Nr:   4
#  :Comp1:[X]
#  :Comp2:[X]
#  :END:




#+BEGIN: columnview :maxlevel 2 :skip-empty-rows t :hlines 1 :indent nil  
:format "%5TODO(Status) %5Nr(Nr) %5Comp1(Comp1){X/} %5Comp2(Comp2){X/}"
| Status | Nr | Comp1 | Comp2 |
|++---+---|
||| [1/2] | [1/2] |
| DONE   |  2 | [X]   | [ ]   |
| DONE   |  3 | [ ]   | [X]   |
#+END:
#+end_src

Which works as expected 

While 

#+begin_src 

* Everything [3/4]
  :PROPERTIES:
  :COLUMNS:   %TODO %ITEM  %Nr %Comp1 %Comp2  
  :COOKIE_DATA: aggregate
  :TODO: [ ]
  :COMP1:[2/2]
  :COMP2:[1/2]
  :END:

# *** DONE Books
# :PROPERTIES:
# :Nr:   1
# :Comp1:[X]
# :Comp2:[X]
# :END:

** DONE Car 
   :PROPERTIES:
   :Nr:   2
   :Comp1:[X]
   :Comp2:[ ]
   :END:

** DONE Food 
   :PROPERTIES:
   :Nr:   3
   :COMP1:[1/1]
   :COMP2:[1/1]
   :END:

#+BEGIN_COMMENT
 WAIT  Computer
 :PROPERTIES:
 :Nr:   4
 :Comp1:[X]
 :Comp2:[X]
 :END:
#+END_COMMENT



#+BEGIN: columnview :maxlevel 2 :skip-empty-rows t :hlines 1 :indent nil  
:format "%5TODO(Status) %5Nr(Nr) %5Comp1(Comp1){X/} %5Comp2(Comp2){X/}"
| Status | Nr | Comp1 | Comp2 |
|++---+---|
||| [2/2] | [1/2] |
| DONE   |  2 | [X]   | [ ]   |
| DONE   |  3 | [1/1] | [1/1] |
#+END:

#+end_src


Does not. Any idea why?

-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 




[PATCH] ob-tangle.el: fix ‘:comments noweb’ double linking

2022-07-28 Thread Hraban Luyat
* lisp/ob-tangle.el: Refactor the double implementation to a single
helper function. This avoids the double link wrapping.

* testing/lisp/test-ob-tangle.el: Add unit tests.

Babel tangle allows inserting comments at the tangled site which link
back to the source in the org file. This linking was implemented
twice, to handle separate cases, but when using ‘:comments noweb’ it
ended up going through both codepaths. This resulted in doubly wrapped
links.

By refactoring all link generation into a single function, this double
wrapping is avoided.

Example file, /tmp/test.org:

* Inner
#+name: inner
#+begin_src emacs-lisp
2
#+end_src

* Main
#+header: :tangle test.el :comments noweb :noweb yes
#+begin_src emacs-lisp
1
<>
#+end_src

Before:

;; [[file:test.org::*Main][Main:1]]
1
;; file:/tmp/test.org::inner][inner]]][inner]]
2
;; inner ends here
;; Main:1 ends here

After:

;; [[file:test.org::*Main][Main:1]]
1
;; [[file:test.org::inner][inner]]
2
;; inner ends here
;; Main:1 ends here


This is my first org-mode patch, all comments welcome :). I signed a
copyright assignment to the FSF 2021-07-12.

---
 lisp/ob-tangle.el  | 54 
 testing/lisp/test-ob-tangle.el | 56 ++
 2 files changed, 83 insertions(+), 27 deletions(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index fdba72278..078b1c77a 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -469,6 +469,29 @@ code blocks by target file."
 (mapcar (lambda (b) (cons (car b) (nreverse (cdr b
(nreverse blocks
 
+(defun org-babel-tangle--unbracketed-link (params)
+  "Get a raw link to the src block at point, without brackets.
+
+The PARAMS are the 3rd element of the info for the same src block.
+"
+  (let* (;; The created link is transient.  Using ID is not necessary,
+ ;; but could have side-effects if used.  An ID property may
+ ;; be added to existing entries thus creatin unexpected file
+ ;; modifications.
+ (org-id-link-to-org-use-id nil)
+ (l (org-no-properties (org-store-link nil)))
+ (bare (and (string-match org-link-bracket-re l)
+(match-string 1 l
+(when bare
+  (if (and org-babel-tangle-use-relative-file-links
+   (string-match org-link-types-re bare)
+   (string= (match-string 1 bare) "file"))
+  (concat "file:"
+  (file-relative-name (substring bare (match-end 0))
+  (file-name-directory
+   (cdr (assq :tangle params)
+bare
+
 (defun org-babel-tangle-single-block (block-counter  only-this-block)
   "Collect the tangled source for current block.
 Return the list of block attributes needed by
@@ -485,16 +508,7 @@ non-nil, return the full association list to be used by
 (extra (nth 3 info))
  (coderef (nth 6 info))
 (cref-regexp (org-src-coderef-regexp coderef))
-(link (let* (
-  ;; The created link is transient.  Using ID is
-  ;; not necessary, but could have side-effects if
-  ;; used.  An ID property may be added to
-  ;; existing entries thus creatin unexpected file
-  ;; modifications.
-  (org-id-link-to-org-use-id nil)
-  (l (org-no-properties (org-store-link nil
- (and (string-match org-link-bracket-re l)
-  (match-string 1 l
+(link (org-babel-tangle--unbracketed-link params))
 (source-name
  (or (nth 4 info)
  (format "%s:%d"
@@ -548,15 +562,7 @@ non-nil, return the full association list to be used by
(if org-babel-tangle-use-relative-file-links
(file-relative-name file)
  file)
-   (if (and org-babel-tangle-use-relative-file-links
-(string-match org-link-types-re link)
-(string= (match-string 1 link) "file")
- (stringp src-tfile))
-   (concat "file:"
-   (file-relative-name (substring link (match-end 0))
-   (file-name-directory
-src-tfile)))
- link)
+   link
source-name
params
(if org-src-preserve-indentation
@@ -574,18 +580,12 @@ non-nil, return the full association list to be used by
 INFO, when non nil, is the source block information, as returned
 by `org-babel-get-src-block-info'."
   (let ((link-data (pcase (or info (org-babel-get-src-block-info 'light))
-(`(,_ ,_ ,_ ,_ ,name ,start ,_)
+(`(,_ ,_ 

Re: [PATCH] Add new entity \-- serving as markup separator/escape symbol

2022-07-28 Thread Max Nikulin

On 29/07/2022 08:43, Ihor Radchenko wrote:

Max Nikulin writes:


The good point in your patch is that \- is still work as shy hyphen
(that, by the way, may be used in some cases instead of zero width
space: *intra*\-word). On the other hand I have managed to find a case
when your approach is not ideal:

*\--scratch\--*


-scratch


Well. I think that it is impossible to use the same escape construct to
both force emphasis and escape it.


Let's articulate the problem as follows: when some characters ("*". "/". 
etc.) besides used literally are overloaded with 2 additional roles that 
are start emphasis group and terminate emphasis group, in addition to 
lightweight markup heuristics, it is necessary to provide a way to 
disambiguate which of 3 roles is associated with particular character.


"Activate" and "deactivate" characters or entities for emphasis markers 
are alternative and perhaps not so clear terms have used before.


The advantage of zero width space is that "[:space:]" is part of 
PREMATCH and POSTMATCH (outer) regexps in 
`org-emphasis-regexp-components' and "[:space:]" is forbidden at the 
inner borders of emphasized span of text. The latter is mostly 
meaningful, however I am unsure if bold space has the same width as 
regular one, and space in fixed width font is certainly distinct.


The problem with the "\--" entity is that it is not handled properly at 
the start of emphasis region. It neither disables emphasis nor parsed as 
complete entity, instead it becomes combination of "\-" shy hyphen and 
literal "-".


Unsure if it can be solved consistently. Possible ways:
- It addition to space-like (in respect to current regexp) entity add 
another one that acts as a part of word, but like "\--" stripped from 
output. Likely it should be accompanied by more changes in the parser 
and regexps.
- Provide some new explicit syntax for literal character, start of 
emphasis group, end of emphasis group.


Concerning zero width space workaround, I may be wrong, but Nicolas 
might consider using U+200B zero width space as the escape character for 
itself: single one is filtered out during export, double zero width 
space becomes single character. (I do not like this kind of "white 
space" programming language".) Another question is whether U+2060 word 
joiner (or some other character) should be added either as alternative 
to zero width space or to allow =verbatim= fixed width text 
surrounded by fixed width spaces.





Re: [PATCH v7] ol.el: add description format parameter to org-link-parameters

2022-07-28 Thread Ihor Radchenko
Hugo Heagren  writes:

> On 18/07/2022 17:55, Max Nikulin wrote:
>
>> I am sorry if I am wrong, but I do not see you among known Org, 
>> contributors. You patch is likely greater than it is allowed for
>> TINYCHANGE, so before you patch can be committed, copyright assignment
>> should be signed, see
>>  for details.
>
> I've already assigned copyright to the FSF for work on Emacs (see
> attached certificate). Do I need to do anything else for org-mode in
> particular?

Bastien, can you please confirm that Hugo is listed in the FSF records
and then add him to the contributors.org?

Best,
Ihor



Re: [PATCH] Add new entity \-- serving as markup separator/escape symbol

2022-07-28 Thread Ihor Radchenko
Max Nikulin  writes:

> The good point in your patch is that \- is still work as shy hyphen 
> (that, by the way, may be used in some cases instead of zero width 
> space: *intra*\-word). On the other hand I have managed to find a case 
> when your approach is not ideal:
>
> *\--scratch\--*
>
> 
> -scratch

Well. I think that it is impossible to use the same escape construct to
both force emphasis and escape it.

However, we can do

 *scratch\--{}*

which is a bit hacky, but it is the best thing I can think of without
introducing two separate entities: one for forcing the markup and one
for escaping the markup.

In general, the proposed \-- entity is only meaningful _before_ markup
characters. When it is placed after markup character, it does literally
nothing.

Best,
Ihor



Re: [PATCH] oc-csl: Add support for sub-bibliographies

2022-07-28 Thread Ihor Radchenko
András Simonyi  writes:

> I've attached a new version of the patch with
> - "Bibliography printing" as the subsection title,
> - an added "the" in the subsubsection title "Bibliography options in
> the "biblatex" and "csl" export processors",
> - an improved example.

Thanks! LGTM in general.

>> Though I am wondering why csl does not support :title. It feels like a
>> natural thing to have.
>
> The biblatex "title" option is for changing the title of the
> bibliography section which is created and printed out by biblatex by
> default.
> In contrast to the LaTeX-based export processors, the "csl"  and  the
> "basic" export processors print out only the list of entries, and it's
> up to the user to manually include a bibliography section heading in
> the document if they want one, so the "title" option is not really
> applicable, at least not in the same way.

This is an important point. I think that we should describe this gotcha
in the "Bibliography printing". oc-basic and oc-csl just print the list
of bibliography entries, while oc-bibtex/oc-natbib/oc-biblatex insert a
separate section. It is a very important information and users should be
aware of it. Also, this is kind of annoying - this way mixing oc-bibtex
and oc-basic for LaTeX and non-LaTeX export gets awkward.

Best,
Ihor



Re: Something has happened such that I can't export to latex

2022-07-28 Thread Ihor Radchenko
Sharon Kimble  writes:

> But, I'm unable to 'make autoloads' in the git version because its
> trying to connect to /usr/share/emacs and looking for something
> there which isn't there and just ends up deleting org-loaddefs, and the 
> only way that
> I can get round it is by restoring git/org-mode from backup. 
>
> Can you advise please as to how I can surmount that obstacle?

I am not sure. make autoloads should have nothing to do with
/usr/share/emacs

What exactly happens when you run make autoloads?

Best,
Ihor



Re: [PATCH] Add new entity \-- serving as markup separator/escape symbol

2022-07-28 Thread Juan Manuel Macías
Hi, Ihor,

Ihor Radchenko writes:

> Given the raised objections, zero-width space does not appear to be a
> useful escape symbol because it has its valid uses as a standalone space
> symbol.
>
> The raised objections can be solved using some kind of intricate
> heuristics, but I do not feel like it is a good direction to go. The
> code will be too complex and fragile.
>
> Therefore, I am proposing a different approach for shielding
> fontification: introducing a special entity.
>
> The new entity is \--, which is a valid boundary between emphasis
> markup. It will be removed during export (replaced by "").
>
> "\--" specifically is somewhat arbitrary choice. The actual requirements
> for the entity name are: (1) No clash with LaTeX (which is why simpler
> \- would not cut it); (2) Being a valid markup boundary: entity must end
> with (any space ?- ?\( ?' ?\" ?\{).
>
> I am attaching a tentative patch introducing the new entity. Note that
> some minor tweaks to the parser were needed. I do not see it as a big
> deal - the current entity regexp has much more cumbersome exceptions.
>
> Also, the patch will not work correctly on org → org export, similar to
> pointed in one of the replies to the previous abandoned approach. I do
> not want to address it here because a much more appropriate solution for
> this issue is changing org-element-interpret-data.
>
> Consider (org-element-interpret-data '("asd" (bold () "bold") "bsd"))
> This will return "asd*bold*bsd", which is not correct even though the
> given Org datum is not wrong by itself - such things can easily appear
> when user filters are applied to parse tree during org→org export.
>
> Otherwise, the patch should be good enough to play around and kick-start
> the discussion.

I'm late joining this thread, although I am particularly interested in
the topic.

I can't make any technical comments because I haven't had time to test
the patch yet, but I have to say that your idea of using a special
entity seems to me the best approach to the problem. I would vote for
this to be the way to go.

I believe that using the zero width space character as an escape
character is not a happy idea, and I have already left my arguments in
some other thread, long ago. The zero width space is a random
workaround, but should not (in my opinion) be part of the markup. For
various reasons: it is not an ascii character, there are certain
contexts in which it can produce an unexpected result in LaTeX, etc. In
addition, the zero width space, as an escape character, has a curious
anomaly: it is an escape character that does not have a plan B and a way
to escape the escape character when you want to use it by itself.

I also like the idea of using a special entity because it is not
necessary to invent anything new and it takes advantage of an existing
resource.

Well, that's my opinion.

Best regards,

Juan Manuel



Re: Org links and Flatpak firefox

2022-07-28 Thread Ken Mankoff
Hi Max,

Sorry for the delayed reply.

On 2022-07-05 at 08:16 -07, Max Nikulin  wrote:
> On 03/07/2022 20:25, Ken Mankoff wrote:
>> I had "browse-url-generic-program" set to a script that used xdotool
>> to find if there was a firefox on this desktop, and then sent the URL
>> there. xdotool doesn't play nice withe flatpak, and that was the
>> problem.
>
> I am not an X11 expert but it sounds strange. The protocol is designed
> to work across network, so it should not matter whether some
> application is running from flatpak. May it happen that after upgrade
> Wayland session is used instead of X11? Though in such case I would
> expect that xdotool should be rather broken due to stricter security
> model.

As you suggested, the problem was not xdotool or X11. It was simply that 
instead of calling

firefox "${1}" &

to open the URL, I needed to call

flatpak run org.mozilla.firefox "${1}" &

> Out of curiosity, what is the reason why you are avoiding firefox as a
> snap package?

I'm not 100 % sure why but I don't like snap. Maybe because it pollutes the 
home folder. I read up on snap vs flatpak vs AppImage and flatpak seemed to get 
the best reviews, so I've gone with that one.

  -k.



Re: [PATCH] Add new entity \-- serving as markup separator/escape symbol

2022-07-28 Thread Tim Cross


Ihor Radchenko  writes:

> Ihor Radchenko  writes:
>
>> I am attaching a tentative patch that will make Org export remove
>> zero-width spaces when those spaces actually separate the object
>> boundaries.
>>
>> Any objections?
>
> Given the raised objections, zero-width space does not appear to be a
> useful escape symbol because it has its valid uses as a standalone space
> symbol.
>
> The raised objections can be solved using some kind of intricate
> heuristics, but I do not feel like it is a good direction to go. The
> code will be too complex and fragile.
>

Ihor, thanks for articulating this as it was something I was becoming
increasingly concerned about. 

> Therefore, I am proposing a different approach for shielding
> fontification: introducing a special entity.
>
> The new entity is \--, which is a valid boundary between emphasis
> markup. It will be removed during export (replaced by "").
>
> "\--" specifically is somewhat arbitrary choice. The actual requirements
> for the entity name are: (1) No clash with LaTeX (which is why simpler
> \- would not cut it); (2) Being a valid markup boundary: entity must end
> with (any space ?- ?\( ?' ?\" ?\{).
>
> I am attaching a tentative patch introducing the new entity. Note that
> some minor tweaks to the parser were needed. I do not see it as a big
> deal - the current entity regexp has much more cumbersome exceptions.
>
> Also, the patch will not work correctly on org → org export, similar to
> pointed in one of the replies to the previous abandoned approach. I do
> not want to address it here because a much more appropriate solution for
> this issue is changing org-element-interpret-data.
>
> Consider (org-element-interpret-data '("asd" (bold () "bold") "bsd"))
> This will return "asd*bold*bsd", which is not correct even though the
> given Org datum is not wrong by itself - such things can easily appear
> when user filters are applied to parse tree during org→org export.
>
> Otherwise, the patch should be good enough to play around and kick-start
> the discussion.
>
> WDYT?
>

I think this is definitely preferred over the zero width space as it is
clearer and 'intentional'. While I'm still 'on the fence' regarding the
tension between the need for this new functionality and the additional
complexity it introduces, this approach seems potentially cleaner and
more manageable.

Given the important work you are doing to integrate parsing of elements
and fontification, I feel you are in the best position to judge whether
this addition can be justified wrt complexity vs functionality and am
confident your on the right track here.



Re: [PATCH] oc-csl: Add support for sub-bibliographies

2022-07-28 Thread András Simonyi
Dear All,

On Tue, 26 Jul 2022 at 07:37, Ihor Radchenko  wrote:
> I am also a non-native speaker, so lets obey the Bruce's judgment.
...
> > yes :title is not supported by the "csl" processor. Should we perhaps
> > replace the example with another one using a multi-word keyword, like

I've attached a new version of the patch with
- "Bibliography printing" as the subsection title,
- an added "the" in the subsubsection title "Bibliography options in
the "biblatex" and "csl" export processors",
- an improved example.

> Though I am wondering why csl does not support :title. It feels like a
> natural thing to have.

The biblatex "title" option is for changing the title of the
bibliography section which is created and printed out by biblatex by
default.
In contrast to the LaTeX-based export processors, the "csl"  and  the
"basic" export processors print out only the list of entries, and it's
up to the user to manually include a bibliography section heading in
the document if they want one, so the "title" option is not really
applicable, at least not in the same way.

best wishes,
András
From 89af0b909b8d16486a488470c5f9dd2d185379b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A1s=20Simonyi?= 
Date: Thu, 28 Jul 2022 22:50:26 +0200
Subject: [PATCH] * doc/org-manual.org: Document "PRINT_BIBLIOGRAPHY" options

---
 doc/org-manual.org | 58 +-
 1 file changed, 57 insertions(+), 1 deletion(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 596ab3723..c740750a2 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -16818,11 +16818,67 @@ conformant to the Harvard style and the specification of the
 Wolkers-Kluwer publisher; since it relies on the ~bibtex~ processor of
 your LaTeX installation, it won't export to anything but PDF.
 
+** Bibliography printing
+
 The =PRINT_BIBLIOGRAPHY= keyword specifies where the bibliography
-should print.
+should be printed (note the colon):
 
 : #+print_bibliography:
 
+A document may contain more than one =PRINT_BIBLIOGRAPHY= keywords.
+Each of the keywords will trigger printing the bibliography.
+
+The keywords can be used with or without additional options.  Options
+can be used, for example, to print only entries that belong to a
+certain category or to control formatting.  The set of supported
+=PRINT_BIBLIOGRAPHY= options and their interpretation varies between
+the different citation export processors.  Some export processors do
+not support passing options.
+
+*** Bibliography options in the "biblatex" and "csl" export processors
+
+The "biblatex" and "csl" export processors support bibliography
+options through a property list attached to the =PRINT_BIBLIOGRAPHY=
+keyword.  For example,
+
+: #print_bibliography: :keyword algebra :type book
+
+Values including spaces must be surrounded with double quotes.  If you
+need to use a key multiple times, you can separate its values with
+commas, but without any space in-between:
+
+: #print_bibliography: :keyword "algebraic logic" :nottype article,book
+
+The "biblatex" export processor accepts all options supported by
+BibLaTeX's ~\printbibliography~ command, while the "csl" processor
+accepts the following ones:
+
+- =:keyword = :: Print only entries whose
+  keyword field contains all given keywords.
+
+- =:notkeyword = :: Print only entries whose
+  keyword field does not contain any of the given keywords.
+
+- =:type = :: Print only entries whose type is
+  ==.  Entry type is the BibTeX/BibLaTeX entry type if this
+  information is available (the entry was read from a BibTeX/BibLaTeX
+  bibliography) and the CSL entry type otherwise.
+
+- =:nottype = :: Print only entries whose
+  type is not among the given entry types.  Entry type is determined
+  as in the case of =:type=.
+
+- =:csltype = :: Print only entries whose CSL entry type
+  (possibly based on a conversion from BibTeX/BibLaTeX to CSL) is
+  ==.
+
+- =:notcsltype = :: Print only entries whose
+  CSL entry type (possibly based on a conversion from BibTeX/BibLaTeX
+  to CSL) is not among the listed entry types.
+
+- =:filter = :: Print only entries for which the given
+  Emacs Lisp predicate returns a non-~nil~ value.
+
 * Working with Source Code
 :PROPERTIES:
 :DESCRIPTION: Export, evaluate, and tangle code blocks.
-- 
2.25.1



Re: [PATCH] Add new entity \-- serving as markup separator/escape symbol

2022-07-28 Thread Max Nikulin

On 28/07/2022 20:17, Ihor Radchenko wrote:


Therefore, I am proposing a different approach for shielding
fontification: introducing a special entity.

The new entity is \--, which is a valid boundary between emphasis
markup. It will be removed during export (replaced by "").


I like your idea more than my similar attempt:
Max Nikulin to emacs-orgmode. [PATCH] Intra-word markup: \relax. Fri, 28 
Jan 2022 19:12:51 +0700.

https://list.orgmode.org/st0mk5$fnv$1...@ciao.gmane.io

The good point in your patch is that \- is still work as shy hyphen 
(that, by the way, may be used in some cases instead of zero width 
space: *intra*\-word). On the other hand I have managed to find a case 
when your approach is not ideal:


*\--scratch\--*


-scratch

"\--" are added with hope to suppress bold text and keep asterisks.

I expected possible problem at the border of "-" and "$", but 
fortunately the following works well


/pre/\--$n$\--*th*




[PATCH v2] org-test: Run all ol tests on make test

2022-07-28 Thread Max Nikulin

On 28/07/2022 21:31, Ihor Radchenko wrote:

Max Nikulin writes:


On 27/07/2022 10:49, Ihor Radchenko wrote:


You missed the

(org-test-selector
 (if org-test-selector org-test-selector "\\(org\\|ob\\)"))


I have notices that cases in test-oc.el are named test-org-cite/... So I
am considering renaming tests in test-ol.el in the same way from
test-ol/... to test-org-link/... instead of modifying selectors. I have
not noticed with approach to naming is recommended.


Either way is fine. Ideally, we should stick to org- prefix, as expected
from Elisp conventions. But we are already kind of breaking this
convention by having all the oc- ol-, etc files.


I have decided that I prefer to have org-test common prefix even though 
it causes discrepancy test-ol.el file vs. test-org-link/... cases.
From 725369323a1a3303820c2c92b116e8238b895bac Mon Sep 17 00:00:00 2001
From: Max Nikulin 
Date: Thu, 28 Jul 2022 22:08:57 +0700
Subject: [PATCH] test-ol: Rename cases to match the default selector

* testing/lisp/test-ol.el (test-ol/encode): Rename to
`test-org-link/encode'.
(test-ol/decode): Rename to `test-org-link/decode'.
(test-ol/encode-url-with-escaped-char): Rename to
`test-org-link/encode-url-with-escaped-char'.
(test-ol/org-toggle-link-display): Rename to
`test-org-link/toggle-link-display').
(test-ol/escape): Rename to `test-org-link/escape'.
(test-ol/unescape): Rename to `test-org-link/unescape'.
(test-ol/make-string): Rename to `test-org-link/make-string'.
(test-ol/store-link): Rename to `test-org-link/store-link'.
(test-ol/update-radio-target-regexp): Rename to
`test-org-link/update-radio-target-regexp'.
(test-ol/next-link): Rename to `test-org-link/next-link'.
(test-ol/previous-link): Rename to `test-org-link/previous-link'.
(test-ol/plain-link-re): Rename to `test-org-link/plain-link-re'.

Only `test-ol/org-toggle-link-display' was executed during
"make test" since it is the only name matched by the "org|ob" default
selector.  Reported in: Ihor Radchenko to emacs-orgmode.
Re [PATCH v7] ol.el: add description format parameter
to org-link-parameters.  Sun, 24 Jul 2022 21:15:31 +0800.
https://list.orgmode.org/87v8rmd53g.fsf@localhost/
---
 testing/lisp/test-ol.el | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el
index 429bb52ee..76881885d 100644
--- a/testing/lisp/test-ol.el
+++ b/testing/lisp/test-ol.el
@@ -22,7 +22,7 @@
 
 ;;; Decode and Encode Links
 
-(ert-deftest test-ol/encode ()
+(ert-deftest test-org-link/encode ()
   "Test `org-link-encode' specifications."
   ;; Regural test.
   (should (string= "Foo%3A%42ar" (org-link-encode "Foo:Bar" '(?\: ?\B
@@ -33,7 +33,7 @@
   ;; Encode a Unicode multibyte character.
   (should (string= "%E2%82%AC" (org-link-encode "€" '(?\€)
 
-(ert-deftest test-ol/decode ()
+(ert-deftest test-org-link/decode ()
   "Test `org-link-decode' specifications."
   ;; Decode an ASCII character.
   (should (string= "[" (org-link-decode "%5B")))
@@ -42,7 +42,7 @@
   ;; Decode a Unicode multibyte character.
   (should (string= "€" (org-link-decode "%E2%82%AC"
 
-(ert-deftest test-ol/encode-url-with-escaped-char ()
+(ert-deftest test-org-link/encode-url-with-escaped-char ()
   "Encode and decode a URL that includes an encoded char."
   (should
(string= "http://some.host.com/form?=blah%2Bblah25;
@@ -50,7 +50,7 @@
 	 (org-link-encode "http://some.host.com/form?=blah%2Bblah25;
 			  '(?\s ?\[ ?\] ?%))
 
-(ert-deftest test-ol/org-toggle-link-display ()
+(ert-deftest test-org-link/toggle-link-display ()
   "Make sure that `org-toggle-link-display' is working.
 See https://github.com/yantar92/org/issues/4.;
   (dolist (org-link-descriptive '(nil t))
@@ -77,7 +77,7 @@ See https://github.com/yantar92/org/issues/4.;
 
 ;;; Escape and Unescape Links
 
-(ert-deftest test-ol/escape ()
+(ert-deftest test-org-link/escape ()
   "Test `org-link-escape' specifications."
   ;; No-op when there is no backslash or square bracket.
   (should (string= "foo" (org-link-escape "foo")))
@@ -101,7 +101,7 @@ See https://github.com/yantar92/org/issues/4.;
   (should (string= "\\[\\[\\[foo\\]\\]\\]" (org-link-escape "[[[foo]]]")))
   (should (string= "\\[\\[foo\\]\\] bar" (org-link-escape "[[foo]] bar"
 
-(ert-deftest test-ol/unescape ()
+(ert-deftest test-org-link/unescape ()
   "Test `org-link-unescape' specifications."
   ;; No-op if there is no backslash.
   (should (string= "foo" (org-link-unescape "foo")))
@@ -122,7 +122,7 @@ See https://github.com/yantar92/org/issues/4.;
   (should (string= "[[[foo]]]" (org-link-unescape "\\[\\[\\[foo\\]\\]\\]")))
   (should (string= "[[foo]] bar" (org-link-unescape "\\[\\[foo\\]\\] bar"
 
-(ert-deftest test-ol/make-string ()
+(ert-deftest test-org-link/make-string ()
   "Test `org-link-make-string' specifications."
   ;; Throw an error on empty URI.
   (should-error (org-link-make-string ""))
@@ -147,7 +147,7 @@ See 

Re: [BUG] org-mode 9.5.4 with evil-leader leads to endless loop in table [9.5.4 (9.5.4-g6013cb1 @ /Users/cgrabenstein/.emacs.d/straight/build/org/)]

2022-07-28 Thread Ihor Radchenko
Christoph Grabenstein  writes:

> org-table-insert-row hangs if evil-leader is installed.
>
> Steps to reproduce:
>
> 1. Install org-mode 9.5.4, evil and evil-leader, and enable evil-mode
> and global-evil-leader-mode.
> 2. Open or create an org file that has a table like that:
> ```
> | header | another header |
> ```
> 3. Place your cursor in the header and hit enter (in evil insert mode).
> 4. Emacs hangs in an endless loop, you will have to interrupt with C-g.

Thanks for reporting!

> - I'm not sure if this is an error on org's side or on evil's side. Please
> let me know if I should open a ticket for evil.
> - For more details see my question at the emacs stackexchange:
> https://emacs.stackexchange.com/questions/72769/org-mode-tables-slowed-down-by-evil-mode

Thanks for the link. Extra information from the link allowed me to
narrow down the cause. The cause is in evil-mode.

evil-local-mode is run in temporary buffer, which is OK. What is not OK
is that evil-local-mode is altering the match data. It must not happen.
Please report this issue to evil devs.

Best,
Ihor



Re: [PATCH] org-test: Run all ol tests on make test

2022-07-28 Thread Ihor Radchenko
Max Nikulin  writes:

> On 27/07/2022 10:49, Ihor Radchenko wrote:
>> 
>> You missed the
>> 
>>  (org-test-selector
>>   (if org-test-selector org-test-selector "\\(org\\|ob\\)"))
>
> I have notices that cases in test-oc.el are named test-org-cite/... So I 
> am considering renaming tests in test-ol.el in the same way from 
> test-ol/... to test-org-link/... instead of modifying selectors. I have 
> not noticed with approach to naming is recommended.

Either way is fine. Ideally, we should stick to org- prefix, as expected
from Elisp conventions. But we are already kind of breaking this
convention by having all the oc- ol-, etc files.

Best,
Ihor



Re: The fate of ob-asymptote.el

2022-07-28 Thread Ihor Radchenko
Jarmo Hurri  writes:

> Ihor Radchenko  writes:
>
>> Jarmo Hurri  writes:
>>> As a result, changes in Org are much more likely to affect
>>> ob-asymptote.el than changes in Asymptote. I think basic software
>>> development rules of thumb suggest that ob-asymptote.el should then
>>> be bundled with Org.
>>
>> From my point of view ob-asymptote.el is as bare bones as babel
>> library can be. It does not use any fancy Org babel features like
>> sessions, error display of converting the output to various :results
>> output options.
>>
>> In contrast, it does a lot of work trying to convert Elisp types to
>> Asymptote in `org-babel-asymptote-var-to-asymptote`.
>
> Fair point. Then again, the involved datatypes of Asymptote are,
> practically, immutable.
>
> I can not resist pointing out that we are having this discussion because
> of changes in Org, not because of changes in Asymptote. I consider Org
> much more volatile than Asymptote.

Well. You convinced me. If Asymptote has very stable syntax and major
features, it probably makes more sense to maintain it within Org or
within Org community.

> But I might be digressing. A bit of a summary:
>
> - I embrace a (any) maintained feature which extends the applicability
>   of Org without compromising "the core." I have had great moments
>   noticing that Org already supports something new I need.

I agree that it is nice, but we cannot, unfortunately support all the
programming languages out there. As long a some specific language has a
maintainer, things are fine, but in long term it is only reliable to
support popular ones + possibly GNU projects (as Org is a part of GNU, and it 
is kind of obligation).

> - Asymptote is brilliant. :-) I hope I can provide connectivity to Org
>   for current and future users. When I shrivel away, this support might
>   get buried next to me.
>
> - Org contrib basically advertises itself as unmaintained. While that
>   may change, and there is in fact a request to help maintain the
>   add-ons on the github page, I am pessimistic. I would not install it,
>   so I doubt others would either.

> - I see Org as the logical place for ob-asymptote.el. If this is
>   rejected, I may try inclusion into Asymptote if it is not an uphill
>   battle.

Because it is unmaintained. Beside that note, we also ask potential
maintainers to go ahead to adopt the unmaintained pieces. Those pieces
can then move to ELPA/non-GNU ELPA and be maintained properly.

>> From my point of view, any kind of new functionality in
>> ob-asymptote.el requires a deep knowledge about the Asymptote
>> programming - the knowledge most of the Org devs lack. At the same
>> time, changes in Org babel core functionality are unlikely to cause
>> any issues in ob-asymptote - we try our best to keep backwards
>> compatibility with third-party babel packages anyway.
>
> Does this suggest that, from the point of view of Org, the risk of
> supporting ob-asymptote.el is minimal?

Not necessarily. I just expressed doubts about long-term
maintainability. As long as there is a person maintaining ob-asymptote,
things should be fine. Especially if there is a good test coverage and
WORG documentation.

Best,
Ihor



Re: [PATCH] lisp/ob-plantuml.el: Insert results in buffer

2022-07-28 Thread Ihor Radchenko
Joseph Turner  writes:

> Ihor Radchenko  writes:
>> You can examine :result-params property inside params plist. If that
>> property does not explicitly mention different results Type (see 16.6
>> Results of Evaluation), ob-plantuml may set the type to "file" with
>> plist-put.
>
> Perhaps I'm confused, but I think org-babel-default-header-args:plantuml
> is actually an alist, right?

Yes, you are right indeed.

> I tried removing the (:results . "file") from
> org-babel-default-header-args:plantuml, and then overwriting the params
> argument inside the let* block like so:
>
> ```
>   (let* ((do-export (cdr (assq :file params)))
>  (params (if do-export
>  (add-to-list 'params '(:results . "file")))
>  (out-file ...
> ```
>
> Logging the params variable after the let* block reveals that :results
> is set to "file", but I still get "Code block produced no output" when
> I try to evaluate the plantuml org src block.
>
> Thoughts?

You also need to change :result-params and :result-type.
See `org-babel-execute-src-block'.

Best,
Ihor



Re: [BUG] inserting notes at end

2022-07-28 Thread Ihor Radchenko
Tor Kringeland  writes:

> Ihor Radchenko  writes:
>
>> I get note after empty lines below the headline in both the cases.
>> This behavior is intentional according to org-log-beginning.
>
> I see.  Maybe this could be noted in the docstring for org-add-note?  If
> org-log-into-drawer is non-nil, then the behavior is different (the
> drawer is always placed at the first newline below the heading).

The reason why empty lines are skipped when inserting the first note in
a headline is purely technical. It may or may not be changed in future.
The behaviour is essentially undefined - there is not much point
"freezing" the current behaviour in the docstring.

IMHO, there is not much point changing the current behaviour to not
skipping empty lines. I personally prefer to keep empty lines after the
headline and before notes. So, opinions can differ.

A proper implementation that would satisfy all users should do something
similar to :empty-lines in org-capture-templates, but it will be a fair
bit of work with no clear interest from Org users. Of course, if anyone
thinks that such feature is going to be useful, please chime in and reply
to this email.

Best,
Ihor



Re: Something has happened such that I can't export to latex

2022-07-28 Thread Sharon Kimble
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Ihor Radchenko  writes:

> Sharon Kimble  writes:
>
>> After several rebuilds of emacs I'm now getting this line showing for
>> org-version -
>>
>> Org mode version 9.5.4 (release_9.5.4-17-g6e991f @ mixed installation!
>> /home/boudiccas/git/emacs/lisp/org/ and
>> /home/boudiccas/git/org-mode/lisp/)
>>
>> I want to stay with the git version of org-mode if possible, so how do I
>> stop the emacs org from operating please? 
>
> Try
>
> #+BEGIN_SRC emacs-lisp :tangle "~/.emacs.d/init.el" :exports code :results 
> silent
> ;;; init.el --- sharon's config -*- eval: (read-only-mode 1) -*-
> (require 'package)
> (setq package-enable-at-startup nil)
>
> ;; Make sure that Git version of Org mode is being loaded instead of the
> ;; built-in version.
> (add-to-list 'load-path (expand-file-name 
> "/home/boudiccas/git/org-mode/lisp"))
> (add-to-list 'load-path (expand-file-name 
> "/home/boudiccas/git/org-contrib/lisp"))
>
> (package-initialize)
>
> (require 'ob-tangle)
> (org-babel-load-file "~/.emacs.d/config22.org")
> #+END_SRC
>
> Hope it helps.
>

Thanks Ihor, its working well.

But, I'm unable to 'make autoloads' in the git version because its
trying to connect to /usr/share/emacs and looking for something
there which isn't there and just ends up deleting org-loaddefs, and the 
only way that
I can get round it is by restoring git/org-mode from backup. 

Can you advise please as to how I can surmount that obstacle?

Thanks
Sharon.
- -- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk
Debian 11, fluxbox 1.3.7, emacs 29.0.50, org 9.5.4
-BEGIN PGP SIGNATURE-

iQJRBAEBCgA7FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAmLij0wdHGJvdWRpY2Nh
c0Bza2ltYmxlMDkucGx1cy5jb20ACgkQNoGAGQr4g1us7w/5AQntDTO/GQ0+VUH1
KQc/s5MHt7lq7FvIUpNpP9PyPPe19FHEeUJJgS+HV+MegcvEKQ6m5lhnSv1puy7Z
9iiT5RW4K/hf4fhbL8CDcDFxgJZNqJoIyOX/8VibEbLRw7DDrr4LypvjoYGhBM+k
ClQgTj8yOyrdzGwF7f0xkjrdYMEwaaxV41mmFI55VcUVIiT3S4GTea3bQGMNIE5h
LgX3WIPQqZnl72l4qW3xw0CmG+apkzLplLiXyXSaRweJI+uUba3qWZ1ADW7SJg97
/Xg/844VutYNTi/4xUgif6jShG2tEmfzNTqgjA677Gna/T33opdKT8uwxORmsIG+
SSQzLf3wsMVPHyxzeqOV8QzhGfhwIrhFTr03L6FXveLWlqEV1GOp40np8Lk3kSjX
NobJuglT1uf9qFg7OOpsu/Yh2qke5umTdMAoMEsUxzUNX24gfu18PrfC2ai9mpfe
VS6pJK2vW9PvNPm5drTX33uBJZ3ixS8sed0voxK4f5olwEYgxXSfi6CZzcno95SC
y4Bv/1v7kDP475B4ZmXrVer+41Pd07lS6Akq4r8DpXiw0maN37B1b/3YZfcJ7rZB
TLXFlNboBYhIPrb/s7URQNVtntcLbxDwZyjaef0YlyyjZ0TJjKpsoxK7NT/kmV4C
P3n5NKlwRAu52/dcri46mf8ih64=
=N9BT
-END PGP SIGNATURE-



[PATCH] Add new entity \-- serving as markup separator/escape symbol

2022-07-28 Thread Ihor Radchenko
Ihor Radchenko  writes:

> I am attaching a tentative patch that will make Org export remove
> zero-width spaces when those spaces actually separate the object
> boundaries.
>
> Any objections?

Given the raised objections, zero-width space does not appear to be a
useful escape symbol because it has its valid uses as a standalone space
symbol.

The raised objections can be solved using some kind of intricate
heuristics, but I do not feel like it is a good direction to go. The
code will be too complex and fragile.

Therefore, I am proposing a different approach for shielding
fontification: introducing a special entity.

The new entity is \--, which is a valid boundary between emphasis
markup. It will be removed during export (replaced by "").

"\--" specifically is somewhat arbitrary choice. The actual requirements
for the entity name are: (1) No clash with LaTeX (which is why simpler
\- would not cut it); (2) Being a valid markup boundary: entity must end
with (any space ?- ?\( ?' ?\" ?\{).

I am attaching a tentative patch introducing the new entity. Note that
some minor tweaks to the parser were needed. I do not see it as a big
deal - the current entity regexp has much more cumbersome exceptions.

Also, the patch will not work correctly on org → org export, similar to
pointed in one of the replies to the previous abandoned approach. I do
not want to address it here because a much more appropriate solution for
this issue is changing org-element-interpret-data.

Consider (org-element-interpret-data '("asd" (bold () "bold") "bsd"))
This will return "asd*bold*bsd", which is not correct even though the
given Org datum is not wrong by itself - such things can easily appear
when user filters are applied to parse tree during org→org export.

Otherwise, the patch should be good enough to play around and kick-start
the discussion.

WDYT?

Best,
Ihor

>From 521a4b06578cf37f22e9f33d2f45b967419ad3a3 Mon Sep 17 00:00:00 2001
Message-Id: <521a4b06578cf37f22e9f33d2f45b967419ad3a3.1659013441.git.yanta...@gmail.com>
From: Ihor Radchenko 
Date: Thu, 28 Jul 2022 21:02:26 +0800
Subject: [PATCH] Add new entity \-- serving as markup separator/escape symbol

* lisp/org-entities.el (org-entities): Add \-- entity.  This entity is
exported as an empty string and simply serves as markup separator if
the user needs any.
* lisp/org.el (org-fontify-entities):
* lisp/org-element.el (org-element-entity-parser):
(org-element--set-regexps): Update entity regexp to match "-".
---
 lisp/org-element.el  | 4 ++--
 lisp/org-entities.el | 4 
 lisp/org.el  | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 9e9b7c5ec..6405b4db8 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -258,7 +258,7 @@ (defun org-element--set-regexps ()
 		  "\\$"
 		  ;; Objects starting with "\": line break,
 		  ;; entity, latex fragment.
-		  "\\(?:[a-zA-Z[(]\\|[ \t]*$\\|_ +\\)"
+		  "\\(?:[-a-zA-Z[(]\\|[ \t]*$\\|_ +\\)"
 		  ;; Objects starting with raw text: inline Babel
 		  ;; source block, inline Babel call.
 		  "\\(?:call\\|src\\)_"))
@@ -3158,7 +3158,7 @@ (defun org-element-entity-parser ()
 
 Assume point is at the beginning of the entity."
   (catch 'no-object
-(when (looking-at "\\(?:\\(?1:_ +\\)\\|\\(?1:there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z]+\\)\\(?2:$\\|{}\\|[^[:alpha:]]\\)\\)")
+(when (looking-at "\\(?:\\(?1:_ +\\)\\|\\(?1:there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z-]+\\)\\(?2:$\\|{}\\|[^[:alpha:]]\\)\\)")
   (save-excursion
 	(let* ((value (or (org-entity-get (match-string 1))
 			  (throw 'no-object nil)))
diff --git a/lisp/org-entities.el b/lisp/org-entities.el
index d35e3fa8a..9d79d23fc 100644
--- a/lisp/org-entities.el
+++ b/lisp/org-entities.el
@@ -264,6 +264,10 @@ (defconst org-entities
  ("rsaquo" "\\guilsinglright{}" nil "" ">" ">" "›")
 
  "* Other"
+ 
+ "** Escaping Org markup"
+ ("--" "" nil "" "" "" "")
+ 
  "** Misc. (often used)"
  ("circ" "\\^{}" nil "" "^" "^" "∘")
  ("vert" "\\vert{}" t "" "|" "|" "|")
diff --git a/lisp/org.el b/lisp/org.el
index 937892ef3..29ccff83b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5828,7 +5828,7 @@ (defun org-fontify-entities (limit)
 	;; i.e., "\_ ", could be fontified anyway, and it would be
 	;; confusing when adding a second white space character.
 	(while (re-search-forward
-		"\\(there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]\n]\\)"
+		"\\(there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z-]+\\)\\($\\|{}\\|[^[:alpha:]\n]\\)"
 		limit t)
 	  (when (and (not (org-at-comment-p))
 		 (setq ee (org-entity-get (match-string 1)))
-- 
2.35.1



Re: BUG Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists

2022-07-28 Thread Ihor Radchenko
Juan Manuel Macías  writes:

> A thousand apologies for my horrible carelessness with the parentheses.
> I should have checked the code. Here goes the patch again corrected. I
> hope it's alright now.

Thanks!
Applied onto main via d37c0ee5f after adding full stop after sentences
in the commit message and amending some wording.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d37c0ee5fa7dc4be4bbe3aa9b6f4e79d4b1e638d

Best,
Ihor



bizarre: checkbox in properties, counting does not work with subheadings

2022-07-28 Thread Uwe Brauer



Hi

Please consider

#+begin_src 


* Everything [3/4]
  :PROPERTIES:
  :COLUMNS:   %TODO %ITEM  %Nr %Comp1 %Comp2  
  :COMP1:[3/4]
  :COMP2:[3/4]
  :TODO:  [ ] 
  :END:

** DONE Books
   :PROPERTIES:
   :Nr:   1
   :Comp1: [X]
   :Comp2: [X]
   :END:

** DONE Car
   :PROPERTIES:
   :Nr:   2
   :Comp1: [X]
   :Comp2: [X]
   :END:

** DONE Food
   :PROPERTIES:
   :Nr:   3
   :Comp1:[ ]
   :Comp2:[X]
   :END:

*** WAIT  Computer
:PROPERTIES:
:Nr:   4
:Comp1:[X]
:Comp2:[ ]
:END:



#+BEGIN: columnview :maxlevel 2 :skip-empty-rows t :hlines 1 :indent nil  
:format "%5TODO(Status) %5Nr(Nr) %5Comp1(Comp1){X/} %5Comp2(Comp2){X/}"
| Status | Nr | Comp1 | Comp2 |
|++---+---|
||| [3/4] | [3/4] |
| DONE   |  1 | [X]   | [X]   |
| TODO   |  2 | [X]   | [X]   |
| DONE   |  3 | [ ]   | [X]   |
| WAIT   |  4 | [X]   | [ ]   |
#+END:


#+end_src

Everything is as expected, now I will lower the level of the first and
last subheaders and the statistics of the checkbox turns nuts:

#+begin_src 

* Everything [3/4]
  :PROPERTIES:
  :COLUMNS:   %TODO %ITEM  %Nr %Comp1 %Comp2  
  :COMP1:[1/1]
  :COMP2:[1/1]
  :TODO:  [ ] 
  :END:

*** DONE Books
:PROPERTIES:
:Nr:   1
:Comp1:[X]
:Comp2:[X]
:END:

** DONE Car
   :PROPERTIES:
   :Nr:   2
   :Comp1: [X]
   :Comp2: [X]
   :END:

** DONE Food
   :PROPERTIES:
   :Nr:   3
   :COMP1:[1/1]
   :COMP2:[0/1]
   :END:

 WAIT  Computer
 :PROPERTIES:
 :Nr:   4
 :Comp1:[X]
 :Comp2:[ ]
 :END:



#+BEGIN: columnview :maxlevel 2 :skip-empty-rows t :hlines 1 :indent nil  
:format "%5TODO(Status) %5Nr(Nr) %5Comp1(Comp1){X/} %5Comp2(Comp2){X/}"
| Status | Nr | Comp1 | Comp2 |
|++---+---|
||| [1/1] | [1/1] |
| DONE   |  2 | [X]   | [X]   |
| DONE   |  3 | [1/1] | [0/1] |
#+END:


#+end_src

Any idea how to avoid this? The expected behavior should be 


#+begin_src 


* Everything [3/4]
  :PROPERTIES:
  :COLUMNS:   %TODO %ITEM  %Nr %Comp1 %Comp2  
  :COMP1:[1/2]
  :COMP2:[2/2]
  :TODO:  [ ] 
  :END:


** DONE Car
   :PROPERTIES:
   :Nr:   2
   :Comp1: [X]
   :Comp2: [X]
   :END:

** DONE Food
   :PROPERTIES:
   :Nr:   3
   :Comp1:[ ]
   :Comp2:[X]
   :END:




#+BEGIN: columnview :maxlevel 2 :skip-empty-rows t :hlines 1 :indent nil  
:format "%5TODO(Status) %5Nr(Nr) %5Comp1(Comp1){X/} %5Comp2(Comp2){X/}"
| Status | Nr | Comp1 | Comp2 |
|++---+---|
||| [1/2] | [2/2] |
| DONE   |  2 | [X]   | [X]   |
| DONE   |  3 | [ ]   | [X]   |
#+END:



#+end_src


regards

Uwe Brauer 
-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 




Re: @string abbreviation in bib file not honored in (basic) org-cite

2022-07-28 Thread Ihor Radchenko
Joost Kremers  writes:

> On Tue, Jul 19 2022, Bruce D'Arcus wrote:
>>> So does this mean there is no longer any reason to add parsebib to (Non-)GNU
>>> ELPA?
>>
>> No, since parsebib is an important dependency for citeproc-el, and
>> Ihor was suggesting Andras try to get that in ELPA.
>
> Ok, thanks. Sending my copyright assignment now...

Did you manage to get the copyright form from FSF?
They are supposed to respond within 5 working days.

Best,
Ihor



Re: Something has happened such that I can't export to latex

2022-07-28 Thread Ihor Radchenko
Sharon Kimble  writes:

> After several rebuilds of emacs I'm now getting this line showing for
> org-version -
>
> Org mode version 9.5.4 (release_9.5.4-17-g6e991f @ mixed installation!
> /home/boudiccas/git/emacs/lisp/org/ and
> /home/boudiccas/git/org-mode/lisp/)
>
> I want to stay with the git version of org-mode if possible, so how do I
> stop the emacs org from operating please? 

Try

#+BEGIN_SRC emacs-lisp :tangle "~/.emacs.d/init.el" :exports code :results 
silent
;;; init.el --- sharon's config -*- eval: (read-only-mode 1) -*-
(require 'package)
(setq package-enable-at-startup nil)

;; Make sure that Git version of Org mode is being loaded instead of the
;; built-in version.
(add-to-list 'load-path (expand-file-name "/home/boudiccas/git/org-mode/lisp"))
(add-to-list 'load-path (expand-file-name 
"/home/boudiccas/git/org-contrib/lisp"))

(package-initialize)

(require 'ob-tangle)
(org-babel-load-file "~/.emacs.d/config22.org")
#+END_SRC

Hope it helps.

Best,
Ihor



Re: Something has happened such that I can't export to latex

2022-07-28 Thread Sharon Kimble
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Ihor Radchenko  writes:

> Sharon Kimble  writes:
>
>> Despite git pulling, etc, and restarting emacs, the problem still
>> remains.
>>
>> This is on org-mode 'Org mode version 9.5.2 (release_9.5.2-25-gaf6f12 @
>> /home/boudiccas/git/org-mode/lisp/)'
>>
>> Any ideas please?
>
> Org 9.5.2 is a relatively old Org version. However, the error you are
> getting was introduced in development version of Org (9.5.4+).
> I suspect that you are loading some part of Org distribution from other
> place. Not the Git folder you fetched.
>
> Please make sure that you set the load-path for Org correctly early in
> your config before you load Org or any package depending on Org.
>
> Best,
> Ihor

After several rebuilds of emacs I'm now getting this line showing for
org-version -

Org mode version 9.5.4 (release_9.5.4-17-g6e991f @ mixed installation!
/home/boudiccas/git/emacs/lisp/org/ and
/home/boudiccas/git/org-mode/lisp/)

I want to stay with the git version of org-mode if possible, so how do I
stop the emacs org from operating please? 

Thanks everyone
Sharon.
- -- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk
Debian 11, fluxbox 1.3.7, emacs 29.0.50, org 9.5.4
-BEGIN PGP SIGNATURE-

iQJRBAEBCgA7FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAmLiW/kdHGJvdWRpY2Nh
c0Bza2ltYmxlMDkucGx1cy5jb20ACgkQNoGAGQr4g1sZpA/9EpnIpSiBGvytEZ7A
B+pSO29oQoVx/OoexFb3vQabZk1WTrH01Jjy+6xynxwIgy4DB044yg5CzW4P5yfC
Bp9RA32T+RFJjD2l4TLPs64cjzu2EC6wp9Jy8v0dVEIcl8KVopfRR5+j9HCSC16q
051qusl4VPrKmVX6h8/Yt3HmZ/dAVTh49p5aZeFeATdK8Fdtyj1HMfV/gv8hcvgi
WlyqBKToXGl57JLOhPhphkcH9j8TSeL5GwLFo4YKOcwGT6Y1Sb1EyZ23kiohuoth
uLKPoOlufkIiKSkPBion/pSk3OXzN6Gnc7hypdr/Y72nU2RntAA/tnft9kxHbc8R
byUFnPNDhP54b1LgjqxCBN1v6bzmb+5ZnPwu5UkyMu7uiNOGO8otM54Nv2XedJ8J
JklT0gLBvBK5X3CUr0oit+z+K1qEX/HpPfIFdmioxqKtZr7ivBfiGNQ5wegIbWIZ
lPJYLBDzHcvcBseQMDbfJ1SkDvESuAsIJVrfalOO2xjPfCKpALyxA8S7UHCCvLfm
SKOlxqjZm3rTaN0kIWZYXIhhNnURgVmSqRNcJ/8NXf/FF6aS7aeGYG3+51Dz514c
YovLXfAPQ2Ob6cadVX6hoMIHnm5LSUslMLvaTBvNkFBr3zPe2iiJZtj7t6tnzMwq
2mU8wlQXACey4+XmDJKqfpb2uZg=
=gwXa
-END PGP SIGNATURE-



[BUG] org-mode 9.5.4 with evil-leader leads to endless loop in table [9.5.4 (9.5.4-g6013cb1 @ /Users/cgrabenstein/.emacs.d/straight/build/org/)]

2022-07-28 Thread Christoph Grabenstein
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.


org-table-insert-row hangs if evil-leader is installed.

Steps to reproduce:

1. Install org-mode 9.5.4, evil and evil-leader, and enable evil-mode
and global-evil-leader-mode.
2. Open or create an org file that has a table like that:
```
| header | another header |
```
3. Place your cursor in the header and hit enter (in evil insert mode).
4. Emacs hangs in an endless loop, you will have to interrupt with C-g.


Additional notes:
- The problem does not occur with org-mode 9.5.2.
- I'm not sure if this is an error on org's side or on evil's side. Please
let me know if I should open a ticket for evil.
- For more details see my question at the emacs stackexchange:
https://emacs.stackexchange.com/questions/72769/org-mode-tables-slowed-down-by-evil-mode

Best regards
Christoph

Emacs  : GNU Emacs 28.1 (build 1, x86_64-apple-darwin20.6.0, Carbon Version
164 AppKit 2022.6)
 of 2022-05-03
Package: Org mode version 9.5.4 (9.5.4-g6013cb1 @
/Users/cgrabenstein/.emacs.d/straight/build/org/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 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-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)
  ("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)
  ("news" :follow
#[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"])
  ("mailto" :follow
#[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6
 "\n\n(fn URL ARG)"]
)
  ("https" :follow
#[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]
)
  ("http" :follow
#[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"])
  ("ftp" :follow
#[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"])
  ("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)
 )