emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sylvain Chouleur <sylvain.chouleur@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix org-outline-overlay-data marker insertion-type
Date: Sun, 19 Jan 2014 14:20:24 +0100	[thread overview]
Message-ID: <CAD_mUW19_WOM=BF9WNEqgHgT=2ZwW2U2B0PYZZouCiuMYE2VgA@mail.gmail.com> (raw)
In-Reply-To: <87d2jpukoz.fsf@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 393 bytes --]

Well seen,
here is the new patch, working as well.

Thanks
--
Sylvain


2014/1/18 Nicolas Goaziou <n.goaziou@gmail.com>

> Sylvain Chouleur <sylvain.chouleur@gmail.com> writes:
>
> > But beg and end are positions, not markers, I am wrong?
>
> BEG and END are positions, but `copy-marker' accepts an integer as its
> first argument. See its docstring.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #1.2: Type: text/html, Size: 931 bytes --]

[-- Attachment #2: 0001-Fix-org-outline-overlay-data-marker-insertion-type.patch --]
[-- Type: text/x-patch, Size: 1239 bytes --]

From a956097b88088422bbbf1aa06dc3921cebbe7ad9 Mon Sep 17 00:00:00 2001
From: Sylvain Chouleur <sylvain.chouleur@gmail.com>
Date: Sun, 19 Jan 2014 14:18:45 +0100
Subject: [PATCH] Fix org-outline-overlay-data marker insertion-type

* org.el: Set the insertion-type of end bound marker of
org-outline-overlay-data to t (means marker advances when you insert
text at it)

This is to conserve outline visibility property when changes are made
at the end bound of the data.
For example: try org-babel-execute-subtree on a folded outline:
The new result will be shown after the folded part of the outline
whereas the outline body should not be visible.
---
 lisp/org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index a53597e477e2..50e652160566 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7191,8 +7191,8 @@ If USE-MARKERS is set, return the positions as markers."
 				end (overlay-end o))
 			  (and beg end (> end beg)
 			       (if use-markers
-				   (cons (move-marker (make-marker) beg)
-					 (move-marker (make-marker) end))
+				   (cons (copy-marker beg)
+					 (copy-marker end t))
 				 (cons beg end)))))
 		      (overlays-in (point-min) (point-max))))))))
 
-- 
1.8.5.2


  reply	other threads:[~2014-01-19 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15  0:19 [PATCH] Fix org-outline-overlay-data marker insertion-type Sylvain Chouleur
2014-01-18 17:27 ` Sylvain Chouleur
2014-01-18 17:43   ` Nicolas Goaziou
2014-01-18 18:35     ` Sylvain Chouleur
2014-01-18 19:57       ` Nicolas Goaziou
2014-01-19 13:20         ` Sylvain Chouleur [this message]
2014-01-19 19:38           ` Nicolas Goaziou
2014-01-19 19:46             ` Sylvain Chouleur
2014-01-19 21:06               ` 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='CAD_mUW19_WOM=BF9WNEqgHgT=2ZwW2U2B0PYZZouCiuMYE2VgA@mail.gmail.com' \
    --to=sylvain.chouleur@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).