emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: [ANN] Changes to lists
Date: Mon, 24 Jan 2011 08:50:47 +0100	[thread overview]
Message-ID: <5090609E-4B3E-49F5-9C69-B40C4C6CF16D@gmail.com> (raw)
In-Reply-To: <87k4hve0y7.wl%n.goaziou@gmail.com>

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

- Carsten

  parent reply	other threads:[~2011-01-24  7:50 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-23 21:59 [ANN] Changes to lists Nicolas Goaziou
2011-01-24  7:01 ` Nicolas Goaziou
2011-01-24  7:50 ` Carsten Dominik [this message]
2011-01-24 16:47   ` Nicolas Goaziou
2011-01-24 18:38     ` Bernt Hansen
2011-01-24 20:09       ` Nicolas Goaziou
2011-02-28 15:27   ` Sébastien Vauban
2011-01-24 18:03 ` Achim Gratz
2011-01-24 18:21   ` Nicolas Goaziou
2011-01-24 19:23     ` Achim Gratz
2011-01-24 20:25       ` Nicolas Goaziou
2011-01-24 21:31 ` Samuel Wales
2011-01-24 21:35   ` Samuel Wales
2011-01-24 22:10   ` Nicolas Goaziou
2011-02-10 22:18   ` Nicolas Goaziou
2011-02-12  0:42     ` Samuel Wales
2011-02-12 11:28       ` Nicolas Goaziou
2011-01-26 15:15 ` Karl Maihofer
2011-01-27 18:37   ` Nicolas Goaziou
2011-01-28  9:41     ` Karl Maihofer
2011-01-28 10:40       ` Karl Maihofer
2011-02-02 17:09         ` Nicolas Goaziou
2011-02-02 17:08       ` Nicolas Goaziou
2011-02-08 11:47         ` Karl Maihofer
2011-02-08 20:09           ` Nicolas Goaziou
2011-01-27 18:59 ` Achim Gratz
2011-01-27 20:39   ` Nicolas Goaziou
2011-01-28 21:28     ` Achim Gratz
2011-01-29 17:26       ` Nicolas Goaziou
2011-01-29 22:04         ` Achim Gratz
2011-02-02 15:48           ` Nicolas Goaziou
2011-02-02 17:32             ` Achim Gratz
2011-01-30 16:19     ` David Maus
2011-02-06 16:35       ` Nicolas Goaziou
2011-02-09 18:33         ` Achim Gratz
2011-02-09 19:15           ` Nicolas Goaziou
2011-02-09 19:47             ` Achim Gratz
2011-02-09 22:36               ` Nicolas Goaziou
2011-02-10 17:53                 ` Achim Gratz
2011-02-09 18:43   ` Achim Gratz
2011-01-30  0:40 ` Eric S Fraga
2011-01-30  0:44   ` Eric S Fraga
2011-02-02 16:08   ` Nicolas Goaziou
2011-02-02 20:35     ` Eric S Fraga
2011-02-02 22:14     ` Eric S Fraga
2011-02-06 15:34     ` Eric S Fraga
2011-02-06 16:24       ` Nicolas Goaziou
2011-02-06 19:02         ` Eric S Fraga
2011-02-06 19:12           ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5090609E-4B3E-49F5-9C69-B40C4C6CF16D@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).