Re: Publish error: wrong argument number

2021-09-16 Thread Colin Baxter
Hello Tim,
> Tim Cross  writes:

> Colin Baxter  writes:

>>> Colin Baxter  writes:
>> 
>> > Hello, Today I get a "wrong-number-of-arguments" publish >
>> error. This was not present a few weeks ago. It is also not >
>> present in Org-version 9.4.4 but does occur in the latest version
>> > of org-mode.
>> 
>> > I'd appreciate some help in tracking down the error. My
>> debugger > file is below.
>> 
>> Odd - error vanished after a fresh git pull and make - very
>> odd. 8-)

> I was going to post to say that the error you saw is very common
> type of error for when you have a 'mixed' install. Could it be
> possible that you already had org loaded when you upgraded the org
> package (which would result in a mixed install), but later when
> you upgraded again, it was not and therefore gave you a clean
> 'unmixed' install?

Yes, I think that is very likely. After pulling and compiling, I update
org-mode via "C-c C-x !" I do that all the time, but I don't think I'd
seen that error before. However, my emacs had been running for 3 or 4
weeks so perhaps things had gotten a little "confused" after that length
of time.

Thanks for the information.

Best wishes,



[PATCH] Fix some typos

2021-09-16 Thread Stefan Kangas
Please find attached another clean-up patch that fixes a small number of
typos.
From 2619a525d025a8d4359cff440264c1fd3e9581c8 Mon Sep 17 00:00:00 2001
From: Stefan Kangas 
Date: Thu, 16 Sep 2021 21:58:35 +0200
Subject: [PATCH] ; Fix some typos

---
 doc/org-manual.org | 4 ++--
 etc/ORG-NEWS   | 2 +-
 lisp/ob-java.el| 2 +-
 lisp/org-plot.el   | 6 +++---
 lisp/org.el| 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 61b743346..249a2f7d9 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13880,7 +13880,7 @@ The LaTeX export back-end converts horizontal rules by the specified
 
 The LaTeX export back-end accepts four attributes for verse blocks:
 =:lines=, =:center=, =:versewidth= and =:latexcode=. The three first
-require the external LaTeX package =verse.sty=, wich is an extension
+require the external LaTeX package =verse.sty=, which is an extension
 of the standard LaTeX environment. The purpose of these attributes is
 explained below.
 
@@ -13904,7 +13904,7 @@ A complete example with Shakespeare's first sonnet:
 From fairest creatures we desire increase,
 That thereby beauty’s rose might never die,
 But as the riper should by time decrease,
-His tender heir mught bear his memeory:
+His tender heir mught bear his memory:
 But thou, contracted to thine own bright eyes,
 Feed’st thy light’st flame with self-substantial fuel,
 Making a famine where abundance lies,
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 83a67da96..ad6cfa3f7 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -253,7 +253,7 @@ that Org mode configures LaTeX to process any new float type.
 
 The LaTeX export back-end accepts four attributes for verse blocks:
 =:lines=, =:center=, =:versewidth= and =:latexcode=. The three first
-require the external LaTeX package =verse.sty=, wich is an extension
+require the external LaTeX package =verse.sty=, which is an extension
 of the standard LaTeX environment. The purpose of these attributes is
 explained below.
 
diff --git a/lisp/ob-java.el b/lisp/ob-java.el
index 54d909061..c93c65b7f 100644
--- a/lisp/ob-java.el
+++ b/lisp/ob-java.el
@@ -472,7 +472,7 @@ If RESULT-TYPE equals `output' then return standard output as a
 string.  If RESULT-TYPE equals `value' then return the value
 returned by the source block, as elisp.
 
-RESULT-PARAMS input params used to format the reponse.
+RESULT-PARAMS input params used to format the response.
 
 RESULT-FILE filename of the tempfile to store the returned value in
 for `value' RESULT-TYPE.  Not used for `output' RESULT-TYPE."
diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 0e5032b48..be599b02d 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -230,7 +230,7 @@ If HARD-MIN and HARD-MAX can be used to fix the ends of the axis."
 
 (defun org--plot/nice-frequency-pick (frequencies)
   "From a list of FREQUENCIES, try to sensibly pick a sample of the most frequent."
-  ;; TODO this mosly works decently, but counld do with some tweaking to work more consistently.
+  ;; TODO this mosly works decently, but could do with some tweaking to work more consistently.
   (cl-case (length frequencies)
 (1 (list (car (nth 0 frequencies
 (2 (if (<= 3 (/ (cdr (nth 0 frequencies))
@@ -354,7 +354,7 @@ the argument, and must return a string to be used."
 (radar :plot-func
 	   (lambda (table _data-file _num-cols params plot-str)
 	 (list (org--plot/radar table params)
-  "List of plists describing the avalible plot types.
+  "List of plists describing the available plot types.
 The car is the type name, and the property :plot-func must be
 set.  The value of :plot-func is a lambda which yields plot-lines
 \(a list of strings) as the cdr.
@@ -405,7 +405,7 @@ set angles degree
 set key bmargin center horizontal
 unset border
 
-# Load data and settup
+# Load data and setup
 load \"%s\"
 
 # General settings
diff --git a/lisp/org.el b/lisp/org.el
index c265a34a6..8b9d57157 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8857,7 +8857,7 @@ If the file does not exist, throw an error."
   (save-window-excursion
 	(message "Running %s...done" cmd)
 ;; Handlers such as "gio open" and kde-open5 start viewer in background
-;; and exit immediately.  Use pipe connnection type instead of pty to
+;; and exit immediately.  Use pipe connection type instead of pty to
 ;; avoid killing children processes with SIGHUP when temporary terminal
 ;; session is finished.
 ;;
-- 
2.30.2



Re: Publish error: wrong argument number

2021-09-16 Thread Tim Cross


Colin Baxter  writes:

>> Colin Baxter  writes:
>
> > Hello, Today I get a "wrong-number-of-arguments" publish
> > error. This was not present a few weeks ago. It is also not
> > present in Org-version 9.4.4 but does occur in the latest version
> > of org-mode.
>
> > I'd appreciate some help in tracking down the error. My debugger
> > file is below.
>
> Odd - error vanished after a fresh git pull and make - very odd. 8-)

I was going to post to say that the error you saw is very common type of
error for when you have a 'mixed' install. Could it be possible that you
already had org loaded when you upgraded the org package (which would
result in a mixed install), but later when you upgraded again, it was
not and therefore gave you a clean 'unmixed' install? 



Re: Publish error: wrong argument number

2021-09-16 Thread Colin Baxter
> Colin Baxter  writes:

> Hello, Today I get a "wrong-number-of-arguments" publish
> error. This was not present a few weeks ago. It is also not
> present in Org-version 9.4.4 but does occur in the latest version
> of org-mode.

> I'd appreciate some help in tracking down the error. My debugger
> file is below.

Odd - error vanished after a fresh git pull and make - very odd. 8-)





Re: [PATCH] Various minor docfixes found by checkdoc

2021-09-16 Thread Marco Wahl
Stefan Kangas  writes:

> The attached patch cleans up some style errors in docstrings and
> comments that were found by checkdoc.

Thanks Stefan!

Your patch has been applied.




Bug: Fontify error with markdown source block [9.4.4 (release_9.4.4 @ /usr/share/emacs/28.0.50/lisp/org/)]

2021-09-16 Thread Yikai Zhao


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

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

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


Hello org-mode team,

I encountered the following error while opening an org buffer:

  Error during redisplay: (jit-lock-function 1) signaled (wrong-type-argument 
number-or-marker-p nil)

Here's the minimum reproducable content of the buffer:

  #+BEGIN_SRC markdown
  #+END_SRC

(that is, just an empty markdown source block).

I have markdown-mode https://jblevins.org/projects/markdown-mode/
installed.

After some debugging, I've found that the error happened in
`font-lock-fontify-keywords-region` function. It calls
`org-fontify-meta-lines-and-blocks` and got `t` as the result, but the
matching data is not set.

The following advice can fix the bug for me:

  (defun my/fix-org-fontify-meta-lines-and-blocks (res)
(when (and res (null (match-beginning 0)))
  (set-match-data (list 0 0)))
res)
  
  (advice-add 'org-fontify-meta-lines-and-blocks
  :filter-return
  #'my/fix-org-fontify-meta-lines-and-blocks)


Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, 
cairo version 1.17.4)
 of 2021-09-15
Package: Org mode version 9.4.4 (release_9.4.4 @ 
/usr/share/emacs/28.0.50/lisp/org/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-directory "~/Notes"
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-agenda-files '("~/Notes/gtd/")
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-refile-use-outline-path t
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-mode-hook '(#[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 #[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-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-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 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)
   ("treemacs" :store treemacs-store-org-link)
   ("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) ("file+sys") 
("file+emacs")
   ("shell" :follow org-link--open-shell)
   ("news" :follow
#[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6
  "\n\n(fn URL ARG)"]
)
   ("mailto" :follow
#[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6
  "\n\n(fn URL ARG)"]

Re: [org-cite] citations in property drawers?

2021-09-16 Thread Tom Gillespie
> I understand the problem, but the solution should not be: "let's pretend
> export does not exist".

>From my perspective any org object that is not in a section that
allows org objects could in principle be parsed as such, but it would
not be in the core of the grammar, and it also would have to parse to
something that did not trigger side effects related to export.

Allowing org objects to appear at arbitrary places in the grammar is
definitely not a good idea because in many senses they cannot actually
be those objects. Maybe the syntax could be the same, but they would
have to be "shadow objects" or something like that?

Best,
Tom



Re: [PATCH] Re: [BUG] Creating sparse tree with regexp property matches

2021-09-16 Thread Daniel Fleischer
> Attached is a patch with improvement to documentation regarding regular 
> expressions.

Hi, how do I get the patch approved/committed to org?

-- 

Daniel Fleischer



[PATCH] Various minor docfixes found by checkdoc

2021-09-16 Thread Stefan Kangas
The attached patch cleans up some style errors in docstrings and
comments that were found by checkdoc.
From 655c099b10d542207493580115789f3cbeb8b064 Mon Sep 17 00:00:00 2001
From: Stefan Kangas 
Date: Thu, 16 Sep 2021 12:32:43 +0200
Subject: [PATCH] ; Various minor docfixes found by checkdoc

---
 lisp/ob-C.el   | 29 ++---
 lisp/ob-J.el   |  2 +-
 lisp/ob-abc.el |  7 +--
 lisp/ob-comint.el  |  2 +-
 lisp/ob-core.el|  6 +++---
 lisp/ob-ebnf.el|  8 
 lisp/ob-eval.el|  2 +-
 lisp/ob-fortran.el |  2 +-
 lisp/ob-haskell.el |  2 +-
 lisp/ob-io.el  |  4 ++--
 lisp/ob-js.el  |  4 ++--
 lisp/ob-ledger.el  |  4 ++--
 lisp/ob-lua.el |  6 --
 lisp/ob-makefile.el|  3 +--
 lisp/ob-octave.el  |  4 ++--
 lisp/ob-picolisp.el| 10 +-
 lisp/ob-scheme.el  |  2 +-
 lisp/ob-screen.el  |  2 +-
 lisp/ob-tangle.el  | 22 ++
 lisp/oc-basic.el   |  4 ++--
 lisp/oc-csl.el |  2 +-
 lisp/ol-bbdb.el|  2 +-
 lisp/ol-eshell.el  |  8 
 lisp/ol-info.el|  2 +-
 lisp/ol.el |  4 ++--
 lisp/org-agenda.el | 21 +++--
 lisp/org-attach.el |  6 +++---
 lisp/org-capture.el|  7 +++
 lisp/org-clock.el  |  6 +++---
 lisp/org-colview.el|  2 +-
 lisp/org-ctags.el  |  6 +++---
 lisp/org-datetree.el   |  4 ++--
 lisp/org-element.el|  2 +-
 lisp/org-goto.el   |  2 +-
 lisp/org-id.el |  2 +-
 lisp/org-inlinetask.el |  2 +-
 lisp/org-macro.el  |  2 +-
 lisp/org-macs.el   |  4 ++--
 lisp/org-mouse.el  |  2 +-
 lisp/org-num.el|  4 ++--
 lisp/org-pcomplete.el  |  5 ++---
 lisp/org-src.el|  2 +-
 lisp/org-table.el  | 30 +++---
 lisp/org.el| 26 +-
 lisp/ox-html.el|  8 
 lisp/ox-koma-letter.el |  8 
 lisp/ox-latex.el   |  2 +-
 lisp/ox-man.el |  6 +++---
 lisp/ox-odt.el | 11 +--
 lisp/ox-publish.el |  2 +-
 lisp/ox-texinfo.el |  6 +++---
 51 files changed, 160 insertions(+), 161 deletions(-)

diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index fdfe332a3..28784843a 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -95,8 +95,7 @@ This function calls `org-babel-execute:C++'."
   (org-babel-execute:C++ body params))
 
 (defun org-babel-expand-body:cpp (body params)
-  "Expand a block of C++ code with org-babel according to its
-header arguments."
+  "Expand a block of C++ code with org-babel according to its header arguments."
   (org-babel-expand-body:C++ body params))
 
 (defun org-babel-execute:C++ (body params)
@@ -105,8 +104,7 @@ This function is called by `org-babel-execute-src-block'."
   (let ((org-babel-c-variant 'cpp)) (org-babel-C-execute body params)))
 
 (defun org-babel-expand-body:C++ (body params)
-  "Expand a block of C++ code with org-babel according to its
-header arguments."
+  "Expand a block of C++ code with org-babel according to its header arguments."
   (let ((org-babel-c-variant 'cpp)) (org-babel-C-expand-C++ body params)))
 
 (defun org-babel-execute:D (body params)
@@ -115,8 +113,7 @@ This function is called by `org-babel-execute-src-block'."
   (let ((org-babel-c-variant 'd)) (org-babel-C-execute body params)))
 
 (defun org-babel-expand-body:D (body params)
-  "Expand a block of D code with org-babel according to its
-header arguments."
+  "Expand a block of D code with org-babel according to its header arguments."
   (let ((org-babel-c-variant 'd)) (org-babel-C-expand-D body params)))
 
 (defun org-babel-execute:C (body params)
@@ -125,8 +122,7 @@ This function is called by `org-babel-execute-src-block'."
   (let ((org-babel-c-variant 'c)) (org-babel-C-execute body params)))
 
 (defun org-babel-expand-body:C (body params)
-  "Expand a block of C code with org-babel according to its
-header arguments."
+  "Expand a block of C code with org-babel according to its header arguments."
   (let ((org-babel-c-variant 'c)) (org-babel-C-expand-C body params)))
 
 (defun org-babel-C-execute (body params)
@@ -197,13 +193,11 @@ or `org-babel-execute:C++' or `org-babel-execute:D'."
   )))
 
 (defun org-babel-C-expand-C++ (body params)
-  "Expand a block of C or C++ code with org-babel according to
-its header arguments."
+  "Expand a block of C/C++ code with org-babel according to its header arguments."
   (org-babel-C-expand-C body params))
 
 (defun org-babel-C-expand-C (body params)
-  "Expand a block of C or C++ code with org-babel according to
-its header arguments."
+  "Expand a block of C/C++ code with org-babel according to its header arguments."
   (let ((vars (org-babel--get-vars params))
 	(colnames (cdr (assq :colname-names params)))
 	(main-p (not (string= (cdr (assq :main params)) "no")))
@@ -272,8 +266,7 @@ its header arguments."
 		  body) "\n") "\n")))
 
 (defun org-babel-C-expand-D (body params)
-  "Expan

Re: Bug: doc string for "org-end-of-meta-data"

2021-09-16 Thread Marco Wahl
Hi Tom,

> You make sense. What you propose to substitute is easier to understand and
> concise: 
>
>  When FULL is non-nil but not t, skip planning information, 
>  properties, clocking lines and logbook drawers.

Thank you for the report and the confirmation!

I just committed accordingly.


Bye