mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-25 07:27:57 +00:00
This is a mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git for CI/development purposes because the upstream savannah git repo is flakey.
44259b3231
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 |
||
---|---|---|
BUGFIXING | ||
contrib | ||
doc | ||
EXPERIMENTAL | ||
lisp | ||
ORGWEBPAGE | ||
UTILITIES | ||
xemacs | ||
.dir-settings.el | ||
.gitignore | ||
ChangeLog | ||
Makefile | ||
README | ||
README_DIST | ||
README_GIT | ||
request-assign-future.txt |
This is the Emacs Org project, an emacs subsystem for organizing your life The homepage of Org is at http://orgmode.org This distribution contains: README This file. README_DIST The README file for the distribution (zip and tar files) README_GIT Information about the git repository and how to contribute to Org-mode development. lisp/ Directory with all the Emacs Lisp files that make up Org. doc/ The documentation files. org.texi is the source of the documentation, org.html and org.pdf are formatted versions of it. xemacs/ The xemacs directory contains special code for XEmacs users, in particular a port of the GNU Emacs outline.el to XEmacs. Org-mode does not work under XEmacs without this file installed. It did until version 4.37, but no longer. CONTRIB/ A diretory with third-party additions for Org. Some really cool stuff is in there. ORGWEBPAGE/ Directory with the source files for the orgmode.org web page. ChangeLog The standard ChangeLog file. Makefile The makefile to compile and install Org, and also for maintenance tasks. request-assign-future.txt The form that contributors have to sign and get processed with the FSF before contributed changes can be integrated into the Org core. All files in this distribution except the CONTRIB directory have copyright assigned to the FSF. EXPERIMENTAL Experimental code, not necessarily FSF copyright.