emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Formula `vcount' fails to count values in date format [8.2.6 (8.2.6-dist @ d:/opt/emacs/site-lisp/org/)]
@ 2014-05-19  7:24 Gang Chen
  2014-05-20 20:03 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Gang Chen @ 2014-05-19  7:24 UTC (permalink / raw)
  To: emacs-orgmode

Emacs  : GNU Emacs 24.3.1 (i386-mingw-nt5.1.2600)
 of 2013-03-18 on MARVIN
Package: Org-mode version 8.2.6 (8.2.6-dist @ d:/opt/emacs/site-lisp/org/)

Hello, I have a problem when using `vcount' in table.

As the following table:

#+BEGIN_SRC
|   |       date |
|---+------------|
| * | 2014-01-01 |
| * | 2014-01-03 |
|---+------------|
| _ |        Cnt |
| * |          1 |
#+TBLFM: $Cnt=vcount(@I..@II)
#+END_SRC

After evaluation of the formula of $Cnt, the value is 1, not 2.

I found line 2715 of file org-table.el:

#+BEGIN_SRC
(setq form (replace-regexp-in-string org-ts-regexp3 "<\\1>" form))
#+END_SRC

change the value of `form' from `vcount([2014-01-01,2014-01-03]' to
`vcount(<2014-01-01,>)'. Is this the expected behavior?

Thank you very much in advance!

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

* Re: Bug: Formula `vcount' fails to count values in date format [8.2.6 (8.2.6-dist @ d:/opt/emacs/site-lisp/org/)]
  2014-05-19  7:24 Bug: Formula `vcount' fails to count values in date format [8.2.6 (8.2.6-dist @ d:/opt/emacs/site-lisp/org/)] Gang Chen
@ 2014-05-20 20:03 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2014-05-20 20:03 UTC (permalink / raw)
  To: Gang Chen; +Cc: emacs-orgmode

Hi Gang,

Gang Chen <goncha@gmail.com> writes:

> I found line 2715 of file org-table.el:
>
> #+BEGIN_SRC
> (setq form (replace-regexp-in-string org-ts-regexp3 "<\\1>" form))
> #+END_SRC
>
> change the value of `form' from `vcount([2014-01-01,2014-01-03]' to
> `vcount(<2014-01-01,>)'. Is this the expected behavior?

Clearly not -- I fixed this in maint, thanks for reporting it!

-- 
 Bastien

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

end of thread, other threads:[~2014-05-20 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19  7:24 Bug: Formula `vcount' fails to count values in date format [8.2.6 (8.2.6-dist @ d:/opt/emacs/site-lisp/org/)] Gang Chen
2014-05-20 20:03 ` Bastien

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