From: Bastien Guerry <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: [Accepted] Preserve trailing blank lines
Date: Wed, 9 Mar 2011 11:07:06 +0100 (CET) [thread overview]
Message-ID: <20110309100706.8F3836A2D@myhost.localdomain> (raw)
In-Reply-To: 878vxhgsyy.fsf@riotblast.dunsmor.com
Patch 617 (http://patchwork.newartisans.com/patch/617/) is now "Accepted".
Maintainer comment: none
This relates to the following submission:
http://mid.gmane.org/%3C878vxhgsyy.fsf%40riotblast.dunsmor.com%3E
Here is the original message containing the patch:
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] Preserve trailing blank lines
> Date: Tue, 15 Feb 2011 21:31:17 -0000
> From: Jason Dunsmore <emacs-orgmode@deathroller.dunsmor.com>
> X-Patchwork-Id: 617
> Message-Id: <878vxhgsyy.fsf@riotblast.dunsmor.com>
> To: Bastien <bastien.guerry@wikimedia.fr>
> Cc: emacs-orgmode@gnu.org, Carsten Dominik <carsten.dominik@gmail.com>
>
> Bastien <bastien.guerry@wikimedia.fr> writes:
>
> > However, with your patch, I get a weird behavior.
> >
> > Config:
> >
> > ,----
> > | (setq org-blank-before-new-entry '((heading . nil)
> > | (plain-list-item . nil)))
> > `----
> >
> > Test file:
> >
> > ,----
> > | * Section
> > |
> > | ** Subsection 1
> > | Body
> > |
> > | ** Subsection 2
> > | Body
> > `----
> >
> > Trying to move Subsection 1 down (with org-metadown):
> >
> > ,----
> > | * Section
> > | Body <<<<<< ??
> > |
> > | ** Subsection 2
> > |
> > | ** Subsection 1
> > | Body
> > `----
> >
> > Are you able to reproduce this?
>
> I finally had a chance to test this out with the latest Org from git and
> a vanilla Emacs config, and I was unable to reproduce the behavior you
> saw. Here is what I did:
>
>
> $ git clone git://orgmode.org/org-mode.git
>
> $ emacs23 -Q &
>
> (Edit org.el to re-introduce patch.)
>
> $ cd org-mode/
>
> $ git diff
>
>
> Then I evaluated the following in Emacs:
>
>
> (delete "/usr/share/emacs/23.2/lisp/org/" load-path)
> (add-to-list 'load-path "~/tmp/org-mode/lisp")
> (require 'org-install)
> (setq org-blank-before-new-entry '((heading . nil)
> (plain-list-item . nil)))
>
>
> You can see what happened on my screen with the following:
>
>
> wget http://98.129.169.48/tmp/emacs-testing.time
> wget http://98.129.169.48/tmp/emacs-testing.script
> scriptreplay emacs-testing.time emacs-testing.script
>
>
> Would you mind testing it out again?
>
> Regards,
> Jason
>
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 164081c..4329def 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -18507,10 +18507,10 @@ Taken from `count' in cl-seq.el with all keyword argum
> "Move backwards over whitespace, to the beginning of the first empty line.
> Returns the number of empty lines passed."
> (let ((pos (point)))
> - (skip-chars-backward " \t\n\r")
> - ;; (if (cdr (assoc 'heading org-blank-before-new-entry))
> - ;; (skip-chars-backward " \t\n\r")
> - ;; (forward-line -1))
> + ;;(skip-chars-backward " \t\n\r")
> + (if (cdr (assoc 'heading org-blank-before-new-entry))
> + (skip-chars-backward " \t\n\r")
> + (forward-line -1))
> (beginning-of-line 2)
> (goto-char (min (point) pos))
> (count-lines (point) pos)))
>
next prev parent reply other threads:[~2011-03-09 10:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 1:24 [PATCH] Preserve trailing blank lines Jason Dunsmore
2011-01-08 18:02 ` Carsten Dominik
2011-01-10 15:58 ` Jason Dunsmore
2011-01-17 23:13 ` Bastien
2011-01-26 18:52 ` Jason Dunsmore
2011-02-07 8:17 ` Bastien
2011-02-15 16:31 ` Jason Dunsmore
2011-03-09 10:07 ` Bastien Guerry [this message]
2011-03-09 10:07 ` Bastien
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110309100706.8F3836A2D@myhost.localdomain \
--to=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
/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 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.