Read only org view mode

2022-01-22 Thread Arthur Miller
Hi mailing list,

is something like this of interest to add to org-mode?

Attached is a prototype to a read-only view mode. It tries to hide as much of
markup as possible to make it more "readable". It uses built-in view-mode to
make the buffer read only and enable some common commands. I plan to add more
"dired like" movement though.

I don't claim it is very well written or efficient; I appreciate input on that
regard. To note is that I use minor-modes as "toggles", to make the
functionality avialable as "solo pieces" as well as a code generation tool.

I am just checking interest here. More info and a screencast are avialable at:

https://github.com/amno1/org-view-mode

;;; org-view-mode.el --- Read-only viewer with less markup clutter in org mode 
files  -*- lexical-binding: t; -*-

;; Copyright (C) 2021  Arthur Miller

;; Author: Arthur Miller 
;; Keywords: convenience, outlines, tools

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see .

;; Author: Arthur Miller
;; Version: 0.0.1
;; Keywords: tools convenience
;; Package-Requires: ((emacs "24.1"))
;; URL: https://github.com/amno1/org-view-mode

;;; Commentary:

;; A minor mode to help reduce clutter in org-mode files by
;; hiding/unhiding org-mode markup language
;;
;; To turn it on execute:
;;
;;  `M-x org-view-mode'.
;;
;; To turn it off execute the same command.

;;; Issues

;;; Code:
(require 'org)

(defgroup org-view nil
  "Hide tags in org-headings."
  :prefix "org-view-"
  :group 'org)

(defvar-local org-view-center-credentials nil
  "Whether to align title and author in center or not.

Centering is done pixel wise relative to window width.")

(defcustom org-view-diminish-mode t
  "Hide lighters for individual minor modes when org-view-mode is on."
  :type 'boolean
  :group 'org-view)

(defvar org-view-stars-re "^[ \t]*\\*+"
  "Regex used to recognize leading stars in org-headings.")

(defvar org-view-credentials-re "[ \t]*#\\+\\(TITLE\\|AUTHOR\\):"
  "Regex used to update author and title lines.")

(defun org-view--update-tags (visibility)
  "Update invisible property to VISIBILITY for tags in the current buffer."
  (save-excursion
(goto-char (point-min))
(with-silent-modifications
  (while (re-search-forward org-view-stars-re nil t)
(goto-char (line-end-position))
(when (re-search-backward org-tag-line-re (line-beginning-position) t)
(put-text-property
 (match-beginning 1) (match-end 1) 'invisible visibility))
  (forward-line)

(defun org-view--update-keywords (visibility)
  "Set VISIBILITY for each line starting with a keyword from KEYWORDS list."
  (org-with-wide-buffer
   (save-excursion
 (with-silent-modifications
   (goto-char (point-min))
   (while (re-search-forward "^[ \t]*#\\+.*$" nil t)
 (goto-char (match-beginning 0))
 (unless (looking-at-p org-view-credentials-re)
   (put-text-property
(1- (match-beginning 0)) (match-end 0) 'invisible visibility))
 (goto-char (match-end 0)))

(defun org-view--update-properties (visibility)
  "Set invisible property to VISIBILITY for properties in the current buffer."
  (org-with-wide-buffer
   (save-excursion
 (with-silent-modifications
   (goto-char (point-min))
   (while (re-search-forward org-property-drawer-re nil t)
 (put-text-property
  (match-beginning 0) (match-end 0) 'invisible visibility))
   (goto-char (point-min))
   (while (re-search-forward "^[ \t]*#\\+PROPERTY:.*$" nil t)
 (put-text-property
  (1- (match-beginning 0)) (1+ (match-end 0)) 'invisible 
visibility))

(defun org-view--update-stars (visibility)
  "Update invisible property to VISIBILITY for markers in the current buffer."
  (org-with-wide-buffer
   (save-excursion
 (goto-char (point-min))
 (with-silent-modifications
   (while (re-search-forward org-view-stars-re nil t)
 (put-text-property
  (match-beginning 0) (match-end 0) 'invisible visibility))

(defun org-view--update-credentials (visibility)
  "Set invisible property to VISIBILITY for export settings."
  (org-with-wide-buffer
   (save-excursion
 (with-silent-modifications
   (goto-char (point-min)) 
   (while (re-search-forward org-view-credentials-re nil t)
 (put-text-property
  (match-beginning 0) (match-end 0) 'invisible visibility)

Re: Extend the existing alternative set of key bindings for terminals

2022-01-22 Thread Ihor Radchenko
"Loris Bennett"  writes:

> In principle, yes, but the mode map is quite extensive.  Is there any
> way of doing that systematically?  Or is the idea that I just keep a
> record of all the issues that I stumble across?

I do not know a good way to do it systematically, other than looking
into the contents of org-mode-map and trying things.

The idea is to keep record of the problematic bindings and later discuss
possible alternatives that will be automatically enabled when you load
Emacs in terminal.

The current alternatives are the following:

  - "C-c C-x c ->org-table-copy-down
  - "C-c C-x m ->org-meta-return
  - "C-c C-x M ->org-insert-todo-heading
  - "C-c C-x RET ->  org-meta-return
  - "ESC RET ->  org-meta-return
  - "ESC  ->   org-metaleft
  - "C-c C-x l ->org-metaleft
  - "ESC  ->  org-metaright
  - "C-c C-x r ->org-metaright
  - "C-c C-x u ->org-metaup
  - "C-c C-x d ->org-metadown
  - "C-c C-x L ->org-shiftmetaleft
  - "C-c C-x R ->org-shiftmetaright
  - "C-c C-x U ->org-shiftmetaup
  - "C-c C-x D ->org-shiftmetadown
  - "C-c  -> org-shiftup
  - "C-c  ->   org-shiftdown
  - "C-c  ->   org-shiftleft
  - "C-c  ->  org-shiftright
  - "C-c C-x  ->  org-shiftcontrolright
  - "C-c C-x  ->   org-shiftcontrolleft

Best,
Ihor



Re: bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week

2022-01-22 Thread Ihor Radchenko
"Peter Davis"  writes:

> Please unsubscribe my husband Peter Davis from this list.  He died 3 years 
> ago.
>
> Thanks,
> Donna Cantera-Davis

I am sorry to hear this.

To unsubscribe, feel free to follow the steps described in
https://lists.gnu.org/mailman/listinfo/emacs-orgmode

Look for the following text at the bottom of the page:

"To unsubscribe from Emacs-orgmode, get a password reminder, or change
your subscription options enter your subscription email address:"

Best,
Ihor



Re: [PATCH v3 2/3] ox-texinfo: Optionally use @itemx for certain description list items

2022-01-22 Thread Jonas Bernoulli
Nicolas Goaziou  writes:

>>  #+begin_example
>> -,#+ATTR_TEXINFO: :table-type vtable :sep , :indic asis
>> +,#+attr_texinfo: :table-type vtable :indic asis :sep ,
>>  - foo, bar :: This is the common text for variables foo and bar.
>>  #+end_example
>
> This change is not needed. Org markup is capitalized in examples to make
> it stand out. It's not great because 1) it is ugly 2) users may think
> Org syntax is uppercase. But changing that is not the point of this patch.

Sorry about that; I also don't like it when contributors sneak in
cosmetic changes.

>>  (defun org-texinfo--normalize-headlines (tree _backend info)
>>"Normalize headlines in TREE.
>>  
>> -BACK-END is the symbol specifying back-end used for export.
>> +_BACKEND is the symbol `texinfo'; the back-end used for export.
>
> You don't need to document ignored arguments.

The argument was already documented before I touched this, and
additionally the given name was incorrect.  Should I leave this
untouched to avoid making unrelated cosmetic changes or should
I remove this line?

>> +(defun org-texinfo--combine-items (tree _backend info)
>> +  "Combine certain description list items.
>> +
>> +_BACKEND is the symbol `texinfo'; the back-end used for export.
>> +INFO is a plist used as a communication channel.
>
> Same as above.

This one is an addition so I am dropping it.  (The reason I originally
added it in the above addition is that I saw it being present here.)

>> +If the `:combine' attribute of a description list is non-nil and
>> +an item in that list has no body and is followed by another item,
>> +then remove the first item and prepend its `:tag' to that of the
>> +second item.
>> +
>> +Such an item that absorbed the tags of other items is later
>> +transcoded to one `@item', followed by one or more `@itemx'.
>> +
>> +Return new tree."
>> +  (org-element-map tree 'item
>> +(lambda (item)
>> +  (let ((plain-list (org-element-property :parent item)))
>> +(when (and (org-not-nil (org-export-read-attribute
>> + :attr_texinfo plain-list :compact))
>> +   (eq (org-element-property :type plain-list) 'descriptive))
>> +  (let ((next-item
>> + (cadr (memq item (org-element-contents plain-list)
>
> I suggest to use `org-export-get-next-element', which is not as
> low-level as this.

Okay changed.

In the next commit, in org-texinfo--massage-key-item, I am also using
the low-level approach.  That function isn't passed INFO, so I am unsure
what to do there.  Looking at org-export-get-next-element it seems fine
to just pass it nil as INFO.

>> - (items (and tag
>> - (let ((tag (org-export-data tag info)))
>> + (items (org-element-property :itemx item))
>> + (items (cond (items
>> +   (mapcar (lambda (tag) (org-export-data tag info))
>> +   (nconc items (list tag
>> +  ((not tag) nil)
>> +  (t
>> +   (setq tag (org-export-data tag info))
>
> OK, but I think this is a bit convoluted. I wonder if we need
> `org-texinfo--combine-items' at all. I.e., `org-texinfo-item' could
> decide to prefix current tag with @itemx if 1) the item is empty 2) the
> list has a non-nil :compact attribute 3) there's another item following
> it. IOW, we do not need to rely on an :itemx property.

I think so, but its bed time.  I'll look into it tomorrow.

 Thanks for the review,
 Jonas



Re: [PATCH v3 3/3] ox-texinfo: Define definition commands using description lists

2022-01-22 Thread Jonas Bernoulli
Nicolas Goaziou  writes:

>> +   (t
>> +(org-element-set-contents
>> + item (nconc
>> +   (mapcar (lambda (key) `(keyword (:key "KINDEX" :value ,key))) 
>> kindex)
>> +   (mapcar (lambda (cmd) `(keyword (:key "FINDEX" :value ,cmd))) 
>> findex)
>> +   (org-element-contents item
>
> Indentation seems a bit off, otherwise, LGTM.

Are you only referring to the spaces that should be replaced with a tab?
"item (nconc\n" is also a bit weird so I changed that to

(org-element-set-contents
 item
 (nconc (mapcar (lambda (key) `(keyword (:key "KINDEX" :value ,key))) 
kindex)
(mapcar (lambda (cmd) `(keyword (:key "FINDEX" :value ,cmd))) 
findex)
(org-element-contents item

 Cheers,
 Jonas



Re: [PATCH v3 3/3] ox-texinfo: Define definition commands using description lists

2022-01-22 Thread Nicolas Goaziou
Hello,

Jonas Bernoulli  writes:

> +The Texinfo export back-end supports two approaches to writing Texinfo
> +definition commands.  One of them is describe here, the other in
> +[[*Plain lists in Texinfo export]].

Typo: one of them is described here

> +(defvar org-texinfo--quoted-keys-regexp
> +  (regexp-opt '("BS" "TAB" "RET" "ESC" "SPC" "DEL"
> + "LFD" "DELETE" "SHIFT" "Ctrl" "Meta" "Alt"
> + "Cmd" "Super" "UP" "LEFT" "RIGHT" "DOWN")
> +   'words)
> +  "Regexp matching keys that have to be quoted using @key{KEY}.")

OK. This is the one missing from first patch.

> +(defun org-texinfo--massage-key-item (plain-list item args)
> +  "In PLAIN-LIST modify ITEM based on ARGS.
> +Reformat ITEM's tag property and add findex and kindex entries to
> +its content.  If the bullet is \"+\" then use \"@itemx\" and deal with
> +data from preceeding siblings that use such a bullet."

The last sentence is a left-over from the previous prototype.

> +   (t
> + (org-element-set-contents
> +  item (nconc
> +(mapcar (lambda (key) `(keyword (:key "KINDEX" :value ,key))) 
> kindex)
> +(mapcar (lambda (cmd) `(keyword (:key "FINDEX" :value ,cmd))) 
> findex)
> +(org-element-contents item

Indentation seems a bit off, otherwise, LGTM.

Regards,
-- 
Nicolas Goaziou



Re: Exporting Org file to Html with collapsable headings

2022-01-22 Thread xincheng99
Thanks a lot. This is very close to what I am looking for, and saves a lot of 
my time. I am grateful to all the help I received from this mailing list.

It is a lot of fun subscribing to this list.

Regards

Ziping

> On Jan 21, 2022, at 11:46 AM, Max Nikulin 
>  > wrote:
> 
> On 21/01/2022 19:23, Juan Manuel Macías wrote:
>> ZIPING CHEN writes:
>>> I may have many things like this in the middle of the file.
>>> ** a new heading.
>>> 
>>> I wish to turn all layers of
>>> headings in org file into collapsable headline to html.
>>> 
>>> Does anybody know a way I can accomplish this?
>> I think that you need to add javascript and enclose the collapsible
>> content in a div. 
> 
> Have a look at info "(org) JavaScript support" 
> https://orgmode.org/manual/JavaScript-support.html 
>  (I have not tried that 
> folding view).
> 
> HTML has headerbody elements that works 
> without JS, but it will require custom exporter.
> 
> You should ensure that deep headings can not be recognized as org inline 
> tasks. Check ox-html, it may has limit on number of levels that are exported 
> as headings with switching to lists for deeper structures.
> 
> 



Re: [PATCH] lisp/org-agenda.el: Add header to agenda clock report table

2022-01-22 Thread Samim Pezeshki
Thanks Nicolas for reviewing the changes!

I applied the changes.
Attached is the updated patch.



On Fri, Jan 21, 2022 at 1:58 PM Nicolas Goaziou 
wrote:

> Hello,
>
> Samim Pezeshki  writes:
>
> > +(defcustom org-agenda-clock-report-header nil
> > +  "Header for org agenda clock report mode"
> > +  :group 'org-agenda
> > +  :type 'string)
>
> Please add :package-version and :safe keywords to the definition.
>
> Also, type does not match the default value. You probably mean
>
> (choice
>  (string :tag "Header")
>  (const :tag "No header" nil))
>
> > +
> >  (defun org-agenda-time-of-day-to-ampm (time)
> >"Convert TIME of a string like \"13:45\" to an AM/PM style time
> string."
> >(let* ((hour-number (string-to-number (substring time 0 -3)))
> > @@ -4473,6 +4478,10 @@ items if they have an hour specification like
> [h]h:mm."
> > (setq p (plist-put p :tend clocktable-end))
> > (setq p (plist-put p :scope 'agenda))
> > (setq tbl (apply #'org-clock-get-clocktable p))
> > +(when org-agenda-clock-report-header
> > +  (put-text-property 0 (length org-agenda-clock-report-header)
> 'face 'org-agenda-structure
> > + org-agenda-clock-report-header)
> > +  (insert org-agenda-clock-report-header))
>
> Maybe:
>
>   (insert (propertize org-agenda-clock-report-header 'face
> 'org-agenda-structure))
>
> Could you send an updated patch?
>
> Regards,
> --
> Nicolas Goaziou
>
From 6691abdcef95181ea9517e2c2c60ca52443c14a6 Mon Sep 17 00:00:00 2001
From: Samim Pezeshki 
Date: Mon, 10 Jan 2022 12:32:51 +0330
Subject: [PATCH] lisp/org-agenda.el: Add header to agenda clock report table

* lisp/org-agenda.el (org-agenda-list): Add header to agenda
clock report table.

TINYCHANGE
---
 doc/org-manual.org |  4 ++--
 etc/ORG-NEWS   |  1 +
 lisp/org-agenda.el | 11 +++
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index b4c20f252..2c54fde87 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -9742,8 +9742,8 @@ the other commands, point needs to be in the desired line.
   variable ~org-agenda-start-with-clockreport-mode~.  By using
   a prefix argument when toggling this mode (i.e., {{{kbd(C-u R)}}}),
   the clock table does not show contributions from entries that are
-  hidden by agenda filtering[fn:99].  See also the variable
-  ~org-clock-report-include-clocking-task~.
+  hidden by agenda filtering[fn:99].  See also the variables
+  ~org-clock-report-include-clocking-task~ and ~org-agenda-clock-report-header~.
 
 - {{{kbd(v c)}}} ::
 
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 335db4139..5a94e737e 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -140,6 +140,7 @@ introduced which will accept three new formats:
 Chmod-style permissions are based on the new variable
 ~org-babel-tangle-default-file-mode~.
 
+*** A new custom setting =org-agenda-clock-report-header= to add a header to org agenda clock report
 * Version 9.5
 
 ** Important announcements and breaking changes
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 7bcaf7117..6357d9cec 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1217,6 +1217,15 @@ For example, 9:30am would become 09:30 rather than  9:30."
   :version "24.1"
   :type 'boolean)
 
+(defcustom org-agenda-clock-report-header nil
+  "Header for org agenda clock report mode"
+  :group 'org-agenda
+  :type '(choice
+(string :tag "Header")
+(const :tag "No header" nil))
+  :safe #'stringp
+  :package-version '(Org . "9.6"))
+
 (defun org-agenda-time-of-day-to-ampm (time)
   "Convert TIME of a string like \"13:45\" to an AM/PM style time string."
   (let* ((hour-number (string-to-number (substring time 0 -3)))
@@ -4473,6 +4482,8 @@ items if they have an hour specification like [h]h:mm."
 	  (setq p (plist-put p :tend clocktable-end))
 	  (setq p (plist-put p :scope 'agenda))
 	  (setq tbl (apply #'org-clock-get-clocktable p))
+(when org-agenda-clock-report-header
+  (insert (propertize org-agenda-clock-report-header 'face 'org-agenda-structure)))
 	  (insert tbl)))
   (goto-char (point-min))
   (or org-agenda-multi (org-agenda-fit-window-to-buffer))
-- 
2.34.1



Re: [PATCH v3 2/3] ox-texinfo: Optionally use @itemx for certain description list items

2022-01-22 Thread Nicolas Goaziou
Hello,

Jonas Bernoulli  writes:

> * doc/org-manual.org (Plain lists in Texinfo export): Reorder and
> document new functionality.
> * lisp/ox-texinfo.el: Add org-texinfo--combine-items to the list of
> :filter-parse-tree functions of the texinfo backend.
> * lisp/ox-texinfo.el (org-texinfo--combine-items) New function.
> * lisp/ox-texinfo.el (org-texinfo-item) Transcode combined items to
> one @item and one or more @itemx.

This looks good. I have some comments below.

>  #+begin_example
> -,#+ATTR_TEXINFO: :table-type vtable :sep , :indic asis
> +,#+attr_texinfo: :table-type vtable :indic asis :sep ,
>  - foo, bar :: This is the common text for variables foo and bar.
>  #+end_example

This change is not needed. Org markup is capitalized in examples to make
it stand out. It's not great because 1) it is ugly 2) users may think
Org syntax is uppercase. But changing that is not the point of this patch.

> -#+ATTR_TEXINFO: :enum A
> -1. Alpha
> -2. Bravo
> -3. Charlie
> +,#+attr_texinfo: :table-type vtable :indic asis :combine t
> +- foo ::
> +- bar ::
> +  This is the common text for variables foo and bar.

See above.

>  (defun org-texinfo--normalize-headlines (tree _backend info)
>"Normalize headlines in TREE.
>  
> -BACK-END is the symbol specifying back-end used for export.
> +_BACKEND is the symbol `texinfo'; the back-end used for export.

You don't need to document ignored arguments.

> +(defun org-texinfo--combine-items (tree _backend info)
> +  "Combine certain description list items.
> +
> +_BACKEND is the symbol `texinfo'; the back-end used for export.
> +INFO is a plist used as a communication channel.

Same as above.

> +If the `:combine' attribute of a description list is non-nil and
> +an item in that list has no body and is followed by another item,
> +then remove the first item and prepend its `:tag' to that of the
> +second item.
> +
> +Such an item that absorbed the tags of other items is later
> +transcoded to one `@item', followed by one or more `@itemx'.
> +
> +Return new tree."
> +  (org-element-map tree 'item
> +(lambda (item)
> +  (let ((plain-list (org-element-property :parent item)))
> + (when (and (org-not-nil (org-export-read-attribute
> +  :attr_texinfo plain-list :compact))
> +(eq (org-element-property :type plain-list) 'descriptive))
> +   (let ((next-item
> +  (cadr (memq item (org-element-contents plain-list)

I suggest to use `org-export-get-next-element', which is not as
low-level as this.

> + (when (and next-item
> +(not (org-element-contents item))
> +(= (org-element-property :post-blank item) 1))

Be careful, (org-element-property :post-blank item) may be nil.
I suggest to use (eq 1 (org-element-property :post-blank item)) instead.

> -  (items (and tag
> -  (let ((tag (org-export-data tag info)))
> +  (items (org-element-property :itemx item))
> +  (items (cond (items
> +(mapcar (lambda (tag) (org-export-data tag info))
> +(nconc items (list tag
> +   ((not tag) nil)
> +   (t
> +(setq tag (org-export-data tag info))

OK, but I think this is a bit convoluted. I wonder if we need
`org-texinfo--combine-items' at all. I.e., `org-texinfo-item' could
decide to prefix current tag with @itemx if 1) the item is empty 2) the
list has a non-nil :compact attribute 3) there's another item following
it. IOW, we do not need to rely on an :itemx property.

WDYT?

Regards,
-- 
Nicolas Goaziou



Re: [PATCH v3 1/3] ox-texinfo: Add function for use by kbd macro

2022-01-22 Thread Nicolas Goaziou
Hello,

Jonas Bernoulli  writes:

> * doc/doc-setup.org: Use org-texinfo-kbd-macro for kbd macro.
> * doc/org-manual.org: Add new node "Key bindings in Texinfo export".
> * lisp/ox-texinfo.el (org-texinfo-kbd-macro): New function.

Thank you. Some comments follow.

> +(defun org-texinfo-kbd-macro (key  noquote)
> +  "Quote KEY using @kbd{...} and if necessary $key{...}.

Typo: $key -> @key

> +This is intended to be used as an Org macro like so:
> +
> +  #+macro: kbd (eval (org-texinfo-kbd-macro $1))
> +  Type {{{kbd(C-c SPC)}}}.
> +
> +Also see info node `(org)Key bindings in Texinfo export'.
> +
> +If optional NOQOUTE is non-nil, then do not add the quoting
> +that is necessary when using this in an Org macro."
> +  (format (if noquote "@kbd{%s}" "@@texinfo:@kbd{@@%s@@texinfo:}@@")
> +   (let ((case-fold-search nil))
> + (replace-regexp-in-string
> +  org-texinfo--quoted-keys-regexp

AFAICT the variable is not defined in the patch.

Otherwise, LGTM.

Regards,
-- 
Nicolas Goaziou



Re: [BUG] Do not spellcheck cite keys [9.5.2 (release_9.5.2-9-g7ba24c @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-01-22 Thread Nicolas Goaziou
Hello,

Rudolf Adamkovič  writes:

> The =org-mode-flyspell-verify= function should skip over citations.
>
> For example, the following citation get flagged as misspelled:
>
> [cite:@ganz+2013]

Fixed. Thank you.

Regards,
-- 
Nicolas Goaziou



[BUG] Do not spellcheck cite keys [9.5.2 (release_9.5.2-9-g7ba24c @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-01-22 Thread Rudolf Adamkovič



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.


The =org-mode-flyspell-verify= function should skip over citations.

For example, the following citation get flagged as misspelled:

[cite:@ganz+2013]

Rudy

Emacs  : GNU Emacs 29.0.50 (build 12, x86_64-apple-darwin21.2.0, NS 
appkit-2113.20 Version 12.1 (Build 21C52))
 of 2022-01-16
Package: Org mode version 9.5.2 (release_9.5.2-9-g7ba24c @ 
/Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)

current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-agenda-skip-deadline-prewarning-if-scheduled t
 org-cite-insert-processor 'citar
 org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-agenda-scheduled-leaders '("Scheduled: " "Scheduled %d×: ")
 org-agenda-custom-commands '(("a" "Agenda"
   ((stuck ""
 ((org-agenda-overriding-header
   "Stuck projects and actions")
  (org-agenda-prefix-format "* "))
 )
(todo "TODO"
 ((org-agenda-overriding-header "\nNext 
actions")
  (org-agenda-prefix-format "* %b")
  (org-agenda-breadcrumbs-separator "\n** ")
  (org-agenda-todo-ignore-scheduled 'all)
  (org-agenda-todo-ignore-timestamp 'future)
  (org-habit-show-habits nil))
 )
(agenda ""
 ((org-agenda-overriding-header "\nToday's 
agenda")
  (org-agenda-start-on-weekday nil) 
(org-agenda-span 1)
  (org-agenda-skip-scheduled-if-done t)
  (org-agenda-skip-deadline-if-done t)
  (org-agenda-sort-notime-is-late nil)
  (org-agenda-use-time-grid nil)
  (org-agenda-prefix-format "% t* %b%s")
  (org-agenda-breadcrumbs-separator "\n** ")
  (org-agenda-skip-function
   '(org-agenda-skip-entry-if 'todo 'done))
  (org-habit-show-habits nil))
 )
(agenda ""
 ((org-agenda-overriding-header "\nToday's 
habits")
  (org-agenda-format-date
   (with-temp-buffer (insert (fortune-message))
(fill-paragraph) (buffer-string))
   )
  (org-agenda-day-face-function
   (lambda (date) 'font-lock-comment-face))
  (org-agenda-use-time-grid nil) 
(org-agenda-span 1)
  (org-agenda-prefix-format "* % s"))
 )
(agenda ""
 ((org-agenda-overriding-header "\nTomorrow's 
agenda")
  (org-agenda-span 1) (org-agenda-start-day 
"+1d")
  (org-agenda-skip-scheduled-if-done t)
  (org-agenda-skip-deadline-if-done t)
  (org-agenda-sort-notime-is-late nil)
  (org-agenda-use-time-grid nil)
  (org-agenda-prefix-format "% t* %b%s")
  (org-agenda-breadcrumbs-separator "\n** ")
  (org-habit-show-habits nil))
 )
(agenda ""
 ((org-agenda-overriding-header "\nTomorrow's 
habits")
  (org-agenda-use-time-grid nil) 
(org-agenda-span 1)
  (org-agenda-start-day "+1d")
  (org-habit-scheduled-past-days 0)
  (org-agenda-prefix-format "* % s"))
 )
(agenda ""
 ((org-agenda-overriding-header "\nNear future")
  (org-agenda-start-on-weekday nil)
  (org-agenda-start-day "+2d") (org-agenda-span 
7)

Re: bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week

2022-01-22 Thread Peter Davis
Hello,

Please unsubscribe my husband Peter Davis from this list.  He died 3 years ago.

Thanks,
Donna Cantera-Davis

On Thu, Jan 20, 2022, at 9:07 PM, bruce robertson wrote:
> Thanks. I’ll do that. Org-submit … that is. 
> 
> On Thu, Jan 20, 2022 at 5:35 PM Kyle Meyer  wrote:
>> [ I've reassigned this bug report so that new messages will be directed
>>   to the Org mailing list, where it's more likely to get a reply.  In
>>   the future, please consider using org-submit-bug-report or sending a
>>   message to emacs-orgmode@gnu.org directly. ]
>> 
>> Bruce E. Robertson writes:
>> 
>> > emacs -Q test.org
>> > cursor to "CLOCK:" line, C-c C-c
>> > total time updates but day of week does not change
>> > contents of test.org
>> > --
>> > * heading
>> > :LOGBOOK:
>> > CLOCK: [2022-01-17 Tue 10:29]--[2022-01-19 Tue 10:29] => 48:00
>> > :END:
>> > --
>> > typing C-c C-c does update total log time for line and recently did
>> > update the day of the week but no long does
>> 
>> I'm having trouble finding an Org version where it will update a
>> timestamp _within_ a clock line.  I tried it out with v9.1 and the day
>> of the week still isn't updated.  Outside of that context it will, as
>> org-ctrl-c-ctrl-c-hook gets through to its timestamp condition rather
>> than taking the clock branch.
>> 
>> If you can provide more details about a version where it did work,
>> showing it's a regression, I think you'll have a higher chance of
>> getting this fixed.
>> 
>> Anyway, at least for now, perhaps you could try something like this to
>> get the behavior you want:
>> 
>>   (defun my/update-clock-and-days ()
>> (when (eq (org-element-type (org-element-context)) 'clock)
>>   (let ((re (org-re-timestamp 'inactive)))
>> (save-excursion
>>   (goto-char (line-beginning-position))
>>   (while (re-search-forward re (line-end-position) t)
>> (backward-char)
>> (org-timestamp-change 0 'day))
>> 
>>   (add-hook 'org-ctrl-c-ctrl-c-hook #'my/update-clock-and-days)
>> 
>> With that, hitting `C-c C-c` on the clock line at
>> 
>> --8<---cut here---start->8---
>> * heading
>> :LOGBOOK:
>> CLOCK: [2022-01-17 Thu 10:29]--[2022-01-19 Sun 10:29] => 40:00
>> :END:
>> --8<---cut here---end--->8---
>> 
>> produces
>> 
>> --8<---cut here---start->8---
>> * heading
>> :LOGBOOK:
>> CLOCK: [2022-01-17 Mon 10:29]--[2022-01-19 Wed 10:29] => 48:00
>> :END:
>> --8<---cut here---end--->8---
> -- 
> λέγει αὐτῷ Ἰησοῦς Ἐγώ εἰμι ἡ ὁδὸς καὶ ἡ ἀλήθεια καὶ ἡ ζωή· οὐδεὶς ἔρχεται 
> πρὸς τὸν Πατέρα εἰ μὴ δι' ἐμοῦ. ΚΑΤΑ ΙΩΑΝΝΗΝ

--
  Peter Davis
  www.techcurmudgeon.com

Re: [BUG] Cached element is incorrect in file.org [9.6 (9.6-??-0c9b30e @ /Users/jeffballowe/.emacs.d/.local/straight/build-27.2/org/)]

2022-01-22 Thread Ihor Radchenko
Jeff  writes:

> What I expected to happen: No error message when editing this file.
>
> What, in fact, did happen and happens frequently (no pattern
> discerned): I get this error message. Everything seems to work ok other than 
> getting this error message frequently.

Thanks for the report!
Your Org mode appears to be 1 month old. Can you try to update?

If update does not solve the problem, can you set
org-element--cache-self-verify to 'backtrace and share the backtrace
displayed in the message next time you see it?

Best,
Ihor



[BUG] Cached element is incorrect in file.org [9.6 (9.6-??-0c9b30e @ /Users/jeffballowe/.emacs.d/.local/straight/build-27.2/org/)]

2022-01-22 Thread Jeff
To: emacs-orgmode@gnu.org
Subject: [BUG] Cached element is incorrect in file.org [9.6 (9.6-??-0c9b30e @ 
/Users/jeffballowe/.emacs.d/.local/straight/build-27.2/org/)]
From: Jeff Ballowe 
--text follows this line--

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.


What I expected to happen: No error message when editing this file.

What, in fact, did happen and happens frequently (no pattern
discerned): I get this error message. Everything seems to work ok other than 
getting this error message frequently.


Emacs  : GNU Emacs 27.2 (build 1, x86_64-apple-darwin21.2.0, NS appkit-2113.20 
Version 12.1 (Build 21C52))
 of 2022-01-06
Package: Org mode version 9.6 (9.6-??-0c9b30e @ 
/Users/jeffballowe/.emacs.d/.local/straight/build-27.2/org/)

current state: a Doom Emacs configuration
==
(setq
 org-roam-db-location "/Users/jeffballowe/.emacs.d/.local/etc/org-roam.db"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer doom-modeline-set-org-src-modeline)
 org-fontify-whole-heading-line t
 org-capture-prepare-finalize-hook '(org-roam-capture--install-finalize-h)
 org-link-shell-confirm-function 'yes-or-no-p
 org-mode-local-vars-hook '(+org-init-gifs-h
eldoc-mode)
 org-babel-after-execute-hook '(org-redisplay-inline-images)
 org-insert-heading-respect-content t
 org-after-refile-insert-hook '(save-buffer)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-roam-db-node-include-function #[0 "\300\207" [t] 1]
 org-refile-targets '((nil :maxlevel . 3)
  (org-agenda-files :maxlevel
   . 3)
  )
 org-noter-auto-save-last-location t
 org-enforce-todo-dependencies t
 org-roam-mode-hook '(+org-roam-detach-magit-section-mode-map-h 
turn-on-visual-line-mode)
 org-use-property-inheritance '("Site" "AbymeType"
"Room")
 org-special-ctrl-a/e t
 org-imenu-depth 6
 org-persist-before-write-hook '(org-element--cache-persist-before-write)
 org-agenda-files '("~/Dropbox/org/agenda/")
 org-reveal-start-hook '(org-decrypt-entry)
 org-modules '(org-id ol-bibtex)
 org-startup-folded nil
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-id-link-to-org-use-id t
 org-mode-hook '(er/add-org-mode-expansions
 +lookup--init-org-mode-handlers-h
 (closure
  ((hook . org-mode-hook)
   (--dolist-tail--) t)
  ( _)
  (add-hook 'before-save-hook
   'org-encrypt-entries nil t)
  )
 #[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]
 doom-disable-show-paren-mode-h
 doom-disable-show-trailing-whitespace-h 
+org-enable-auto-reformat-tables-h +org-enable-auto-update-cookies-h 
+org-make-last-point-visible-h org-fancy-priorities-mode org-superstar-mode 
evil-org-mode toc-org-enable flyspell-mode embrace-org-mode-hook org-eldoc-load)
 org-clock-persist 'history
 org-fancy-priorities-list '("⚑" "⬆" "■")
 org-outline-path-complete-in-steps nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-persist-before-read-hook '(org-element--cache-persist-before-read)
 org-agenda-finalize-hook '(org-fancy-priorities-create-overlays 
+org-exclude-agenda-buffers-from-workspace-h 
+org-defer-mode-in-agenda-buffers-h)
 org-startup-indented t
 org-clock-history-length 20
 org-roam-db-gc-threshold 2305843009213693951
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-noter-notes-search-path '("~/Dropbox/org/")
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-agenda-deadline-faces '((1.001 . error)
 (1.0 . org-warning)
 (0.5 .
  org-upcoming-deadline)
 (0.0 .
  org-upcoming-distant-deadline)
 )
 org-crypt-key