From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23890: 25.0.94; Org-mode Table does not copy time interval correctly Date: Mon, 04 Jul 2016 17:49:20 +0300 Message-ID: <83inwlpifj.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1467643824 5257 80.91.229.3 (4 Jul 2016 14:50:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2016 14:50:24 +0000 (UTC) Cc: 23890@debbugs.gnu.org To: Rares Vernica Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 04 16:50:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bK5CP-0005Pu-R1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jul 2016 16:50:13 +0200 Original-Received: from localhost ([::1]:48385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK5CO-00051C-VB for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jul 2016 10:50:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK5CI-0004zh-JX for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2016 10:50:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK5CE-0004bx-EM for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2016 10:50:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK5CE-0004bo-At for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2016 10:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bK5CD-0000Du-Sl for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2016 10:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jul 2016 14:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23890 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23890-submit@debbugs.gnu.org id=B23890.1467643791838 (code B ref 23890); Mon, 04 Jul 2016 14:50:01 +0000 Original-Received: (at 23890) by debbugs.gnu.org; 4 Jul 2016 14:49:51 +0000 Original-Received: from localhost ([127.0.0.1]:37220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bK5C3-0000DR-LZ for submit@debbugs.gnu.org; Mon, 04 Jul 2016 10:49:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bK5C1-0000DF-A8 for 23890@debbugs.gnu.org; Mon, 04 Jul 2016 10:49:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK5Bs-0004Zj-0U for 23890@debbugs.gnu.org; Mon, 04 Jul 2016 10:49:43 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK5Br-0004Zf-TL; Mon, 04 Jul 2016 10:49:39 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1838 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bK5Br-0007i2-1h; Mon, 04 Jul 2016 10:49:39 -0400 In-reply-to: (message from Rares Vernica on Sun, 3 Jul 2016 22:30:08 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120398 Archived-At: > From: Rares Vernica > Date: Sun, 3 Jul 2016 22:30:08 -0700 > > In the following table: > > | [2016-07-03 Sun]--[2016-07-04 Mon] | 1d | d | > | [2016-07-03 Sun]--[2016-07-05 Tue] | 2d | 2 d | > #+TBLFM: $3=$2 > > The second column is computed by pressing C-u C-c C-y. This sequence > calculates the time difference between the time-stamps in the previous > column and inserts the difference in the current column. This is fine. > > Now, for the third column, I insert the formula listed at the bottom of > the table. Once applied, the result of the formula for the fist row is > just "d" instead of "1d". So, it seems that the value is not copied > correctly. > > This seems to work fine if the time-stamp range is greater than one > day. Also, for the second row, the value is copied correctly but there > is an extra " " inserted between the number and the "d" letter. This > might not be desirable. > > Appending "D" at the end of the formula, yields the same result: > > | [2016-07-03 Sun]--[2016-07-04 Mon] | 1d | d | > | [2016-07-03 Sun]--[2016-07-05 Tue] | 2d | 2 d | > #+TBLFM: $3=$2;D > > I also tried appending "T" at the end of the formula: > > | [2016-07-03 Sun]--[2016-07-04 Mon] | 1d | 00:00:01 | > | [2016-07-03 Sun]--[2016-07-05 Tue] | 2d | 00:00:02 | > #+TBLFM: $3=$2;T > > The numeric value is copied correctly but the days are now changed to seconds. Thanks, but I think you should first report this to the Org developers. Come back here if they say this is a problem in core Emacs, not in Org code.