From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lester Longley Subject: Re: Bug: assignment to named column - not working as expected [9.3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/)] Date: Sat, 29 Feb 2020 11:45:00 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000081bcb0059fb9ad14" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56300) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j85Er-00040G-9S for emacs-orgmode@gnu.org; Sat, 29 Feb 2020 11:45:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j85Eo-000843-4o for emacs-orgmode@gnu.org; Sat, 29 Feb 2020 11:45:16 -0500 Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]:37193) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j85En-00083O-Ph for emacs-orgmode@gnu.org; Sat, 29 Feb 2020 11:45:14 -0500 Received: by mail-qv1-xf2b.google.com with SMTP id c19so695582qvv.4 for ; Sat, 29 Feb 2020 08:45:13 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --00000000000081bcb0059fb9ad14 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, The functionality which I was trying is documented as not supported: http://www.gnu.org/software/emacs/manual/html_node/org/Column-formulas.html The left-hand side of a column formula cannot be the name of column, it must be the numeric column reference or $>. Regards, Lester On Sat, Feb 29, 2020 at 9:39 AM Lester Longley wrote: > Hello, > > I'm trying to use named fields. > > This works: > > | ! | col2 | col3 | > | # | abc | abc | > #+TBLFM: $3 =3D $col2 > > However, assignment to named field "$col3": > > | ! | col2 | col3 | > | # | abc | | > #+TBLFM: $col3 =3D $col2 > > ... results in error "Unknown field: col3". > > I was expecting assignment to the named column to work, as per > https://orgmode.org/manual/Advanced-features.html > > > =E2=80=98!=E2=80=99 > > The fields in this line define names for the columns, so that you may > refer to a column as =E2=80=98$Tot=E2=80=99 instead of =E2=80=98$6=E2=80= =99. > =E2=80=98^=E2=80=99 > > This row defines names for the fields *above* the row. With such a > definition, any formula in the table may use =E2=80=98$m1=E2=80=99 to ref= er to the value =E2=80=98 > 10=E2=80=99. Also, if you assign a formula to a names field, it is stored= as =E2=80=98$name > =3D ...=E2=80=99. > > However, the documentation doesn't specifically indicate that assignment > to "$name" should work w/ "!"--it's mentioned only w/ "^" (and works fine > for this case)--so possibly what I'm trying simply isn't supported (i.e., > not a bug). Please pardon if that's not right expectation. > > Thank you for your help. > > Regards, > Lester > > Emacs : GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) > of 2017-09-15, modified by Debian > Package: Org mode version 9.3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/) > > current state: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > (setq > org-tab-first-hook '(org-babel-hide-result-toggle-maybe > org-babel-header-arg-expand) > org-speed-command-hook '(org-speed-command-activate > org-babel-speed-command-activate) > org-occur-hook '(org-first-headline-recenter) > org-metaup-hook '(org-babel-load-in-session-maybe) > org-confirm-shell-link-function 'yes-or-no-p > org-src-mode-hook '(org-src-babel-configure-edit-buffer > org-src-mode-configure-edit-buffer) > org-agenda-before-write-hook '(org-agenda-add-entry-text) > org-babel-pre-tangle-hook '(save-buffer) > org-mode-hook '((closure > (org--rds reftex-docstruct-symbol > org-element-greater-elements org-clock-history > org-agenda-current-date org-with-time org-defdecode org-def > org-read-date-inactive org-ans2 org-ans1 > org-columns-current-fmt-compiled org-clock-current-task > org-clock-effort org-agenda-skip-function > org-agenda-skip-comment-trees org-agenda-archives-mode > org-end-time-was-given org-time-was-given > org-log-note-extra org-log-note-purpose > org-log-post-message org-last-inserted-timestamp > org-last-changed-timestamp > org-entry-property-inherited-from org-blocked-by-checkboxes > org-state org-agenda-headline-snapshot-before-repeat > org-capture-last-stored-marker org-agenda-start-on-weekday > org-agenda-buffer-tmp-name org-priority-regexp > buffer-face-mode-face org-tbl-menu org-org-menu > org-struct-menu org-entities org-last-state > org-id-track-globally org-clock-start-time texmathp-why > remember-data-file > org-agenda-tags-todo-honor-ignore-options > iswitchb-temp-buflist calc-embedded-open-mode > calc-embedded-open-formula calc-embedded-close-formula > align-mode-rules-list org-emphasis-alist > org-emphasis-regexp-components > org-export-registered-backends org-modules > org-babel-load-languages org-indent-indentation-per-level > org-element-paragraph-separate ffap-url-regexp > org-inlinetask-min-level t) > nil > (add-hook (quote change-major-mode-hook) > (quote org-show-all) (quote append) (quote local)) > ) > (closure > (org-src-window-setup *this* > org-babel-confirm-evaluate-answer-no > org-src-preserve-indentation org-src-lang-modes > org-edit-src-content-indentation org-babel-library-of-babel > t) > nil > (add-hook (quote change-major-mode-hook) > (quote org-babel-show-result-all) (quote append) > (quote local)) > ) > org-babel-result-hide-spec org-babel-hide-all-hashes) > org-bibtex-headline-format-function '(closure > (org-id-locations > org-agenda-search-view-always-boolean > org-agenda-overriding-header t) > (entry) (cdr (assq :title entry))) > org-archive-hook '(org-attach-archive-delete-maybe) > org-cycle-hook '(org-cycle-hide-archived-subtrees > org-cycle-show-empty-lines > org-optimize-window-after-visibility-change) > org-link-shell-confirm-function 'yes-or-no-p > org-link-elisp-confirm-function 'yes-or-no-p > org-confirm-elisp-link-function 'yes-or-no-p > org-metadown-hook '(org-babel-pop-to-session-maybe) > org-link-parameters '(("attachment" :follow org-attach-open-link :export > org-attach-export-link :complete > org-attach-complete-link) > ("id" :follow org-id-open) > ("eww" :follow eww :store org-eww-store-link) > ("rmail" :follow org-rmail-open :store > org-rmail-store-link) > ("mhe" :follow org-mhe-open :store org-mhe-store-link) > ("irc" :follow org-irc-visit :store org-irc-store-link > :export org-irc-export) > ("info" :follow org-info-open :export org-info-export > :store org-info-store-link) > ("gnus" :follow org-gnus-open :store > org-gnus-store-link) > ("docview" :follow org-docview-open :export > org-docview-export :store org-docview-store-link) > ("bibtex" :follow org-bibtex-open :store > org-bibtex-store-link) > ("bbdb" :follow org-bbdb-open :export org-bbdb-export > :complete org-bbdb-complete-link :store > org-bbdb-store-link) > ("w3m" :store org-w3m-store-link) ("file+sys") > ("file+emacs") ("shell" :follow org-link--open-shell) > ("news" :follow > (closure > ((scheme . "news") (--dolist-tail--) org-ts-regexp > org-time-stamp-formats org-src-source-file-name > org-outline-regexp-bol org-inhibit-startup > org-id-link-to-org-use-id org-highlight-links > org-comment-string org-agenda-buffer-name > clean-buffer-list-kill-buffer-names t) > (url) (browse-url (concat scheme ":" url))) > ) > ("mailto" :follow > (closure > ((scheme . "mailto") (--dolist-tail--) org-ts-regexp > org-time-stamp-formats org-src-source-file-name > org-outline-regexp-bol org-inhibit-startup > org-id-link-to-org-use-id org-highlight-links > org-comment-string org-agenda-buffer-name > clean-buffer-list-kill-buffer-names t) > (url) (browse-url (concat scheme ":" url))) > ) > ("https" :follow > (closure > ((scheme . "https") (--dolist-tail--) org-ts-regexp > org-time-stamp-formats org-src-source-file-name > org-outline-regexp-bol org-inhibit-startup > org-id-link-to-org-use-id org-highlight-links > org-comment-string org-agenda-buffer-name > clean-buffer-list-kill-buffer-names t) > (url) (browse-url (concat scheme ":" url))) > ) > ("http" :follow > (closure > ((scheme . "http") (--dolist-tail--) org-ts-regexp > org-time-stamp-formats org-src-source-file-name > org-outline-regexp-bol org-inhibit-startup > org-id-link-to-org-use-id org-highlight-links > org-comment-string org-agenda-buffer-name > clean-buffer-list-kill-buffer-names t) > (url) (browse-url (concat scheme ":" url))) > ) > ("ftp" :follow > (closure > ((scheme . "ftp") (--dolist-tail--) org-ts-regexp > org-time-stamp-formats org-src-source-file-name > org-outline-regexp-bol org-inhibit-startup > org-id-link-to-org-use-id org-highlight-links > org-comment-string org-agenda-buffer-name > clean-buffer-list-kill-buffer-names t) > (url) (browse-url (concat scheme ":" url))) > ) > ("help" :follow org-link--open-help) > ("file" :complete org-link-complete-file) > ("elisp" :follow org-link--open-elisp) > ("doi" :follow org-link--open-doi)) > org-clock-out-hook '(org-clock-remove-empty-clock-drawer) > ) > --00000000000081bcb0059fb9ad14 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

The functionality which I was tr= ying is documented as not supported:

http://www= .gnu.org/software/emacs/manual/html_node/org/Column-formulas.html

The left-hand side of a column formula cannot be the name of c= olumn, it must be the numeric column reference or=C2=A0$>= .<= /div>

Regards,
Lester

On= Sat, Feb 29, 2020 at 9:39 AM Lester Longley <lester@ieee.org> wrote:
Hello,

I'm = trying to use named fields.

This works:
=
| ! | col2 | col3 |
| # | abc =C2=A0| abc =C2=A0|
#+TB= LFM: $3 =3D $col2

However, assignment to named field "$col3&quo= t;:

| ! | col2 | col3 |
| # | abc =C2=A0|=C2=A0 |
#+TBLFM: $co= l3 =3D $col2

... results in error "Unknown field: col3".

I was expecting assignment to the named column to w= ork, as per=C2=A0https://orgmode.org/manual/Advanced-features.html=

=E2=80=98!=E2=80=99
The fields in this line define names for the columns, so that you may refe= r to a column as =E2=80=98$Tot=E2=80=99 instead of =E2=80=98$6=E2=80=99.

=E2=80=98^=E2=80=99=

This row defines names for the fields=C2=A0above=C2=A0the row. With such a definition, any formula in the table may use = =E2=80=98$m1=E2=80=99 to refer to the value =E2=80=9810<= /samp>=E2=80=99. Also, if you assign a formula to a names field, it is stor= ed as =E2=80=98$name =3D ...=E2=80=99.

However, the documentation doesn't specifically indi= cate that assignment to "$name" should work w/ "!"--it&= #39;s mentioned only w/ "^" (and works fine for this case)--so po= ssibly what I'm trying simply isn't supported (i.e., not a bug).=C2= =A0 Please pardon if that's not right expectation.

Thank you f= or=C2=A0your help.

Regards,
Lester
Emacs =C2=A0: GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11= )
=C2=A0of 2017-09-15, modified by Debian
Package: Org mode version 9= .3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/)

current state:
=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(setq
=C2=A0org-tab-first-hoo= k '(org-babel-hide-result-toggle-maybe
=C2=A0 =C2=A0 =C2=A0org-ba= bel-header-arg-expand)
=C2=A0org-speed-command-hook '(org-speed-comm= and-activate
=C2=A0org-babel-speed-command-activate)
=C2=A0org-oc= cur-hook '(org-first-headline-recenter)
=C2=A0org-metaup-hook '(= org-babel-load-in-session-maybe)
=C2=A0org-confirm-shell-link-function &= #39;yes-or-no-p
=C2=A0org-src-mode-hook '(org-src-babel-configure-ed= it-buffer
=C2=A0 =C2=A0 org-src-mode-configure-edit-buffer)
=C2=A0= org-agenda-before-write-hook '(org-agenda-add-entry-text)
=C2=A0org-= babel-pre-tangle-hook '(save-buffer)
=C2=A0org-mode-hook '((clos= ure
=C2=A0(org--rds reftex-docstruct-symbol
=C2=A0 org-element-= greater-elements org-clock-history
=C2=A0 org-agenda-current-date org= -with-time org-defdecode org-def
=C2=A0 org-read-date-inactive org-an= s2 org-ans1
=C2=A0 org-columns-current-fmt-compiled org-clock-current= -task
=C2=A0 org-clock-effort org-agenda-skip-function
=C2=A0 o= rg-agenda-skip-comment-trees org-agenda-archives-mode
=C2=A0 org-end-= time-was-given org-time-was-given
=C2=A0 org-log-note-extra org-log-n= ote-purpose
=C2=A0 org-log-post-message org-last-inserted-timestamp =C2=A0 org-last-changed-timestamp
=C2=A0 org-entry-property-inhe= rited-from org-blocked-by-checkboxes
=C2=A0 org-state org-agenda-head= line-snapshot-before-repeat
=C2=A0 org-capture-last-stored-marker org= -agenda-start-on-weekday
=C2=A0 org-agenda-buffer-tmp-name org-priori= ty-regexp
=C2=A0 buffer-face-mode-face org-tbl-menu org-org-menu
= =C2=A0 org-struct-menu org-entities org-last-state
=C2=A0 org-id-tr= ack-globally org-clock-start-time texmathp-why
=C2=A0 remember-data-f= ile
=C2=A0 org-agenda-tags-todo-honor-ignore-options
=C2=A0 isw= itchb-temp-buflist calc-embedded-open-mode
=C2=A0 calc-embedded-open-= formula calc-embedded-close-formula
=C2=A0 align-mode-rules-list org-= emphasis-alist
=C2=A0 org-emphasis-regexp-components
=C2=A0 org= -export-registered-backends org-modules
=C2=A0 org-babel-load-languag= es org-indent-indentation-per-level
=C2=A0 org-element-paragraph-sepa= rate ffap-url-regexp
=C2=A0 org-inlinetask-min-level t)
=C2=A0n= il
=C2=A0(add-hook (quote change-major-mode-hook)
=C2=A0 (quote= org-show-all) (quote append) (quote local))
=C2=A0)
(closure =C2=A0(org-src-window-setup *this*
=C2=A0 org-babel-confirm-eval= uate-answer-no
=C2=A0 org-src-preserve-indentation org-src-lang-modes=
=C2=A0 org-edit-src-content-indentation org-babel-library-of-babel =C2=A0 t)
=C2=A0nil
=C2=A0(add-hook (quote change-major-mo= de-hook)
=C2=A0 (quote org-babel-show-result-all) (quote append)
= =C2=A0 (quote local))
=C2=A0)
org-babel-result-hide-spec org-= babel-hide-all-hashes)
=C2=A0org-bibtex-headline-format-function '(c= losure
=C2=A0 =C2=A0 =C2=A0 (org-id-locations
org-agenda-se= arch-view-always-boolean
org-agenda-overriding-header t)
= =C2=A0 =C2=A0 =C2=A0 (entry) (cdr (assq :title entry)))
=C2=A0org-archiv= e-hook '(org-attach-archive-delete-maybe)
=C2=A0org-cycle-hook '= (org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
=C2=A0or= g-optimize-window-after-visibility-change)
=C2=A0org-link-shell-confirm-= function 'yes-or-no-p
=C2=A0org-link-elisp-confirm-function 'yes= -or-no-p
=C2=A0org-confirm-elisp-link-function 'yes-or-no-p
=C2= =A0org-metadown-hook '(org-babel-pop-to-session-maybe)
=C2=A0org-lin= k-parameters '(("attachment" :follow org-attach-open-link :ex= port
org-attach-export-link :complete
org-attach-complete-link)=
=C2=A0 =C2=A0 =C2=A0 ("id" :follow org-id-open)
=C2= =A0 =C2=A0 =C2=A0 ("eww" :follow eww :store org-eww-store-link) =C2=A0 =C2=A0 =C2=A0 ("rmail" :follow org-rmail-open :store<= br> org-rmail-store-link)
=C2=A0 =C2=A0 =C2=A0 ("mhe" :fo= llow org-mhe-open :store org-mhe-store-link)
=C2=A0 =C2=A0 =C2=A0 (&q= uot;irc" :follow org-irc-visit :store org-irc-store-link
:export= org-irc-export)
=C2=A0 =C2=A0 =C2=A0 ("info" :follow org-i= nfo-open :export org-info-export
:store org-info-store-link)
= =C2=A0 =C2=A0 =C2=A0 ("gnus" :follow org-gnus-open :store
o= rg-gnus-store-link)
=C2=A0 =C2=A0 =C2=A0 ("docview" :follow= org-docview-open :export
org-docview-export :store org-docview-store= -link)
=C2=A0 =C2=A0 =C2=A0 ("bibtex" :follow org-bibtex-op= en :store
org-bibtex-store-link)
=C2=A0 =C2=A0 =C2=A0 ("bb= db" :follow org-bbdb-open :export org-bbdb-export
:complete org-= bbdb-complete-link :store
org-bbdb-store-link)
=C2=A0 =C2=A0 = =C2=A0 ("w3m" :store org-w3m-store-link) ("file+sys") =C2=A0 =C2=A0 =C2=A0 ("file+emacs") ("shell" :foll= ow org-link--open-shell)
=C2=A0 =C2=A0 =C2=A0 ("news" :foll= ow
(closure
((scheme . "news") (--dolist-tail--) org= -ts-regexp
=C2=A0org-time-stamp-formats org-src-source-file-name
= =C2=A0org-outline-regexp-bol org-inhibit-startup
=C2=A0org-id-li= nk-to-org-use-id org-highlight-links
=C2=A0org-comment-string org-ag= enda-buffer-name
=C2=A0clean-buffer-list-kill-buffer-names t)
= (url) (browse-url (concat scheme ":" url)))
)
=C2=A0= =C2=A0 =C2=A0 ("mailto" :follow
(closure
((scheme .= "mailto") (--dolist-tail--) org-ts-regexp
=C2=A0org-time-= stamp-formats org-src-source-file-name
=C2=A0org-outline-regexp-bol = org-inhibit-startup
=C2=A0org-id-link-to-org-use-id org-highlight-li= nks
=C2=A0org-comment-string org-agenda-buffer-name
=C2=A0cle= an-buffer-list-kill-buffer-names t)
(url) (browse-url (concat scheme= ":" url)))
)
=C2=A0 =C2=A0 =C2=A0 ("https"= :follow
(closure
((scheme . "https") (--dolist-tail= --) org-ts-regexp
=C2=A0org-time-stamp-formats org-src-source-file-n= ame
=C2=A0org-outline-regexp-bol org-inhibit-startup
=C2=A0or= g-id-link-to-org-use-id org-highlight-links
=C2=A0org-comment-string= org-agenda-buffer-name
=C2=A0clean-buffer-list-kill-buffer-names t)=
(url) (browse-url (concat scheme ":" url)))
)
= =C2=A0 =C2=A0 =C2=A0 ("http" :follow
(closure
((sch= eme . "http") (--dolist-tail--) org-ts-regexp
=C2=A0org-ti= me-stamp-formats org-src-source-file-name
=C2=A0org-outline-regexp-b= ol org-inhibit-startup
=C2=A0org-id-link-to-org-use-id org-highlight= -links
=C2=A0org-comment-string org-agenda-buffer-name
=C2=A0= clean-buffer-list-kill-buffer-names t)
(url) (browse-url (concat sch= eme ":" url)))
)
=C2=A0 =C2=A0 =C2=A0 ("ftp"= ; :follow
(closure
((scheme . "ftp") (--dolist-tail-= -) org-ts-regexp
=C2=A0org-time-stamp-formats org-src-source-file-na= me
=C2=A0org-outline-regexp-bol org-inhibit-startup
=C2=A0org= -id-link-to-org-use-id org-highlight-links
=C2=A0org-comment-string = org-agenda-buffer-name
=C2=A0clean-buffer-list-kill-buffer-names t)<= br> (url) (browse-url (concat scheme ":" url)))
)
= =C2=A0 =C2=A0 =C2=A0 ("help" :follow org-link--open-help)
= =C2=A0 =C2=A0 =C2=A0 ("file" :complete org-link-complete-file) =C2=A0 =C2=A0 =C2=A0 ("elisp" :follow org-link--open-elisp) =C2=A0 =C2=A0 =C2=A0 ("doi" :follow org-link--open-doi))
= =C2=A0org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
=C2= =A0)
--00000000000081bcb0059fb9ad14--