emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: (org-clock-in 64) leads to redundant clock entries [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
@ 2014-08-27  8:23 REN Lifeng
  2014-08-28  9:52 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: REN Lifeng @ 2014-08-27  8:23 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Maybe I missed something obvious, but I find c-u c-u c-u c-c c-x c-i does
not work as the docstring says. Steps to reproduce the problem follows.

- emacs -q
- (find-file "test.org")
- insert a header, clock in (say 15:39)
- clock out after more than 1 minute (say 15:43)
- insert another header
- (org-clock-in 64)

I expect there be one and only one clock entry (15:43). But what I got was 2
entries. The org file is something like the following.

* head one
  CLOCK: [2014-08-27 Wed 15:39]--[2014-08-27 Wed 15:43] =>  0:04
* (org-clock-in 64) leads to redundant clock entry
  CLOCK: [2014-08-27 Wed 15:44]
  CLOCK: [2014-08-27 Wed 15:43]

The following lines in org-clock.el bother me a little.

      (when (equal select '(64))
    ;; Set start-time to `org-clock-out-time'
    (let ((org-clock-continuously t))
      (org-clock-in nil org-clock-out-time)))

Why does it call itself recursively instread of simply setting parameter
start-time to org-clock-out-time?

Emacs  : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2)
 of 2014-06-07 on barber, modified by Debian
Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @
/usr/share/emacs/24.3/lisp/org/)
-- 
REN Lifeng

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

* Re: Bug: (org-clock-in 64) leads to redundant clock entries [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
  2014-08-27  8:23 Bug: (org-clock-in 64) leads to redundant clock entries [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)] REN Lifeng
@ 2014-08-28  9:52 ` Nicolas Goaziou
  2014-08-29  2:06   ` REN Lifeng
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2014-08-28  9:52 UTC (permalink / raw)
  To: REN Lifeng; +Cc: emacs-orgmode

Hello,

REN Lifeng <renlifeng@gmail.com> writes:

> Maybe I missed something obvious, but I find c-u c-u c-u c-c c-x c-i does
> not work as the docstring says. Steps to reproduce the problem follows.
>
> - emacs -q
> - (find-file "test.org")
> - insert a header, clock in (say 15:39)
> - clock out after more than 1 minute (say 15:43)
> - insert another header
> - (org-clock-in 64)
>
> I expect there be one and only one clock entry (15:43). But what I got was 2
> entries. The org file is something like the following.
>
> * head one
>   CLOCK: [2014-08-27 Wed 15:39]--[2014-08-27 Wed 15:43] =>  0:04
> * (org-clock-in 64) leads to redundant clock entry
>   CLOCK: [2014-08-27 Wed 15:44]
>   CLOCK: [2014-08-27 Wed 15:43]
>
> The following lines in org-clock.el bother me a little.
>
>       (when (equal select '(64))
>     ;; Set start-time to `org-clock-out-time'
>     (let ((org-clock-continuously t))
>       (org-clock-in nil org-clock-out-time)))
>
> Why does it call itself recursively instread of simply setting parameter
> start-time to org-clock-out-time?
>
> Emacs  : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2)
>  of 2014-06-07 on barber, modified by Debian
> Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @
> /usr/share/emacs/24.3/lisp/org/)

I cannot reproduce it in latest Org.


Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: (org-clock-in 64) leads to redundant clock entries [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
  2014-08-28  9:52 ` Nicolas Goaziou
@ 2014-08-29  2:06   ` REN Lifeng
  2014-08-29 10:01     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: REN Lifeng @ 2014-08-29  2:06 UTC (permalink / raw)
  To: REN Lifeng, emacs-orgmode

On Thu, Aug 28, 2014 at 5:52 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
> REN Lifeng <renlifeng@gmail.com> writes:
>
>> Maybe I missed something obvious, but I find c-u c-u c-u c-c c-x c-i does
>> not work as the docstring says. Steps to reproduce the problem follows.
>>
>> - emacs -q
>> - (find-file "test.org")
>> - insert a header, clock in (say 15:39)
>> - clock out after more than 1 minute (say 15:43)
>> - insert another header
>> - (org-clock-in 64)
This should be c-u c-u c-u c-c c-x c-i
>>
>> I expect there be one and only one clock entry (15:43). But what I got was 2
>> entries. The org file is something like the following.
>>
>> ....
>>
>> Emacs  : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2)
>>  of 2014-06-07 on barber, modified by Debian
>> Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @
>> /usr/share/emacs/24.3/lisp/org/)
>
> I cannot reproduce it in latest Org.
>
>
> Regards,
>
> --
> Nicolas Goaziou

Sorry. I gave the wrong steps. The last step should be C-u C-u C-u C-c
C-x C-i. Could you try again?

Now I have switched to Org-mode 8.3beta
(release_8.3beta-294-gccf5228.3b), but the problem remains.

Thanks
--
REN Lifeng

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

* Re: Bug: (org-clock-in 64) leads to redundant clock entries [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
  2014-08-29  2:06   ` REN Lifeng
@ 2014-08-29 10:01     ` Nicolas Goaziou
  2014-08-29 13:41       ` REN Lifeng
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2014-08-29 10:01 UTC (permalink / raw)
  To: REN Lifeng; +Cc: emacs-orgmode

REN Lifeng <renlifeng@gmail.com> writes:

> Sorry. I gave the wrong steps. The last step should be C-u C-u C-u C-c
> C-x C-i. Could you try again?

This is what I did. I still cannot reproduce your problem. I also tried
different values for `org-clock-into-drawer', namely nil, t and "CLOCK",
to no avail.


Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: (org-clock-in 64) leads to redundant clock entries [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
  2014-08-29 10:01     ` Nicolas Goaziou
@ 2014-08-29 13:41       ` REN Lifeng
  0 siblings, 0 replies; 5+ messages in thread
From: REN Lifeng @ 2014-08-29 13:41 UTC (permalink / raw)
  To: REN Lifeng, emacs-orgmode

I have tried in the cleanest environment I could think of, but still
get duplicated clock line. Here are the steps.

- CTRL+ALT+F1
  login to get a console
- env -i TERM=linux HOME=/tmp bash --login --norc --noprofile
  almost empty enviroment, except TERM and HOME, which emacs need
- git clone
  git HEAD, ccf52269aa670ef6f46012bafdec90aee953282b,
  Mon Aug 25 18:16:01 2014 +0200.
- cd org-mode; make autoloads; rm lisp/*.elc
  without make autoloads, org-clock-in will not be available.
- emacs -nw -q --no-site-file -l minimal-org.el
  minimal-org.el as said in section 1.4 Feedback.
  what added to load-path is org-mode/lisp. org-mode is the freshly
cloned work copy.
- create a new .org file
- add one header
- clock in
- add another header
- clock out
- c-u c-u c-u c-c c-x c-i

Are there any other place where an error in my Emacs or Org mode setup
might hide?

I do not know if these are relevant. But if I replace the recursively
call with setq, there will be no duplicated line.

There is a similar situation with superfluous clock lines. After
idling for more than org-clock-idle-time, there will be multiple
"[jkKgGSscCiq]?" question waiting for me in mini buffer. After
resolving 10, 10.1, 11 minutes of idle time, I get, again, multiple
clock lines, some of which contains start time bigger than end time.

I suppose the 2 lines bellow are meant to prevent re-entering
org-resolve-clocks-if-idle.

    876:  (let ((org-clock-resolving-clocks t))
   1056:    (let ((org-clock-resolving-clocks t))

But they do not suffice in my case. I have to replace (run-with-timer
60 60 with (run-with-time 60 nil, and add another timer at the end of
org-resolve-clocks-if-idle to be asked only once. Shadowing the value
with local one is not enough.

Does my emacs use different thread / variable binding / foo bar model
than yours? My Emacs Version is GNU Emacs 24.3.1 (x86_64-pc-linux-gnu,
GTK+ Version 3.12.2) of 2014-06-07 on barber, modified by Debian

On Fri, Aug 29, 2014 at 6:01 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> REN Lifeng <renlifeng@gmail.com> writes:
>
>> Sorry. I gave the wrong steps. The last step should be C-u C-u C-u C-c
>> C-x C-i. Could you try again?
>
> This is what I did. I still cannot reproduce your problem. I also tried
> different values for `org-clock-into-drawer', namely nil, t and "CLOCK",
> to no avail.
>
>
> Regards,
>
> --
> Nicolas Goaziou

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

end of thread, other threads:[~2014-08-29 13:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-27  8:23 Bug: (org-clock-in 64) leads to redundant clock entries [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)] REN Lifeng
2014-08-28  9:52 ` Nicolas Goaziou
2014-08-29  2:06   ` REN Lifeng
2014-08-29 10:01     ` Nicolas Goaziou
2014-08-29 13:41       ` REN Lifeng

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).