[-- Attachment #1: Type: text/plain, Size: 322 bytes --] 1. Assume that the content is: * Hello :LOGBOOK: - Note taken on [2013-04-22 Mon 16:57] \\ hello :END: 2. Fold it, so that it becomes * Hello… 3. Put the cursor at the end of the heading, and press M-RET or C-RET * Hello…(here) The new "*" will be in the beginning of :END:, which is incorrect. [-- Attachment #2: Type: text/html, Size: 554 bytes --]
[-- Attachment #1: Type: text/plain, Size: 539 bytes --] On Apr 22, 2013 4:02 AM, "Muchenxuan Tong" <demon386@gmail.com> wrote: > > 1. Assume that the content is: > * Hello > :LOGBOOK: > - Note taken on [2013-04-22 Mon 16:57] \\ > hello > :END: > > 2. Fold it, so that it becomes > * Hello… > > 3. Put the cursor at the end of the heading, and press M-RET or C-RET > * Hello…(here) > > The new "*" will be in the beginning of :END:, which is incorrect. > This may be related to my post: - http://www.mail-archive.com/emacs-orgmode@gnu.org/msg70302.html John [-- Attachment #2: Type: text/html, Size: 833 bytes --]
Sometime after 37f94d2 , a bug appeared which seems close to the thread subject: When in the body of a heading, and pressing meta-enter, message prints: 'not in item'. Reverting to 37f94d2 fixes. Thanks, Jeff
Hi Jeff,
thanks for the report - this should be fixed now.
- Carsten
On 22.4.2013, at 17:40, Jeff Kowalczyk <jtk@yahoo.com> wrote:
> Sometime after 37f94d2 , a bug appeared which seems close to the thread
> subject:
>
> When in the body of a heading, and pressing meta-enter, message prints: 'not
> in item'.
>
> Reverting to 37f94d2 fixes.
>
> Thanks,
> Jeff
>
>
[-- Attachment #1: Type: text/plain, Size: 405 bytes --] I'm tempted to apply the following patch, as this problem falls under the category of "inserting in an invisible region". I don't think it breaks any non-interactive call of org-insert-heading, but this needs further checking. Also, note that the problem occurs only when there is no blank line between the :END: and the following headline, so maybe the real fix has to be within org-insert-heading... [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: org.el.patch --] [-- Type: text/x-patch, Size: 464 bytes --] diff --git a/lisp/org.el b/lisp/org.el index 8c55bd4..4d16682 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7495,6 +7495,7 @@ and create a new headline with the text in the current line after point When INVISIBLE-OK is set, stop at invisible headlines when going back. This is important for non-interactive uses of the command." (interactive "P") + (org-check-before-invisible-edit 'insert) (cond ((or (= (buffer-size) 0) (and (not (save-excursion [-- Attachment #3: Type: text/plain, Size: 14 bytes --] -- Bastien
[-- Attachment #1: Type: text/plain, Size: 1304 bytes --] On Mon, Apr 22, 2013 at 1:48 PM, Carsten Dominik <carsten.dominik@gmail.com> wrote: > Hi Jeff, > > thanks for the report - this should be fixed now. For general headlines, this is fixed for me. I'm getting bad results if there's a source code block in the headline, though. See attached pics (in chronological order) showing what happens with a setup like this: * Heading #+begin_src R a <- 1 + 2 a #+end_src * Heading2 If I fold * Heading, =C-e= to the end of the line, and then M-RET, it puts the asterisk at the end of the heading instead of creating a new one. When I unfold, there's three dots after =#+end_src= and there's the asterisk. Also, I just tried this, and if there's no space or empty lines after "Test", when I fold * Heading, the "t" appears after the folded heading "..." * Heading #+begin_src R a <- 1 + 2 a #+end_src Test The last two screenshots are of that case. I'm on Org-mode version 8.0.1 (release_8.0.1-15-g0fff0b). John > > - Carsten > > On 22.4.2013, at 17:40, Jeff Kowalczyk <jtk@yahoo.com> wrote: > >> Sometime after 37f94d2 , a bug appeared which seems close to the thread >> subject: >> >> When in the body of a heading, and pressing meta-enter, message prints: 'not >> in item'. >> >> Reverting to 37f94d2 fixes. >> >> Thanks, >> Jeff >> >> > > [-- Attachment #2: 2013-04-22_145509.png --] [-- Type: image/png, Size: 5801 bytes --] [-- Attachment #3: 2013-04-22_145524.png --] [-- Type: image/png, Size: 1777 bytes --] [-- Attachment #4: 2013-04-22_145532.png --] [-- Type: image/png, Size: 1806 bytes --] [-- Attachment #5: 2013-04-22_145541.png --] [-- Type: image/png, Size: 5914 bytes --] [-- Attachment #6: 2013-04-22_150039.png --] [-- Type: image/png, Size: 5250 bytes --] [-- Attachment #7: 2013-04-22_150045.png --] [-- Type: image/png, Size: 1621 bytes --]
Yes, this is the same problem than the one reported by Muchenxuan Tong; a different problem than the one reported by Jeff, fixed. (I will take a lot at the problem later on this week.) I first wasn't able to reproduce those problems because I have `org-special-ctrl-a/e' set to 'reversed, so C-e does not go after the folded region -- maybe this should be the default behavior, it would avoid a lot of these problems. -- Bastien
[-- Attachment #1: Type: text/plain, Size: 711 bytes --] I checked the code of `org-insert-heading'. One potential factor: when folded, and putting cursor and the end of heading, the cursor is supposed to be :END: (here) and it's not judged as a heading. On Tue, Apr 23, 2013 at 2:57 AM, Bastien <bzg@gnu.org> wrote: > I'm tempted to apply the following patch, as this problem falls under > the category of "inserting in an invisible region". I don't think it > breaks any non-interactive call of org-insert-heading, but this needs > further checking. > > Also, note that the problem occurs only when there is no blank line > between the :END: and the following headline, so maybe the real fix > has to be within org-insert-heading... > > > > -- > Bastien > > [-- Attachment #2: Type: text/html, Size: 1644 bytes --]
Hi Muchenxuan,
Muchenxuan Tong <demon386@gmail.com> writes:
> 1. Assume that the content is:
> * Hello
> :LOGBOOK:
> - Note taken on [2013-04-22 Mon 16:57] \\
> hello
> :END:
>
> 2. Fold it, so that it becomes
> * Hello…
>
> 3. Put the cursor at the end of the heading, and press M-RET or C-RET
> * Hello…(here)
>
> The new "*" will be in the beginning of :END:, which is incorrect.
This is now fixed, along with the other problem reported by John for
* heading
#+begin_src sh
...
#+end_src
Thanks,
--
Bastien
[-- Attachment #1: Type: text/plain, Size: 701 bytes --] Cool! Thanks! On Wed, Apr 24, 2013 at 3:57 PM, Bastien <bzg@gnu.org> wrote: > Hi Muchenxuan, > > Muchenxuan Tong <demon386@gmail.com> writes: > > > 1. Assume that the content is: > > * Hello > > :LOGBOOK: > > - Note taken on [2013-04-22 Mon 16:57] \\ > > hello > > :END: > > > > 2. Fold it, so that it becomes > > * Hello… > > > > 3. Put the cursor at the end of the heading, and press M-RET or C-RET > > * Hello…(here) > > > > The new "*" will be in the beginning of :END:, which is incorrect. > > This is now fixed, along with the other problem reported by John for > > * heading > #+begin_src sh > ... > #+end_src > > Thanks, > > -- > Bastien > [-- Attachment #2: Type: text/html, Size: 1260 bytes --]