emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* BUG: after an org-capture to an inbox entry, statistics-cookies are not updated on certain circumstances
@ 2024-09-01 20:55 pinmacs
  2024-09-08 18:10 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: pinmacs @ 2024-09-01 20:55 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1.1: Type: text/plain, Size: 600 bytes --]

Hi,

I am living with this bug since a long time, I thought I was asking 
maybe something very special.

But then I find on a org-capture that goes to an inbox entry:

1. if prepend is nil, does not work on the first time (?)
2. works when number of entries is greater than 1
3. never works when prepend is t

Find attached org-capture-cookies-bug.org which I think it makes it very 
easy to reproduce. Tested with ~emacs -Q~ with orgmode 9.7.10 and 
emacs-30 branch with commit 44c2614

Cheers,
pinmacs

[1] I mean, like running this function: (org-update-statistics-cookies nil)

[-- Attachment #1.1.2: org-capture-cookies-bug.org --]
[-- Type: text/org, Size: 1179 bytes --]

#+TODO: TODO | DONE

* inbox ~:prepend nil~ works except first element (?) [3/3] [100%]
:PROPERTIES:
:CUSTOM_ID: inbox_prepend_nil
:END:
** DONE Test title
** DONE Test title
** DONE Test title
* inbox ~:prepend t~ never works (?) [0/0] [0%]
:PROPERTIES:
:CUSTOM_ID: inbox_prepend_t
:END:
** DONE Test title
** DONE Test title
** DONE Test title
* run this

with ~:prepend nil~, cookies are updated, *except for some reason, the first item*

#+name: prepend_t
#+begin_src emacs-lisp :results none
(defun my/goto ()
  (org-link-open-from-string "[[#inbox_prepend_nil]]"))
(setq org-capture-templates
      '(
        ("t" "test" entry (function my/goto)  "** DONE Test title" :immediate-finish t :prepend nil)
        ))

;; run org-capture noninteractive
(org-capture nil "t")
#+end_src

with ~:prepend t~, cookies are *not* updated

#+name: prepend_nil
#+begin_src emacs-lisp :results none
(defun my/goto ()
  (org-link-open-from-string "[[#inbox_prepend_t]]"))
(setq org-capture-templates
      '(
        ("t" "test" entry (function my/goto)  "** DONE Test title" :immediate-finish t :prepend t)
        ))

;; run org-capture noninteractive
(org-capture nil "t")
#+end_src



[-- Attachment #1.1.3: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3323 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: after an org-capture to an inbox entry, statistics-cookies are not updated on certain circumstances
  2024-09-01 20:55 BUG: after an org-capture to an inbox entry, statistics-cookies are not updated on certain circumstances pinmacs
@ 2024-09-08 18:10 ` Ihor Radchenko
  2024-09-09 16:28   ` pinmacs
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2024-09-08 18:10 UTC (permalink / raw)
  To: pinmacs; +Cc: emacs-orgmode

pinmacs@cas.cat writes:

> I am living with this bug since a long time, I thought I was asking 
> maybe something very special.
>
> But then I find on a org-capture that goes to an inbox entry:
>
> 1. if prepend is nil, does not work on the first time (?)
> 2. works when number of entries is greater than 1
> 3. never works when prepend is t
>
> Find attached org-capture-cookies-bug.org which I think it makes it very 
> easy to reproduce. Tested with ~emacs -Q~ with orgmode 9.7.10 and 
> emacs-30 branch with commit 44c2614

I tried to follow the .org file, but everything seems to work fine on my
side. Maybe I do not understand what exactly you expected and what
exactly did not work (what "does not work" even mean?).

May you please provide more detailed instructions on what one needs to
do to see the bug, including which commands to run, and then explain
what you actually see and what you expected?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: after an org-capture to an inbox entry, statistics-cookies are not updated on certain circumstances
  2024-09-08 18:10 ` Ihor Radchenko
@ 2024-09-09 16:28   ` pinmacs
  2024-09-15 10:12     ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: pinmacs @ 2024-09-09 16:28 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

On 2024-09-08 20:10, Ihor Radchenko wrote:
> pinmacs@cas.cat writes:
>
>> I am living with this bug since a long time, I thought I was asking
>> maybe something very special.
>>
>> But then I find on a org-capture that goes to an inbox entry:
>>
>> 1. if prepend is nil, does not work on the first time (?)
>> 2. works when number of entries is greater than 1
>> 3. never works when prepend is t
>>
>> Find attached org-capture-cookies-bug.org which I think it makes it very
>> easy to reproduce. Tested with ~emacs -Q~ with orgmode 9.7.10 and
>> emacs-30 branch with commit 44c2614
> I tried to follow the .org file, but everything seems to work fine on my
> side. Maybe I do not understand what exactly you expected and what
> exactly did not work (what "does not work" even mean?).
>
> May you please provide more detailed instructions on what one needs to
> do to see the bug, including which commands to run, and then explain
> what you actually see and what you expected?
>
Fine

     tested again with =emacs -q= with GNU Emacs 30.0.90 (build 1, 
x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) 
of 2024-08-30


* How to reproduce: 1. if prepend is nil, does not work on the first 
time (?)

Remove all childs of the prepend nil inbox (the first), and refresh with 
C-c C-c so it works like this

     inbox ~:prepend nil~ works except first element (?) [0/0] [100%]

run one time =prepend_t= src block

title now is:

     inbox ~:prepend nil~ works except first element (?) [0/0] [0%]

expected value is the same you would achieve going to end of line of 
inbox title and pressing C-c C-c:

     inbox ~:prepend nil~ works except first element (?) [1/1] [100%]




* How to reproduce: 2. works when number of entries is greater than 1

Following the state after "1. if prepend is nil, does not work on the 
first time (?)",
run one time run one time =prepend_t= src block

title now is:

     inbox ~:prepend nil~ works except first element (?) [2/2] [100%]

and that is the expected value, works as expected




* How to reproduce: 3. never works when prepend is t

Remove all childs of the prepend t inbox (the second), and refresh with 
C-c C-c so it works like this

     inbox ~:prepend t~ never works (?) [0/0] [100%]

run one time =prepend_nil= src block

title now is:

     inbox ~:prepend t~ never works (?) [0/0] [0%]

expected value is the same you would achieve going to end of line of 
inbox title and pressing C-c C-c:

     inbox ~:prepend t~ never works (?) [1/1] [100%]



That's it, le'ts see now if it is clear the bug I am pointing to

Cheers,
pinmacs


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: after an org-capture to an inbox entry, statistics-cookies are not updated on certain circumstances
  2024-09-09 16:28   ` pinmacs
@ 2024-09-15 10:12     ` Ihor Radchenko
  2024-09-15 15:56       ` pinmacs
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2024-09-15 10:12 UTC (permalink / raw)
  To: pinmacs; +Cc: emacs-orgmode

pinmacs <pinmacs@cas.cat> writes:

>> May you please provide more detailed instructions on what one needs to
>> do to see the bug, including which commands to run, and then explain
>> what you actually see and what you expected?
>>
> Fine
>
>      tested again with =emacs -q= with GNU Emacs 30.0.90 (build 1, 
> x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) 
> of 2024-08-30
>
>
> * How to reproduce: 1. if prepend is nil, does not work on the first 
> time (?)
> ...

Thanks! That helped.

I was able to reproduce using stable version of Org mode.
However, the bug is not present on the development version (main
branch).

So, the bug should no longer be present in the next Org mode release.

Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: after an org-capture to an inbox entry, statistics-cookies are not updated on certain circumstances
  2024-09-15 10:12     ` Ihor Radchenko
@ 2024-09-15 15:56       ` pinmacs
  2024-09-16 19:18         ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: pinmacs @ 2024-09-15 15:56 UTC (permalink / raw)
  To: emacs-orgmode

On 2024-09-15 07:12, Ihor Radchenko wrote:
> pinmacs <pinmacs@cas.cat> writes:
>
> Thanks! That helped.
>
> I was able to reproduce using stable version of Org mode.
> However, the bug is not present on the development version (main
> branch).
>
> So, the bug should no longer be present in the next Org mode release.
>
> Canceled.
>

Hi Igor,

Thanks for taking care of these issues!

Here and there [1] I would like to close this thread saying that on a 
particular stable version this is fixed, let me know when this change is 
incorporated in whatever version and I will test it and then I will 
consider this closed from my side

Cheers,
pinmacs

[1] 
https://list.orgmode.org/orgmode/bdab5b42-a661-463c-b30d-9a6161b5c48e@cas.cat/T/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: after an org-capture to an inbox entry, statistics-cookies are not updated on certain circumstances
  2024-09-15 15:56       ` pinmacs
@ 2024-09-16 19:18         ` Ihor Radchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Ihor Radchenko @ 2024-09-16 19:18 UTC (permalink / raw)
  To: pinmacs; +Cc: emacs-orgmode

pinmacs <pinmacs@cas.cat> writes:

>> I was able to reproduce using stable version of Org mode.
>> However, the bug is not present on the development version (main
>> branch).
> ..
> Here and there [1] I would like to close this thread saying that on a 
> particular stable version this is fixed, let me know when this change is 
> incorporated in whatever version and I will test it and then I will 
> consider this closed from my side

That will be Org 9.8. Not soon.

Not Org 9.7 because we only put critical and trivial fixes into bugfix
(9.7.X) releases.

To test things, you can install development version from git repository
or from ELPA devel (see https://protesilaos.com/codelog/2022-05-13-emacs-elpa-devel/)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-16 19:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-01 20:55 BUG: after an org-capture to an inbox entry, statistics-cookies are not updated on certain circumstances pinmacs
2024-09-08 18:10 ` Ihor Radchenko
2024-09-09 16:28   ` pinmacs
2024-09-15 10:12     ` Ihor Radchenko
2024-09-15 15:56       ` pinmacs
2024-09-16 19:18         ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).