Commit Graph

176 Commits

Author SHA1 Message Date
Carsten Dominik 44259b3231 Fix cursor position when bullet length has changed
Dan Davison writes:

> If you start a numbered list with
>
> 1.
>
> and hit M-RET then you get
>
> 2.
>  ^
> with a space, i.e. '2. '
>
> However, when creating the 10th list item, there is no space after
> '10.'. Same for 99 -> 100. This isn't entirely trivial, because if you
> start typing blindly after hitting M-RET, then the line you have created
> (lacking the space) will not be recognised as a list item and so
> e.g. the next M-RET will create a new heading, not a list item. [Has
> this changed recently? This seems like something obvious that others
> would have noticed.]
>
> Here's my patch.
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/lisp/org-list.el b/lisp/org-list.el
> index 2fea57b..8ece3ea 100644
> --- a/lisp/org-list.el
> +++ b/lisp/org-list.el
> @@ -813,7 +813,7 @@ with something like \"1.\" or \"2)\"."
> 	      (buffer-substring (point-at-bol) (match-beginning 3))))
> 	;; (term (substring (match-string 3) -1))
> 	ind1 (n (1- arg))
> -	fmt bobp old new)
> +	fmt bobp old new delta)
>     ;; find where this list begins
>     (org-beginning-of-item-list)
>     (setq bobp (bobp))
> @@ -835,7 +835,9 @@ with something like \"1.\" or \"2)\"."
> 	  (delete-region (match-beginning 2) (match-end 2))
> 	  (goto-char (match-beginning 2))
> 	  (insert (setq new (format fmt (setq n (1+ n)))))
> -	  (org-shift-item-indentation (- (length new) (length old))))))
> +	  (setq delta (- (length new) (length old)))
> +	  (org-shift-item-indentation delta)
> +	  (if (= (org-current-line) line) (setq col (+ col delta))))))
>     (org-goto-line line)
>     (org-move-to-column col)))
> --8<---------------cut here---------------end--------------->8---
>
> Dan
2009-09-28 07:37:50 +01:00
Carsten Dominik 762136b25c Fix problem with insertion of statistics cookies at visibility boundaries 2009-09-18 13:52:18 +01:00
Carsten Dominik 291a6db848 Release number back to 6.30trans 2009-09-04 10:39:01 +02:00
Carsten Dominik 12ab55ca43 Release 6.30d 2009-09-03 13:53:46 +02:00
Carsten Dominik adfa87282d Push version number to 6.30trans 2009-09-03 08:10:36 +02:00
Carsten Dominik 63e1714288 Release 6.30c 2009-09-02 14:40:56 +02:00
Carsten Dominik fc332703bf Release 6.30b 2009-09-02 11:33:10 +02:00
Carsten Dominik 1d04b205e6 Release 6.30a 2009-09-02 09:00:23 +02:00
Carsten Dominik db70cdb13b Release 6.30 2009-09-01 06:09:23 +02:00
Carsten Dominik 350691164b Avoid calling `goto-line' from lisp programs 2009-08-27 10:24:09 +02:00
Carsten Dominik 8c33812854 Improve documentation about hierarchical versus recursive statistics 2009-08-18 15:43:55 +01:00
Carsten Dominik bfdd3d3fd3 Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
Carsten Dominik 0864163024 Release 6.29c 2009-08-06 06:26:23 +02:00
Carsten Dominik d6b37ddbea Release 6.29b 2009-08-05 12:34:30 +02:00
Carsten Dominik 1c25048e48 Release 6.29a 2009-08-04 23:54:22 +02:00
Carsten Dominik d67a9be8a2 Release 6.29 2009-08-04 23:06:39 +02:00
Carsten Dominik 2eecb4c43c Fix white-space errors 2009-08-03 17:30:30 +02:00
Carsten Dominik 5dbc23baed Keep compiler happy 2009-08-03 13:28:24 +02:00
Bastien Guerry b536686e7d Fix typo in org-provide-checkbox-statistics docstring. 2009-07-26 06:36:41 +08:00
Bastien Guerry 8b840fe73c New function `org-list-make-subtree' bound to C-c C-*
This function convert the plain list at point into a subtree, preserving
the list structure.  Thanks to Ilya Shlyakhter for this suggestion.
2009-07-26 04:48:32 +08:00
Bastien Guerry 157329bb45 Fix the frame selection problem without using a macro.
Do this by restauring the frame focus correctly in
`org-eval-in-calendar'.
2009-07-25 19:32:59 +08:00
Bastien Guerry 4be6a90bd5 Code cleanup. 2009-07-24 03:39:39 +02:00
Bastien Guerry a2d230bdb8 Bugfix: org-list-beginning-re should not use * for list items. 2009-07-24 03:38:26 +02:00
Carsten Dominik 1768f325df Make bullet modification work for ordered lists as well 2009-07-07 13:52:17 +02:00
Carsten Dominik e5c2547bbe Fix typo in plain list demotion code
Reported by Rainer Stengele.
2009-07-07 13:31:55 +02:00
Carsten Dominik 280f8495ed Plain lists: Allow to force bullet type changes during demotion
Rainer Stengele writes:

> using org-mode for quite some time now I always look at
> operations (key sequences) I repeat a lot of times.
>
> A lot of times I start a list with an item and immediately
> indent the next item as subitem.
>
> From
>
> - item 1
> - subitem 11
>
> I go to
>
> - item 1
>  - subitem 11
>
> via "M-right". Then I always want to change the style of the
> subitem list to "*". I do this via "S-right-right".
>
> I wonder how others work. I would like to automatically have
> changed the subitem list type to "*" as soon as I indent via
> "Alt-right". Next indentation should go back to "-". etc.
>
> Maybe we could introduce a variable that sets the order of
> standard list item types, in my case: "- * - * - * - *" as
> in
>
>
> - item 1
>  * subitem 11
>    - subitem 111
>      * subitem 111
> ...
>
> very special I know but I try to reduce the keypressings as
> much as possible. Any other suggestions?

This commits adds the variable
`org-list-demote-modify-bullet' for this purpose.
2009-07-06 15:38:23 +02:00
Carsten Dominik d3f4bf811c Fix minor bug 2009-07-01 09:42:24 +02:00
Carsten Dominik c1a4c5901a Plain lists: Improvements to cycling with TAB.
TAB now cycles visibility in plain lists if the cursor is in a plain
list.  This corresponds now to the new default value `t' of
`org-cycle-include-plain-lists'.  If you want to treat plain list
items as part of the outline hierarchy during cycling of outline
headings (this is what a `t' value used to mean), set this variable to
`integrate'.
2009-07-01 09:34:13 +02:00
Carsten Dominik f648323253 Push version number to 6.28trans 2009-06-26 17:26:50 +02:00
Carsten Dominik cd4e52a5ef Release 6.28d 2009-06-26 17:23:27 +02:00
Carsten Dominik 00ddc4dba7 Release 6.28c 2009-06-26 09:27:50 +02:00
Carsten Dominik e7ffcc1d4d Release 6.28b 2009-06-25 09:01:20 +02:00
Carsten Dominik 7906427aa6 Release 6.28 2009-06-25 08:59:59 +02:00
Carsten Dominik 7b3d0d40f5 New faces for checkbox statistics 2009-06-11 16:19:07 +02:00
Carsten Dominik 379b24cc63 Fix whitespace issues 2009-06-08 08:00:46 +02:00
Carsten Dominik 8a9e604a7a New indentation treatment for blocks during export
Now we also deal with center, quote, and verse blocks.
2009-06-07 16:11:14 +02:00
Carsten Dominik 574f987670 LaTeX export: Respect example indentation when parsing plain lists 2009-06-07 08:12:49 +02:00
Carsten Dominik b6152ed5b0 Minor indentation fix 2009-06-04 17:28:19 +02:00
Carsten Dominik ae7b8f6b12 Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
Carsten Dominik 0421dead4b Release 6.27a 2009-05-25 16:04:45 +02:00
Carsten Dominik b681c7b26e Release 6.27 2009-05-23 08:22:04 +02:00
Carsten Dominik f54ff074d2 TODO statistics: Allow recursive statistics
Setting the new option `org-hierarchical-todo-statistics' to nil will
make TODO statistics to be computed recursively.  This means, not only
the direct children of a node contribute to its TODO statistics, but
the entire subtree.

You can also set the COOKIE_DATA property and add the word "recursive"
there to get recursive statistics for a specific tree.
2009-05-20 10:47:38 +02:00
Carsten Dominik c88c9ad519 Statistics: New hooks 2009-05-19 09:22:44 +02:00
Carsten Dominik f756d17bcf Lists: Fix bug with lists at the end of a file
Now org-end-of-item-list does find the end of the buffer if that is
where the lists ends.
2009-05-14 14:46:41 +02:00
Carsten Dominik a607b5b218 Checkboxes: Allow recursive statistics.
Patch by Richard Klinda.
2009-05-10 09:06:03 +02:00
Carsten Dominik 2f8c014195 Declare some functions 2009-05-05 10:33:12 +02:00
Carsten Dominik 34a91b7f5b Moved `org-reset-checkbox-state-subtree' to org-list.el 2009-05-04 16:57:26 +02:00
Carsten Dominik 0fb28c3405 Plain lists: Fix regular expression.
There was a bug in a regular expression, visible when
`org-list-two-spaces-after-bullet-regexp' is set to ?)
2009-04-29 21:21:36 +02:00
Carsten Dominik 69e6d249aa Push version number to 6.26trans 2009-04-22 09:08:13 +02:00
Carsten Dominik 73854f435d Release 6.26d 2009-04-22 06:42:17 +02:00