Re: [O] Log change TODO state after clock-out

2017-07-29 Thread Roman Rudakov
Hello,
I've tried to remove line (org-inhibit-logging t) locally, it have solved
my problem partially.

If I clock-in and then clock-out the same headline everything is ok (Task 1
in my example)
. But if I clock-in Task 2, Then go to Task 3 and ckock it in, Task 2
clocked out and have only CLOSED log entry, but it doesn't have log about
change state from PROGRESS to DONE.

Example:

* DONE Task 1
CLOSED: [2017-07-29 Sat 16:45]
:LOGBOOK:
- State "DONE"   from "PROGRESS"   [2017-07-29 Sat 16:45]
- State "PROGRESS"   from "TODO"   [2017-07-29 Sat 16:45]
CLOCK: [2017-07-29 Sat 16:45]--[2017-07-29 Sat 16:45] =>  0:00
:END:

* DONE Task 2
CLOSED: [2017-07-29 Sat 16:45]
:LOGBOOK:
- State "PROGRESS"   from "TODO"   [2017-07-29 Sat 16:45]
CLOCK: [2017-07-29 Sat 16:45]--[2017-07-29 Sat 16:45] =>  0:00
:END:

* PROGRESS Task 3
:LOGBOOK:
- State "PROGRESS"   from "TODO"   [2017-07-29 Sat 16:45]
CLOCK: [2017-07-29 Sat 16:45]
:END:


2017-07-28 16:44 GMT+03:00 Nicolas Goaziou :

> Hello,
>
> Рома Рудаков  writes:
>
> > Expected result:
> >
> > * DONE task 1
> >   CLOSED: [2017-07-26 Wed 15:39]
> >   :LOGBOOK:
> >   - State "DONE"   from "PROGRESS"   [2017-07-26 Wed 15:39]
> >   - State "PROGRESS"   from "TODO"   [2017-07-26 Wed 15:37]
> >   CLOCK: [2017-07-26 Wed 15:37]--[2017-07-26 Wed 15:38] =>  0:01
> >   :END:
> > * TODO task 2
> > * TODO task 3
> > * TODO task 4
> >
> >
> > Actual result:
> >
> > * DONE task 1
> >   :LOGBOOK:
> >   - State "PROGRESS"   from "TODO"   [2017-07-26 Wed 15:37]
> >   CLOCK: [2017-07-26 Wed 15:37]--[2017-07-26 Wed 15:38] =>  0:01
> >   :END:
> > * TODO task 2
> > * TODO task 3
> > * TODO task 4
> >
> > There is no CLOSED log entry and change state from PROGRESS to DONE
> > entry.
>
> Logging was inhibited when using `org-clock-out-switch-to-state', but
> not when using `org-clock-in-switch-to-state'. I assume this is a bug,
> so I removed it.
>
> I may be wrong though, so this change is in master only.
>
> Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Bug: org-priority face has extra space at the end starting from version 9.4 [9.4 (9.4-elpaplus @ /home/rrudakov/.emacs.d/elpa/org-plus-contrib-20200914/)]

2020-09-15 Thread Roman Rudakov
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,

I use theme which draw boxes around priority cookie. Before updating to
version 9.4 box was rendered just around square brackets, but since
version 9.4 it has additional space at the end.

I think it's related to the fact that org-priority face definition used
to use separate regex which didn't include space, and now it uses
variable org-priority-regexp which does include additional space
character.

;; Old
(defun org-font-lock-add-priority-faces (limit)
"Add the special priority faces."
(while (re-search-forward "^\\*+ .*?\\(\\[#\\(.\\)\\]\\)" limit t)
(add-text-properties
(match-beginning 1) (match-end 1)
(list 'face (org-get-priority-face (string-to-char (match-string 2)))
'font-lock-fontified t

;; New
(defun org-font-lock-add-priority-faces (limit)
"Add the special priority faces."
(while (re-search-forward org-priority-regexp limit t)
(add-text-properties
(match-beginning 1) (match-end 1)
(list 'face (org-get-priority-face (string-to-char (match-string 2)))
'font-lock-fontified t

(defvar org-priority-regexp ".*?\\(\\[#\\([A-Z0-9]+\\)\\] ?\\)"

Removing space before last question mark fixes my problem, but I'm not
sure it won't affect 
something.[org-mode-priority-9.3.8.png][org-mode-priority-9.4.png]

Emacs : GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 
1.16.0, Xaw3d scroll bars)
of 2020-08-11
Package: Org mode version 9.4 (9.4-elpaplus @ 
/home/rrudakov/.emacs.d/elpa/org-plus-contrib-20200914/)

Re: Bug: org-priority face has extra space at the end starting from version 9.4 [9.4 (9.4-elpaplus @ /home/rrudakov/.emacs.d/elpa/org-plus-contrib-20200914/)]

2020-09-29 Thread Roman Rudakov
"Protesilaos Stavrou"  writes:

> Roman Rudakov  [2020-09-15, 18:50 +]:
>
>> I use theme which draw boxes around priority cookie. Before updating to
>> version 9.4 box was rendered just around square brackets, but since
>> version 9.4 it has additional space at the end.
>>
>> I think it's related to the fact that org-priority face definition used
>> to use separate regex which didn't include space, and now it uses
>> variable org-priority-regexp which does include additional space
>> character.
>>
>> [...]
>
> This issue is noticeable with any face properties for 'org-priority'
> such as box, background, underline, overline.
>
> Just to add a reproducible recipe for this case.
>
> On 'emacs -Q' running Org 9.4:
>
> + C-x C-f /tmp/test.org
> + Insert a heading, like:
>
> * TODO [#A] This is a test
>
> …see attached screenshot with "default" state.
>
> * Now evaluate the following expression:
>
> (set-face-attribute 'org-priority nil :underline t)
>
> …see attached screenshot with "edited" state.
>
> --
> Protesilaos Stavrou
> protesilaos.com

Hello,

I think proper value for `org-priority-regex` should be
".*?\\(\\[#\\([A-Z0-9]+\\)\\]\\) ?", extra space should be moved out of
the brackets, It won't break anything and face definition will be
correct.

Best regards.




[BUG] org-insert-heading-respect-content doesn't always insert TODO heading [9.5.4 (release_9.5.4-17-g6e991f @ /usr/local/Cellar/emacs-plus@29/29.0.50/share/emacs/29.0.50/lisp/org/)]

2022-08-17 Thread Roman Rudakov
Hello!

Steps to reproduce:
1. Create an org heading and set state to something but TODO or DONE
(for example PROGRESS).
2. Call the function org-insert-todo-heading-respect-content

Expected result:

New heading with TODO state in inserted

Actual result:

New heading is inserted with the same state as previous heading.

I noticed that internally this function calls org-insert-todo-heading
and pass arguments in a wrong order:

Actual function call:

(org-insert-todo-heading force-state '(4))

Should be:

(org-insert-todo-heading '(4)) force-state)


Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin21.6.0, NS
appkit-2113.60 Version 12.5 (Build 21G72))
 of 2022-08-14
Package: Org mode version 9.5.4 (release_9.5.4-17-g6e991f @
/usr/local/Cellar/emacs-plus@29/29.0.50/share/emacs/29.0.50/lisp/org/)