Re: [Orgmode] [ANN] Changes to lists
Hello, Samuel Wales writes: Latest git. This is on list devel branch, not on master branch yet. Regards, -- Nicolas ___ 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
Re: [Orgmode] [ANN] Changes to lists
Hi Nicolas, I tried c-c - on - indented text and it worked perfectly, preserving hierarchy - headlines and it did not preserve hierarchy I tried c-c * on - indented text and it did not preserve hierarchy - a list and it did not preserve hierarchy Latest git. Samuel On 2011-02-10, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Samuel Wales writes: I'd like to see c-c - on headlines preserve hierarchy. This is now implemented, and hopefully working. Thanks for suggesting this, Regards, -- Nicolas -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html I support the Whittemore-Peterson Institute (WPI) === I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper. ___ 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
Re: [Orgmode] [ANN] Changes to lists
Hello, Samuel Wales writes: I'd like to see c-c - on headlines preserve hierarchy. This is now implemented, and hopefully working. Thanks for suggesting this, Regards, -- Nicolas ___ 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
Re: [Orgmode] [ANN] Changes to lists
Eric S Fraga writes: I cannot because your changes do not seem to have propagated through... Commit looks ok on github, so it should be available. Did you try pull -f? I rebased against master a few days ago. Regards, -- Nicolas ___ 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
Re: [Orgmode] [ANN] Changes to lists
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Eric S Fraga writes: Any suggestions? I cannot see why latex, html and babel should be handled any differently... I guess I could move from using begin_latex to begin_src latex instead? Function replacing blocks was not setting `original-indentation' property. This should be fixed now. Could you confirm this? I cannot because your changes do not seem to have propagated through... =git pull= tells me Already up-to-date and =git log= tells me that the most recent commit was , | commit ca220e9c40e4467f436a0a1501fb1fd730093cec | Merge: 68cf793 73be48b | Author: Carsten Dominik carsten.domi...@gmail.com | Date: Sun Feb 6 08:14:58 2011 +0100 | | Merge branch 'fix-todo-list-with-extended-today' ` I'm eager to try your fix, mind you! -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.4 (release_7.4.317.gca220.dirty) ___ 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
Re: [Orgmode] [ANN] Changes to lists
Hello, Eric S Fraga writes: Any suggestions? I cannot see why latex, html and babel should be handled any differently... I guess I could move from using begin_latex to begin_src latex instead? Function replacing blocks was not setting `original-indentation' property. This should be fixed now. Could you confirm this? Regards, -- Nicolas ___ 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
Re: [Orgmode] [ANN] Changes to lists
Nicolas Goaziou n.goaz...@gmail.com writes: [...] Normally, lists should not pay attention to anything inside blocks so I highly doubt it is related to indentation of code. The on-going saga of lists and blocks! Sorry about this... Attached is a simple org file which includes latex, html and babel source code blocks: # -*- coding: utf-8; -*- #+TITLE: examplebug.org #+AUTHOR:Eric S Fraga #+EMAIL: e.fr...@ucl.ac.uk #+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t :t #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:nil #+latex_header: \usepackage{tikz} * latex code block within list 1. I have a list 2. with several items 3. and then one of them includes some latex: #+begin_latex \begin{tikzpicture}[x=2cm,y=2cm] \draw [red] (0,0) -- (2,2); \end{tikzpicture} #+end_latex 4. subsequent list items start a new list 5. if we include some html #+begin_html img src=mip.png alt=Mixed integer programming #+end_html 6. that works fine. 7. if we include a babel code block #+begin_src octave :exports code :var x=20 3*x+5 #+end_src #+results: : 65 8. that also works just fine. The latter two do not cause any problems with an enumerated list; the first does unfortunately. I've attached the resulting latex file as well. % Created 2011-02-06 Sun 15:29 \documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fixltx2e} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \usepackage{wrapfig} \usepackage{soul} \usepackage{textcomp} \usepackage{marvosym} \usepackage[integrals]{wasysym} \usepackage{latexsym} \usepackage{amssymb} \usepackage{hyperref} \tolerance=1000 \usepackage{xcolor} \usepackage{listings} \usepackage{amsmath} \usepackage{tikz} \providecommand{\alert}[1]{\textbf{#1}} \begin{document} \title{examplebug.org} \author{Eric S Fraga} \date{06 February 2011} \maketitle \section*{latex code block within list} \label{sec-1} \begin{enumerate} \item I have a list \item with several items \item and then one of them includes some latex: \end{enumerate} \begin{tikzpicture}[x=2cm,y=2cm] \draw [red] (0,0) -- (2,2); \end{tikzpicture} \begin{enumerate} \item subsequent list items start a new list \item if we include some html \item that works fine. \item if we include a babel code block \lstset{language=octave} \begin{lstlisting} 3*x+5 \end{lstlisting} \item that also works just fine. \end{enumerate} \end{document} Any suggestions? I cannot see why latex, html and babel should be handled any differently... I guess I could move from using begin_latex to begin_src latex instead? Thanks, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.4 (release_7.4.317.gca220.dirty) ___ 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
Re: [Orgmode] [ANN] Changes to lists
Hello, Note the ending and immediate starting of an enumerate environment after the listing corresponding to the babel octave code. I cannot reproduce it with: - * babel results overwrite following text 1. start an item so that following is indented: #+begin_src emacs-lisp :var x=10 (+ (* 3 x) 6) #+end_src #+results: : 36 2. a second item starts here - Are you sure it still happens with a recent branch? Is it specific to octave? By the way, although a fix that required the babel code to be indented to the same level as the meta statements would be satisfactory, a solution that allowed code within the block to be indented to any position would be more welcome. Code written in the mode associated with the particular language will often be automatically indented... Normally, lists should not pay attention to anything inside blocks so I highly doubt it is related to indentation of code. Sorry for not being very helpful here. Regards, -- Nicolas ___ 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
Re: [Orgmode] [ANN] Changes to lists
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Note the ending and immediate starting of an enumerate environment after the listing corresponding to the babel octave code. I cannot reproduce it with: - * babel results overwrite following text 1. start an item so that following is indented: #+begin_src emacs-lisp :var x=10 (+ (* 3 x) 6) #+end_src #+results: : 36 2. a second item starts here - Are you sure it still happens with a recent branch? Is it specific to octave? The short example file I included in my original message now works just fine. The error was definitely present in : Org-mode version 7.4 (release_7.4.260.gba0f6.dirty) but is fixed in the current version: : Org-mode version 7.4 (release_7.4.302.gd840.dirty) By the way, the /dirty/ bit comes from a minor change I made to ob-octave's definition of variables, a change which does not affect the export. By the way, although a fix that required the babel code to be indented to the same level as the meta statements would be satisfactory, a solution that allowed code within the block to be indented to any position would be more welcome. Code written in the mode associated with the particular language will often be automatically indented... Normally, lists should not pay attention to anything inside blocks so I highly doubt it is related to indentation of code. Okay. That was just a guess! Sorry for not being very helpful here. No problem! Everything's fine now so some other change has fixed things; I'm happy :) Thanks, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.4 (release_7.4.302.gd840.dirty) ___ 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
Re: [Orgmode] [ANN] Changes to lists
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Note the ending and immediate starting of an enumerate environment after the listing corresponding to the babel octave code. I cannot reproduce it with: - * babel results overwrite following text 1. start an item so that following is indented: #+begin_src emacs-lisp :var x=10 (+ (* 3 x) 6) #+end_src #+results: : 36 2. a second item starts here - Are you sure it still happens with a recent branch? Is it specific to octave? The short example file I included in my original message now works just fine. The error was definitely present in : Org-mode version 7.4 (release_7.4.260.gba0f6.dirty) but is fixed in the current version: : Org-mode version 7.4 (release_7.4.302.gd840.dirty) By the way, the /dirty/ bit comes from a minor change I made to ob-octave's definition of variables, a change which does not affect the export. By the way, although a fix that required the babel code to be indented to the same level as the meta statements would be satisfactory, a solution that allowed code within the block to be indented to any position would be more welcome. Code written in the mode associated with the particular language will often be automatically indented... Normally, lists should not pay attention to anything inside blocks so I highly doubt it is related to indentation of code. Okay. That was just a guess! Sorry for not being very helpful here. No problem! Everything's fine now so some other change has fixed things; I'm happy :) Thanks, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.4 (release_7.4.302.gd840.dirty) ___ 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
Re: [Orgmode] [ANN] Changes to lists
(may be rude to followup on my own post but...) Further on the problem with exporting a list with a babel code block: if I ask the results to be exported as well as the code (code only is the default) via: #+begin_src octave :var x=10 :exports both the export works correctly and generates: --8---cut here---start-8--- \begin{enumerate} \item start an item so that following is indented: \lstset{language=octave} \begin{lstlisting} 3*x+5 \end{lstlisting} \begin{verbatim} 35 \end{verbatim} \item a second item starts here \end{enumerate} --8---cut here---end---8--- Interesting! Just an extra data point... ;-) Thanks again, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.4 (release_7.4.260.gba0f6.dirty) ___ 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
Re: [Orgmode] [ANN] Changes to lists
Hello, Carsten Dominik writes: In original patch, bullet type was passed to HTML and DocBook exporters. I removed that part of the code for various reasons. I am not sure if I understand this. What was passed through in the original patch, and what have you changed? In original patch, when you had a list with alphabetical bullets, you would also have alphabetical bullets in HTML export (same for DocBook). Now, bullet type in Org buffer has no influence whatsoever on export. Also a first little thing I have found: 1. a list - a sub-list - shslkjg kj - dsjkg kajhg Some text belonging to main list. - and even another sub-list - aksjdf alkjshf aslkdjf lkjasdflkj aklsjdfh klasj If I go to the end of the last line and press M-RET it fails with the backtrace below. Not sure what it should do in this case, but my preferred result would be to create the 2. item for the first list. I cannot reproduce it. I get 2. as expected. Odd. Regards, -- Nicolas ___ 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
Re: [Orgmode] [ANN] Changes to lists
You asked for comments and suggestions. Adding inline tasks sounds like a great way to allow all sorts of things. I like that. I never have anyin various ways would lists at column 0. I always want the top level at column 2. Supporting this would be great. C-c - not putting lists at column 0 (optionally) and demoting top level would be useful. I'd like to see c-c - on headlines preserve hierarchy. On current org version I still have issues with indentation, but they are minor. I will just do 2 blank lines after lists. Thanks. ___ 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
Re: [Orgmode] [ANN] Changes to lists
On 2011-01-24, Samuel Wales samolog...@gmail.com wrote: I never have anyin various ways would lists at column 0. I always That should be I almost never want lists at column 0. In particular I frequently do c-c - then use c-x r o. The only time I want lists at column 0 is if I do something like this, where indentation is violated anyway. 1. something paragraph. another 2. something another ___ 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
Re: [Orgmode] [ANN] Changes to lists
Hello, Samuel Wales writes: I never have anyin various ways would lists at column 0. I always want the top level at column 2. Supporting this would be great. C-c - not putting lists at column 0 (optionally) There is already support for that. Use M-S-right or M-S-left on top item of a list to move the whole list to any column. and demoting top level would be useful. Just promote every item but the first one using a region. I'd like to see c-c - on headlines preserve hierarchy. I can look into that. Regards, -- Nicolas ___ 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
[Orgmode] [ANN] Changes to lists
Hello, I would like to announce, and submit to discussion, some list code upgrades. So, let me introduce the changes done in development branch: * Major changes 1) It is possible (again) to have indentation of text determine the current level of the list. But this time, the 3 main exporters handle it. In other words, you can have: - a list - a sub-list Some text belonging to main list. - and even another sub-list This is on by default (with org-list-ending-method set to 'both). 2) There is now support for finite alphabetical lists, thanks to Nathaniel Naff. This is off by default and activated by the variable `org-alphabetical-lists'. This also recognizes counters like [@c] in addition to normal counters (i.e. [@3]). For now, counters only affect matching bullets, so [@c] have no effect on a numbered list. Though, they will during export, where [@c] is the same as [@3]. In original patch, bullet type was passed to HTML and DocBook exporters. I removed that part of the code for various reasons: - It wasn't consistent across every exporter ; - While it sounds nice in HTML and, maybe, DocBook, it is, usually, a bad idea to enforce bullet types in LaTeX ; - It should be the job of style files ; - Org should otherwise provide, at least, roman numbering, in order to give a real choice to the user, as alphabetical and numbered ordered lists are somewhat limited with regards to what exporters standardly offer. Thus, setting a list to alphabetical bullets will not ensure export will have them too. To sum it up, alphabetical lists are some cosmetics applied to lists in an Org buffer only. Here comes: a. Some list with an alphabetical bullet W. [@W] Upper case letters are also allowed. 3) As announced before, lists can now contain drawers, inline tasks, and blocks, themselves containing lists. Two variables (one for the Org buffer, and one for exporters) are controlling this: `org-list-forbidden-blocks' (by default no list can live in example, verse, and src blocks), and `org-list-export-context' (lists in valid blocks and in inline tasks will be exported by default). + an example of a list #+begin_center 1. with another list 2. in a block #+end_center + and now another item As a special case, inline tasks, though starting at column 0, are always considered part of the first item above in the list. Consider the following example, with (require 'org-inlinetask), and try moving first sub-item, or exporting: - A list with + A sub-list *** TODO Stuff waiting 1. First good reason to delay the task 2. Second good reason to delay it *** END + Another sub-item 4) Improve `newline-and-indent' (C-j): used in an item, it will keep text from moving at column 0. This allows to split text and make paragraphs while not breaking list. For example, type C-j twice at ¦, then M-q: + I have this quite long item. Now I'd like to start a new paragraph there. ¦This should be the beginning of the new paragraph. 5) Improve `org-toggle-item' (C-c -): used on a region, it will change the region into *one* item. With a prefix argument, it will fallback to previous behavior and make every line in region an item. It permits to easily add paragraphs inside a close list. For example, if you mark the paragraph below, and use C-c -, it will be added to the list above it: #+begin_quote 1. A list strolling around A paragraph that should be included in the list. Just select it and use C-c -. #+end_quote * Bug fixes There are also some bug fixes. To name the visible ones: - Fix for checkboxes and cookies handling. - Export correctly sub-lists counters in LaTeX. - List are sturdier with regards to Babel printing output inside them. - Fix list to subtree transformation (with C-c C-*), as much as possible. Indeed, there is no equivalency between these constructs, mainly due to major change #1. * What now? While Bernt Hansen helped me a lot already, some more testing would be appreciated. The repository is at: git://github.com/ngz/org-mode-lists.git new-struct It supersedes recursive-lists branch, submitted to the ML a few weeks ago. I'm open to ideas, suggestions, and criticism. Regards, -- Nicolas ___ 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
Re: [Orgmode] [ANN] Changes to lists
Hi Nicolas, this is very impressive. Thanks so much for bringing back sublists with intersected text. In original patch, bullet type was passed to HTML and DocBook exporters. I removed that part of the code for various reasons: I am not sure if I understand this. What was passed through in the original patch, and what have you changed? Also a first little thing I have found: 1. a list - a sub-list - shslkjg kj - dsjkg kajhg Some text belonging to main list. - and even another sub-list - aksjdf alkjshf aslkdjf lkjasdflkj aklsjdfh klasj If I go to the end of the last line and press M-RET it fails with the backtrace below. Not sure what it should do in this case, but my preferred result would be to create the 2. item for the first list. Thanks! - Carsten Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) goto-char(nil) (let* ((item ...) (item-end ...) (item-end-no-blank ...) (beforep ...) (split-line-p ...) (blank-nb ...) (ind ...) (bullet ...) (box ...) (text-cut ...) (body ...) (item-sep ...) (item-size ...) (size-offset ...)) (goto-char item) (org-indent-to-column ind) (insert body) (insert item-sep) (mapc (lambda ... ...) struct) (push (list item ind bullet nil box nil ...) struct) (setq struct (sort struct ...)) (if beforep (goto-char item) (setq struct ...) (goto- char ...)) struct) (let ((case-fold-search t)) (let* (... ... ... ... ... ... ... ... ... ... ... ... ... ...) (goto-char item) (org-indent-to-column ind) (insert body) (insert item-sep) (mapc ... struct) (push ... struct) (setq struct ...) (if beforep ... ... ...) struct)) org-list-insert-item(215 ((15 2 1. nil nil nil 216) (27 5 - nil nil nil 45) (45 5 - nil nil nil 63) (63 5 - nil nil nil 82) (121 5 - nil nil nil 154) (154 5 - nil nil nil 177)) ((15) (27) (45 . 27) (63 . 45) (121) (154 . 121)) nil nil) (setq struct (org-list-insert-item pos struct prevs checkp desc)) (let* ((struct ...) (prevs ...) (desc ...) (checkp ...)) (setq struct (org-list-insert-item pos struct prevs checkp desc)) (org-list- write-struct struct (org-list-parents-alist struct)) (when checkp (org- update-checkbox-count-maybe)) (looking-at org-list-full-item-re) (goto- char (match-end 0)) t) (if (save-excursion (goto-char itemp) (org-at-item-timer-p)) (progn (org-timer-item) t) (goto-char itemp) (let* (... ... ... ...) (setq struct ...) (org-list-write-struct struct ...) (when checkp ...) (looking-at org-list-full-item-re) (goto-char ...) t)) (if (or (not itemp) (save-excursion ... ...)) nil (if (save- excursion ... ...) (progn ... t) (goto-char itemp) (let* ... ... ... ... ... ... t))) (unless (or (not itemp) (save-excursion ... ...)) (if (save- excursion ... ...) (progn ... t) (goto-char itemp) (let* ... ... ... ... ... ... t))) (let ((itemp ...) (pos ...)) (unless (or ... ...) (if ... ... ... ...))) org-insert-item() (not (org-insert-item)) (or force-heading (not (org-insert-item))) (if (or force-heading (not ...)) (progn (let* ... ... ... ... ... ... ... ... ...))) (when (or force-heading (not ...)) (let* (... ... ... ... ... ... pos hide-previous previous-pos) (cond ... ... ...) (insert head) (just- one-space) (setq pos ...) (end-of-line 1) (unless ... ... ...) (when ... ...) (run-hooks ...))) (if (or (= ... 0) (and ... ...)) (progn (insert \n* ) (run- hooks ...)) (when (or force-heading ...) (let* ... ... ... ... ... ... ... ... ...))) org-insert-heading(nil) call-interactively(org-insert-heading) (cond ((run-hook-with-args-until-success ...)) ((org-at-table-p) (call-interactively ...)) (t (call-interactively ...))) org-meta-return(nil) call-interactively(org-meta-return nil On Jan 23, 2011, at 10:59 PM, Nicolas Goaziou wrote: Hello, I would like to announce, and submit to discussion, some list code upgrades. So, let me introduce the changes done in development branch: * Major changes 1) It is possible (again) to have indentation of text determine the current level of the list. But this time, the 3 main exporters handle it. In other words, you can have: - a list - a sub-list Some text belonging to main list. - and even another sub-list This is on by default (with org-list-ending-method set to 'both). 2) There is now support for finite alphabetical lists, thanks to Nathaniel Naff. This is off by default and activated by the variable `org-alphabetical-lists'. This also recognizes counters like [@c] in addition to normal counters (i.e. [@3]). For now, counters only affect matching bullets, so [@c] have no effect on a numbered list. Though, they will during export, where [@c] is the same as [@3]. In original patch, bullet type was passed to HTML and DocBook exporters. I removed that part of the code for various reasons: - It wasn't consistent across every exporter ; - While it sounds