* Failed to create radio tables @ 2010-07-09 5:55 Angel Popov 2010-07-10 13:47 ` Bernt Hansen ` (3 more replies) 0 siblings, 4 replies; 14+ messages in thread From: Angel Popov @ 2010-07-09 5:55 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 445 bytes --] Hi, I am following example on radio tables but it looks that it does not work. I copied % BEGIN RECEIVE ORGLST to-buy % END RECEIVE ORGLST to-buy \begin{comment} #+ORGLIST: SEND to-buy orgtbl-to-latex - a new house - a new computer + a new keyboard + a new mouse - a new life \end{comment} and when I C-c C-c on '- a new house' nothing happend Regards, Angel [-- Attachment #1.2: Type: text/html, Size: 712 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-09 5:55 Failed to create radio tables Angel Popov @ 2010-07-10 13:47 ` Bernt Hansen 2010-07-10 19:26 ` Nick Dokos ` (2 subsequent siblings) 3 siblings, 0 replies; 14+ messages in thread From: Bernt Hansen @ 2010-07-10 13:47 UTC (permalink / raw) To: Angel Popov; +Cc: emacs-orgmode Angel Popov <angelpopov@yahoo.com> writes: > Hi, > I am following example on radio tables but it looks that it does not work. > I copied > > % BEGIN RECEIVE ORGLST to-buy > % END RECEIVE ORGLST to-buy > \begin{comment} > #+ORGLIST: SEND to-buy orgtbl-to-latex > - a new house > - a new computer > + a new keyboard > + a new mouse > - a new life > \end{comment} > > and when I C-c C-c on '- a new house' nothing happend > > Regards, Angel Hi Angel, I'm not sure what it is you are trying to accomplish. A link to the example you are following would have been helpful. Maybe you mean checkbox lists? - [ ] a new house - [ ] a new computer + [ ] a new keyboard + [ ] a new mouse - [ ] a new life then C-c C-c toggles the checkbox on and off. -Bernt ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-09 5:55 Failed to create radio tables Angel Popov 2010-07-10 13:47 ` Bernt Hansen @ 2010-07-10 19:26 ` Nick Dokos 2010-07-10 21:48 ` Nick Dokos 2010-07-10 20:42 ` Nicolas Goaziou 2010-07-13 11:42 ` Carsten Dominik 3 siblings, 1 reply; 14+ messages in thread From: Nick Dokos @ 2010-07-10 19:26 UTC (permalink / raw) To: Angel Popov; +Cc: nicholas.dokos, emacs-orgmode Angel Popov <angelpopov@yahoo.com> wrote: > Hi, > I am following example on radio tables but it looks that it does not work. > I copied > > % BEGIN RECEIVE ORGLST to-buy > % END RECEIVE ORGLST to-buy > \begin{comment} > #+ORGLIST: SEND to-buy orgtbl-to-latex > - a new house > - a new computer > + a new keyboard > + a new mouse > - a new life > \end{comment} > > and when I C-c C-c on '- a new house' nothing happend > Well, you are not following the example exactly (App. A.5.2 of the Org manual): you are trying to extend it to lists and I'm not sure that you can do that. So let me go back to the example in the manual and explain the rationale: The idea is that specifying tables in Org is easy, but specifying tables in LaTeX is harder. It would be convenient if you could use Org mode syntax for tables *in your LaTeX file* and have the LaTeX table generated automatically from that. That's what radio tables do for you: in your LaTeX file, you include the table in Org syntax *as a comment* and then you use orgtbl facilities to automatically generate your LaTeX table. So here's my LaTeX file with the example table: --8<---------------cut here---------------start------------->8--- \documentclass{article} \begin{document} Here's a table of stuff: % BEGIN RECEIVE ORGTBL to-buy % END RECEIVE ORGTBL to-buy \begin{comment} The Org table is inside a LaTeX comment. #+ORGTBL: SEND to-buy orgtbl-to-latex | foo | bar | |-----+-----| | 1 | 2 | | 3 | 4 | \end{comment} \end{document} --8<---------------cut here---------------end--------------->8--- When you edit this file, the major mode of the buffer is going to be LaTeX-mode, not Org-mode. This is where orgtbl-mode comes in: it's a minor mode, so you can enable it in your LaTeX-mode buffer: M-x orgtbl-mode <RET> and then you have the orgtbl facilities available in the buffer where you are editing your LaTeX file. Now put your cursor somewhere in the Org table and say C-c C-c - presto, change-o, you get this: --8<---------------cut here---------------start------------->8--- \documentclass{article} \begin{document} Here's a table of stuff: % BEGIN RECEIVE ORGTBL to-buy \begin{tabular}{rr} foo & bar \\ \hline 1 & 2 \\ 3 & 4 \\ \end{tabular} % END RECEIVE ORGTBL to-buy \begin{comment} The Org table is inside a LaTeX comment. #+ORGTBL: SEND to-buy orgtbl-to-latex | foo | bar | |-----+-----| | 1 | 2 | | 3 | 4 | \end{comment} \end{document} --8<---------------cut here---------------end--------------->8--- Process this with LaTeX and you get a nicely typeset table, without having to worry much about the finicky LaTeX syntax. Plus, if you need to change the table, you change the Org table in the comment, press C-c C-c again and the change is propagated automatically to the LaTeX table. In addition, if you enable orgtbl-mode before you even start, then you have all the nice shortcuts for *editing* the Org table in the first place. In fact, it's handy to have orgtbl-mode *always* enabled when you edit LaTeX files. You can do that by using the appropriate hook. For example, if you use AucTeX, add the following line to your .emacs (after the place where AucTeX is initialized, so that it has a chance to define the hook): (add-hook 'LaTeX-mode-hook 'orgtbl-mode) AFAIK, you *cannot* do something similar with lists (which is what you seem to have tried with your modifications to the example), but lists are much easier to deal with directly in LaTeX. Hope this makes things clearer, Nick ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-10 19:26 ` Nick Dokos @ 2010-07-10 21:48 ` Nick Dokos 2010-07-10 22:27 ` Nicolas Goaziou 0 siblings, 1 reply; 14+ messages in thread From: Nick Dokos @ 2010-07-10 21:48 UTC (permalink / raw) To: nicholas.dokos; +Cc: emacs-orgmode, Angel Popov Nick Dokos <nicholas.dokos@hp.com> wrote: > > AFAIK, you *cannot* do something similar with lists (which is what > you seem to have tried with your modifications to the example), but lists > are much easier to deal with directly in LaTeX. > I stand corrected: as Nicolas Goaziou points out elsewhere in this thread, you *can* do that with lists - afaict, the only thing missing is the handy C-c C-c keybinding - or am I wrong about this too? Thanks, Nick ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-10 21:48 ` Nick Dokos @ 2010-07-10 22:27 ` Nicolas Goaziou 2010-07-10 23:23 ` Nick Dokos 2010-07-11 4:02 ` Nick Dokos 0 siblings, 2 replies; 14+ messages in thread From: Nicolas Goaziou @ 2010-07-10 22:27 UTC (permalink / raw) To: nicholas.dokos; +Cc: emacs-orgmode, Angel Popov Hello, >>>>> Nick Dokos writes: > Afaict, the only thing missing is the handy C-c C-c keybinding - or > am I wrong about this too? You're right. There is no keybinding for that. Though, as a little relief, with proper completion, M-x olsl TAB RET is enough. Regards, -- Nicolas ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-10 22:27 ` Nicolas Goaziou @ 2010-07-10 23:23 ` Nick Dokos 2010-07-11 4:02 ` Nick Dokos 1 sibling, 0 replies; 14+ messages in thread From: Nick Dokos @ 2010-07-10 23:23 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: nicholas.dokos, emacs-orgmode, Angel Popov Nicolas Goaziou <n.goaziou@gmail.com> wrote: > > Afaict, the only thing missing is the handy C-c C-c keybinding - or > > am I wrong about this too? > > You're right. There is no keybinding for that. Though, as a little > relief, with proper completion, M-x olsl TAB RET is enough. > I expect Carsten will have incorporated it in orgtbl-ctrl-c-ctrl-c by this time tomorrow :-) Seriously, I don't mind the typing: I just won't remember the name of the function, but that's my problem, not yours ;-) As an aside, I get different lists radioed, depending on where point is when I call the function: if I'm in the second-level list, only that is radioed; if I'm somewhere in the first level, the whole list is radioed. Bug or feature? Or maybe pilot error? Thanks, Nick ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-10 22:27 ` Nicolas Goaziou 2010-07-10 23:23 ` Nick Dokos @ 2010-07-11 4:02 ` Nick Dokos 2010-07-11 6:17 ` Nicolas Goaziou 1 sibling, 1 reply; 14+ messages in thread From: Nick Dokos @ 2010-07-11 4:02 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: nicholas.dokos, emacs-orgmode, Angel Popov Nicolas Goaziou <n.goaziou@gmail.com> wrote: > Hello, > >>>>> Nick Dokos writes: > > > Afaict, the only thing missing is the handy C-c C-c keybinding - or > > am I wrong about this too? > > You're right. There is no keybinding for that. Though, as a little > relief, with proper completion, M-x olsl TAB RET is enough. > BTW, Angel was reading appending A.5.4 (not A.5.2 as I mistakenly assumed) and afaict, he is right: first of all, there is a typo in the appendix (ORGLIST vs ORGLST); second, the name of the list ("to-buy") includes a dash, but the regexp in org-list-send-list does not match it: it works better if the dash is replaced by an underscore in the example, but maybe the regexp should be made more general. But the appendix also claims that C-c C-c on the first element of the list *should* work, and I don't think it does - but it's not clear to me what minor mode(s) should be in operation in order for this to work. What binding should I expect for C-C C-c at that poing? Thanks, Nick ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-11 4:02 ` Nick Dokos @ 2010-07-11 6:17 ` Nicolas Goaziou 2010-07-12 5:51 ` Carsten Dominik 0 siblings, 1 reply; 14+ messages in thread From: Nicolas Goaziou @ 2010-07-11 6:17 UTC (permalink / raw) To: nicholas.dokos; +Cc: emacs-orgmode, Angel Popov Hello, >>>>> Nick Dokos writes: > Second, the name of the list ("to-buy") includes a dash, but the > regexp in org-list-send-list does not match it: it works better if > the dash is replaced by an underscore in the example, but maybe the > regexp should be made more general. I've already corrected this and the problem of nested lists you're talking about in my branch redefining lists. The regexp was indeed too specific: it is now on par with the one used in ORGTBL. I also redefined org-list-radio-list-templates as they were inserting a table and not a list. About the binding, C-c C-c is not a good choice (do I want to send list or toggle check-box?). Anyway it should belong to orgstruct-mode, IMO. Regards, -- Nicolas ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-11 6:17 ` Nicolas Goaziou @ 2010-07-12 5:51 ` Carsten Dominik 2010-07-12 9:16 ` Nicolas Goaziou 2010-07-12 12:44 ` Nicolas Goaziou 0 siblings, 2 replies; 14+ messages in thread From: Carsten Dominik @ 2010-07-12 5:51 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: nicholas.dokos, emacs-orgmode, Angel Popov On Jul 11, 2010, at 8:17 AM, Nicolas Goaziou wrote: > Hello, > >>>>>> Nick Dokos writes: >> Second, the name of the list ("to-buy") includes a dash, but the >> regexp in org-list-send-list does not match it: it works better if >> the dash is replaced by an underscore in the example, but maybe the >> regexp should be made more general. > > I've already corrected this and the problem of nested lists you're > talking about in my branch redefining lists. Corrected it where? In you branch where you are working on the list code? > > The regexp was indeed too specific: it is now on par with the one used > in ORGTBL. I also redefined org-list-radio-list-templates as they > were inserting a table and not a list. Can you make a patch for just this prblem and submit it? I'd like to fix this before the release. > > About the binding, C-c C-c is not a good choice (do I want to send > list or toggle check-box?). Yes, this is a bit of a problem here. We could send the list with C-c C-c anyway, of cause, would not hurt. This would be parallel to tables where C-c C-c aligns the table and sends it. Thanks - Carsten ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-12 5:51 ` Carsten Dominik @ 2010-07-12 9:16 ` Nicolas Goaziou 2010-07-12 12:44 ` Nicolas Goaziou 1 sibling, 0 replies; 14+ messages in thread From: Nicolas Goaziou @ 2010-07-12 9:16 UTC (permalink / raw) To: Carsten Dominik; +Cc: nicholas.dokos, emacs-orgmode, Angel Popov [-- Attachment #1: Type: text/plain, Size: 202 bytes --] Hello, >>>>> Carsten Dominik writes: > Corrected it where? In you branch where you are working on the list > code? Yes, on my branch. But here is the change applying to master. Regards, -- Nicolas [-- Attachment #2: 0001-Fix-regexp-for-org-list-send-list.patch --] [-- Type: text/plain, Size: 1000 bytes --] From bceff0485db6a7f8686c1024afe1810414f78a63 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou <n.goaziou@gmail.com> Date: Mon, 12 Jul 2010 11:12:57 +0200 Subject: [PATCH] Fix regexp for `org-list-send-list'. * lisp/org-list.el (org-list-send-list): regexp defining the start of a radio list is now on par with the one used for radio tables. --- lisp/org-list.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-list.el b/lisp/org-list.el index 2aacd09..0a51ca7 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -1277,7 +1277,7 @@ this list." (save-excursion (org-list-goto-true-beginning) (beginning-of-line 0) - (unless (looking-at "#\\+ORGLST: *SEND +\\([a-zA-Z0-9_]+\\) +\\([^ \t\r\n]+\\)\\( +.*\\)?") + (unless (looking-at "[ \t]*#\\+ORGLST[: \t][ \t]*SEND[ \t]+\\([^ \t\r\n]+\\)[ \t]+\\([^ \t\r\n]+\\)\\([ \t]+.*\\)?") (if maybe (throw 'exit nil) (error "Don't know how to transform this list")))) -- 1.7.1.1 [-- Attachment #3: Type: text/plain, Size: 201 bytes --] _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-12 5:51 ` Carsten Dominik 2010-07-12 9:16 ` Nicolas Goaziou @ 2010-07-12 12:44 ` Nicolas Goaziou 2010-07-12 17:07 ` Carsten Dominik 1 sibling, 1 reply; 14+ messages in thread From: Nicolas Goaziou @ 2010-07-12 12:44 UTC (permalink / raw) To: Carsten Dominik; +Cc: nicholas.dokos, emacs-orgmode, Angel Popov [-- Attachment #1: Type: text/plain, Size: 209 bytes --] I forgot to post changes in templates. Btw, it seems that you reverted changes in documentation in 94689a04b00f88932e63024ae29bacea4dbcc752, but it is still #+ORGLST and not #+ORGLIST. Regards, -- Nicolas [-- Attachment #2: 0001-Fix-templates-for-radio-list.patch --] [-- Type: text/plain, Size: 1111 bytes --] From dff3343a8989f1f280fdf15f64bcf47ba9ac7f56 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou <n.goaziou@gmail.com> Date: Mon, 12 Jul 2010 14:40:18 +0200 Subject: [PATCH] Fix templates for radio list. * lisp/org-list.el (org-list-radio-list-templates): Fix templates. --- lisp/org-list.el | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-list.el b/lisp/org-list.el index 0a51ca7..49b8e2b 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -195,19 +195,19 @@ When the indentation would be larger than this, it will become % END RECEIVE ORGLST %n \\begin{comment} #+ORGLST: SEND %n org-list-to-latex -| | | +- \\end{comment}\n") (texinfo-mode "@c BEGIN RECEIVE ORGLST %n @c END RECEIVE ORGLST %n @ignore #+ORGLST: SEND %n org-list-to-texinfo -| | | +- @end ignore\n") (html-mode "<!-- BEGIN RECEIVE ORGLST %n --> <!-- END RECEIVE ORGLST %n --> <!-- #+ORGLST: SEND %n org-list-to-html -| | | +- -->\n")) "Templates for radio lists in different major modes. All occurrences of %n in a template will be replaced with the name of the -- 1.7.1.1 [-- Attachment #3: Type: text/plain, Size: 1 bytes --] [-- Attachment #4: Type: text/plain, Size: 201 bytes --] _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-12 12:44 ` Nicolas Goaziou @ 2010-07-12 17:07 ` Carsten Dominik 0 siblings, 0 replies; 14+ messages in thread From: Carsten Dominik @ 2010-07-12 17:07 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: nicholas.dokos, emacs-orgmode, Angel Popov On Jul 12, 2010, at 2:44 PM, Nicolas Goaziou wrote: > I forgot to post changes in templates. Applied, thanks. > > Btw, it seems that you reverted changes in documentation in > 94689a04b00f88932e63024ae29bacea4dbcc752, but it is still #+ORGLST and > not #+ORGLIST. I reverted them before applying your patch, assuming that you'd have these in your patch. Thanks! - Carsten ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-09 5:55 Failed to create radio tables Angel Popov 2010-07-10 13:47 ` Bernt Hansen 2010-07-10 19:26 ` Nick Dokos @ 2010-07-10 20:42 ` Nicolas Goaziou 2010-07-13 11:42 ` Carsten Dominik 3 siblings, 0 replies; 14+ messages in thread From: Nicolas Goaziou @ 2010-07-10 20:42 UTC (permalink / raw) To: Angel Popov; +Cc: emacs-orgmode Hello, >>>>> Angel Popov writes: > I copied > % BEGIN RECEIVE ORGLST to-buy % END RECEIVE ORGLST to-buy > \begin{comment} #+ORGLIST: SEND to-buy orgtbl-to-latex - a new house > - a new computer + a new keyboard + a new mouse - a new > life \end{comment} > and when I C-c C-c on '- a new house' nothing happend Try this: ----- \documentclass{article} \begin{document} % BEGIN RECEIVE ORGLST tobuy % END RECEIVE ORGLST tobuy \begin{comment} #+ORGLST: SEND tobuy org-list-to-latex - a new house - a new computer + a new keyboard + a new mouse - a new life \end{comment} \end{document} ----- and M-x org-list-send-list anywhere on the list. It works here. Regards, -- Nicolas ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Failed to create radio tables 2010-07-09 5:55 Failed to create radio tables Angel Popov ` (2 preceding siblings ...) 2010-07-10 20:42 ` Nicolas Goaziou @ 2010-07-13 11:42 ` Carsten Dominik 3 siblings, 0 replies; 14+ messages in thread From: Carsten Dominik @ 2010-07-13 11:42 UTC (permalink / raw) To: Angel Popov; +Cc: emacs-orgmode Hi everyone, thanks to all who contributed to this thread. Sending lists should now work as advertised, including using C-c C-c to send the list. - Carsten On Jul 9, 2010, at 7:55 AM, Angel Popov wrote: > Hi, > I am following example on radio tables but it looks that it does not > work. > I copied > % BEGIN RECEIVE ORGLST to-buy > % END RECEIVE ORGLST to-buy > \begin{comment} > #+ORGLIST: SEND to-buy orgtbl-to-latex > - a new house > - a new computer > + a new keyboard > + a new mouse > - a new life > \end{comment} > > and when I C-c C-c on '- a new house' nothing happend > > Regards, Angel > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2010-07-13 11:42 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-07-09 5:55 Failed to create radio tables Angel Popov 2010-07-10 13:47 ` Bernt Hansen 2010-07-10 19:26 ` Nick Dokos 2010-07-10 21:48 ` Nick Dokos 2010-07-10 22:27 ` Nicolas Goaziou 2010-07-10 23:23 ` Nick Dokos 2010-07-11 4:02 ` Nick Dokos 2010-07-11 6:17 ` Nicolas Goaziou 2010-07-12 5:51 ` Carsten Dominik 2010-07-12 9:16 ` Nicolas Goaziou 2010-07-12 12:44 ` Nicolas Goaziou 2010-07-12 17:07 ` Carsten Dominik 2010-07-10 20:42 ` Nicolas Goaziou 2010-07-13 11:42 ` Carsten Dominik
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.