emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* "not in sub-editing buffer"
@ 2015-04-30  8:04 Detlef Steuer
  2015-04-30  8:23 ` Bastien Guerry
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Detlef Steuer @ 2015-04-30  8:04 UTC (permalink / raw)
  To: emacs-orgmode

Hi!

On of yesterday's commits introduces an error:

Whatever file I open, I can´t save it with C-c C-s and get the message
"not in sub-editing buffer"

I verified org is the culprit using emacs -Q and only loading org.

I can save without/before loading org.

Regards
Detlef

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: "not in sub-editing buffer"
  2015-04-30  8:04 "not in sub-editing buffer" Detlef Steuer
@ 2015-04-30  8:23 ` Bastien Guerry
  2015-04-30  9:49 ` bisected (was: )Re: " Gregor Zattler
  2015-05-01  8:31 ` "not in sub-editing buffer" Nicolas Goaziou
  2 siblings, 0 replies; 12+ messages in thread
From: Bastien Guerry @ 2015-04-30  8:23 UTC (permalink / raw)
  To: Detlef Steuer; +Cc: emacs-orgmode

Hi Detlef,

Detlef Steuer <detlef.steuer@gmx.de> writes:

> Whatever file I open, I can´t save it with C-c C-s and get the message
> "not in sub-editing buffer"

Noticed this too.  You need to deactivate org-src-mode manually.
For whatever reason, org-src-mode gets wrongly activated at startup.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bisected (was: )Re: "not in sub-editing buffer"
  2015-04-30  8:04 "not in sub-editing buffer" Detlef Steuer
  2015-04-30  8:23 ` Bastien Guerry
@ 2015-04-30  9:49 ` Gregor Zattler
  2015-04-30  9:59   ` bisected Bastien
  2015-04-30 10:05   ` bisected Nicolas Richard
  2015-05-01  8:31 ` "not in sub-editing buffer" Nicolas Goaziou
  2 siblings, 2 replies; 12+ messages in thread
From: Gregor Zattler @ 2015-04-30  9:49 UTC (permalink / raw)
  To: emacs-orgmode

Hi Daniel, Detlef,
* Detlef Steuer <detlef.steuer@gmx.de> [30. Apr. 2015]:
> Hi!
> 
> On of yesterday's commits introduces an error:
> 
> Whatever file I open, I can´t save it with C-c C-s and get the message
> "not in sub-editing buffer"
> 
> I verified org is the culprit using emacs -Q and only loading org.
> 
> I can save without/before loading org.


First bad commit is:
bad0409c3b86e09c4559e97d5f394356c6ccbe7f

This results in a startup error:  
Debugger entered--Lisp error: (void-variable write-back)



With 
86dcd907719c97530a266686694a7dc7bd25449a

there is no error.


Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: bisected
  2015-04-30  9:49 ` bisected (was: )Re: " Gregor Zattler
@ 2015-04-30  9:59   ` Bastien
  2015-04-30 12:12     ` bisected Detlef Steuer
  2015-04-30 10:05   ` bisected Nicolas Richard
  1 sibling, 1 reply; 12+ messages in thread
From: Bastien @ 2015-04-30  9:59 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: emacs-orgmode

There was a hidden clue the commit could be problematic...

Gregor Zattler <telegraph@gmx.net> writes:

> First bad commit is:
> bad0409c3b86e09c4559e97d5f394356c6ccbe7f
  ^^^

!

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: bisected
  2015-04-30  9:49 ` bisected (was: )Re: " Gregor Zattler
  2015-04-30  9:59   ` bisected Bastien
@ 2015-04-30 10:05   ` Nicolas Richard
  2015-04-30 10:53     ` bisected Gregor Zattler
  1 sibling, 1 reply; 12+ messages in thread
From: Nicolas Richard @ 2015-04-30 10:05 UTC (permalink / raw)
  To: emacs-orgmode

Gregor Zattler <telegraph@gmx.net> writes:
> First bad commit is:
> bad0409c3b86e09c4559e97d5f394356c6ccbe7f

Nice hash for a "bad" commit :) 

> This results in a startup error:  
> Debugger entered--Lisp error: (void-variable write-back)

Is it related to your initial problem ?

I think this specific bug was fixed in :
Commit ea575950d957fcecc74ed6f53c29bb6b77e9fe26

modified   lisp/org-src.el
@@ -543,7 +543,7 @@ (define-minor-mode org-src-mode
     (org-set-local
      'header-line-format
      (substitute-command-keys
-      (if write-back
+      (if org-src--allow-write-back
 	  "Edit, then exit with \\[org-edit-src-exit] or abort with \
 \\[org-edit-src-abort]"
 	"Exit with \\[org-edit-src-exit] or abort with \

-- 
Nico

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: bisected
  2015-04-30 10:05   ` bisected Nicolas Richard
@ 2015-04-30 10:53     ` Gregor Zattler
  2015-04-30 11:46       ` bisected Nicolas Richard
  2015-04-30 12:05       ` wrong test, fix works, sorry (was: Re: bisected) Gregor Zattler
  0 siblings, 2 replies; 12+ messages in thread
From: Gregor Zattler @ 2015-04-30 10:53 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,
* Nicolas Richard <theonewiththeevillook@yahoo.fr> [30. Apr. 2015]:
> Gregor Zattler <telegraph@gmx.net> writes:
> > First bad commit is:
> > bad0409c3b86e09c4559e97d5f394356c6ccbe7f
> 
> Nice hash for a "bad" commit :) 

I didn't realise :-)

> > This results in a startup error:  
> > Debugger entered--Lisp error: (void-variable write-back)
> 
> Is it related to your initial problem ?

I don't know.  It appeared while git bisecting.

> I think this specific bug was fixed in :
> Commit ea575950d957fcecc74ed6f53c29bb6b77e9fe26

Sorry, no: 
with:
GNU Emacs 25.0.50.6 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of
2015-04-27 on boo Org-mode version 8.3beta (release_8.3beta-1097-gea5759 @ /home/grfz/src/org-mode/lisp/)       

and emacs invoked with -Q I cannot save a modified file with ^x ^s
but when I leave emacs:

receipt:
emacs -Q -nw /tmp/tempfile

change buffer, do ^x ^s.

Thanks for looking into this, Gregor

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: bisected
  2015-04-30 10:53     ` bisected Gregor Zattler
@ 2015-04-30 11:46       ` Nicolas Richard
  2015-04-30 12:08         ` bisected Gregor Zattler
  2015-04-30 12:05       ` wrong test, fix works, sorry (was: Re: bisected) Gregor Zattler
  1 sibling, 1 reply; 12+ messages in thread
From: Nicolas Richard @ 2015-04-30 11:46 UTC (permalink / raw)
  To: emacs-orgmode

Gregor Zattler <telegraph@gmx.net> writes:
> Sorry, no:

From Bastien's comment, I wonder : does the following patch helps ?

--- /dev/fd/63	2015-04-30 13:44:20.900676564 +0200
+++ /tmp/org-src.el	2015-04-30 13:43:50.924673810 +0200
@@ -539,35 +539,36 @@
 - When formatting a source code snippet for export with htmlize.
 There is a mode hook, and keybindings for `org-edit-src-exit' and
 `org-edit-src-save'"
-  (when org-edit-src-persistent-message
-    (org-set-local
-     'header-line-format
-     (substitute-command-keys
-      (if org-src--allow-write-back
-	  "Edit, then exit with \\[org-edit-src-exit] or abort with \
+  (when org-src-mode
+    (when org-edit-src-persistent-message
+      (org-set-local
+       'header-line-format
+       (substitute-command-keys
+        (if org-src--allow-write-back
+            "Edit, then exit with \\[org-edit-src-exit] or abort with \
 \\[org-edit-src-abort]"
-	"Exit with \\[org-edit-src-exit] or abort with \
+          "Exit with \\[org-edit-src-exit] or abort with \
 \\[org-edit-src-abort]"))))
-  ;; Possibly activate various auto-save features (for the edit buffer
-  ;; or the source buffer).
-  (when org-edit-src-turn-on-auto-save
-    (setq buffer-auto-save-file-name
-	  (concat (make-temp-name "org-src-")
-		  (format-time-string "-%Y-%d-%m")
-		  ".txt")))
-  (unless (or org-src--auto-save-timer (zerop org-edit-src-auto-save-idle-delay))
-    (setq org-src--auto-save-timer
-	  (run-with-idle-timer
-	   org-edit-src-auto-save-idle-delay t
-	   (lambda ()
-	     (let (edit-flag)
-	       (dolist (b (buffer-list))
-		 (when (org-src-edit-buffer-p)
-		   (unless edit-flag (setq edit-flag t))
-		   (when (buffer-modified-p) (org-edit-src-save))))
-	       (unless edit-flag
-		 (cancel-timer org-src--auto-save-timer)
-		 (setq org-src--auto-save-timer nil))))))))
+    ;; Possibly activate various auto-save features (for the edit buffer
+    ;; or the source buffer).
+    (when org-edit-src-turn-on-auto-save
+      (setq buffer-auto-save-file-name
+            (concat (make-temp-name "org-src-")
+                    (format-time-string "-%Y-%d-%m")
+                    ".txt")))
+    (unless (or org-src--auto-save-timer (zerop org-edit-src-auto-save-idle-delay))
+      (setq org-src--auto-save-timer
+            (run-with-idle-timer
+             org-edit-src-auto-save-idle-delay t
+             (lambda ()
+               (let (edit-flag)
+                 (dolist (b (buffer-list))
+                   (when (org-src-edit-buffer-p)
+                     (unless edit-flag (setq edit-flag t))
+                     (when (buffer-modified-p) (org-edit-src-save))))
+                 (unless edit-flag
+                   (cancel-timer org-src--auto-save-timer)
+                   (setq org-src--auto-save-timer nil)))))))))
 
 (defun org-src-mode-configure-edit-buffer ()
   (when (org-bound-and-true-p org-src--from-org-mode)

-- 
Nicolas.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* wrong test, fix works, sorry (was: Re: bisected)
  2015-04-30 10:53     ` bisected Gregor Zattler
  2015-04-30 11:46       ` bisected Nicolas Richard
@ 2015-04-30 12:05       ` Gregor Zattler
  2015-04-30 15:50         ` now it get's ridiculous: bug is still there (was: Re: wrong test, fix works, sorry (was: Re: bisected)) Gregor Zattler
  1 sibling, 1 reply; 12+ messages in thread
From: Gregor Zattler @ 2015-04-30 12:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,,
* Gregor Zattler <telegraph@gmx.net> [30. Apr. 2015]:
> * Nicolas Richard <theonewiththeevillook@yahoo.fr> [30. Apr. 2015]:
> > I think this specific bug was fixed in :
> > Commit ea575950d957fcecc74ed6f53c29bb6b77e9fe26
> 
> Sorry, no: 
> with:
> GNU Emacs 25.0.50.6 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of
> 2015-04-27 on boo Org-mode version 8.3beta (release_8.3beta-1097-gea5759 @ /home/grfz/src/org-mode/lisp/)       
> 
> and emacs invoked with -Q I cannot save a modified file with ^x ^s
> but when I leave emacs:
> 
> receipt:
> emacs -Q -nw /tmp/tempfile
> 
> change buffer, do ^x ^s.

I redid my test and now it works...  Probably I forgot the -Q.


Sorry for the noise, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: bisected
  2015-04-30 11:46       ` bisected Nicolas Richard
@ 2015-04-30 12:08         ` Gregor Zattler
  0 siblings, 0 replies; 12+ messages in thread
From: Gregor Zattler @ 2015-04-30 12:08 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,
* Nicolas Richard <theonewiththeevillook@yahoo.fr> [30. Apr. 2015]:
> Gregor Zattler <telegraph@gmx.net> writes:
> > Sorry, no:
> 
> From Bastien's comment, I wonder : does the following patch helps ?

Yes, but see my other email: The fix in
ea575950d957fcecc74ed6f53c29bb6b77e9fe26 works.

Thanks, grgeor

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: bisected
  2015-04-30  9:59   ` bisected Bastien
@ 2015-04-30 12:12     ` Detlef Steuer
  0 siblings, 0 replies; 12+ messages in thread
From: Detlef Steuer @ 2015-04-30 12:12 UTC (permalink / raw)
  To: emacs-orgmode

Am Thu, 30 Apr 2015 11:59:32 +0200
schrieb Bastien <bzg@gnu.org>:

> There was a hidden clue the commit could be problematic...
> 
> Gregor Zattler <telegraph@gmx.net> writes:
> 
> > First bad commit is:
> > bad0409c3b86e09c4559e97d5f394356c6ccbe7f
>   ^^^

That must be a first look at the singularity.

"The git" knows it all.
I for one welcome our new git overlord :-)


> 
> !


> 
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* now it get's ridiculous: bug is still there (was: Re: wrong test, fix works, sorry (was: Re: bisected))
  2015-04-30 12:05       ` wrong test, fix works, sorry (was: Re: bisected) Gregor Zattler
@ 2015-04-30 15:50         ` Gregor Zattler
  0 siblings, 0 replies; 12+ messages in thread
From: Gregor Zattler @ 2015-04-30 15:50 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas, org-mode users and -developers,

I was too much in a hurry...  

This bug still exists as of now:
* Gregor Zattler <telegraph@gmx.net> [30. Apr. 2015]:
> * Gregor Zattler <telegraph@gmx.net> [30. Apr. 2015]:
> > * Nicolas Richard <theonewiththeevillook@yahoo.fr> [30. Apr. 2015]:
> > > I think this specific bug was fixed in :
> > > Commit ea575950d957fcecc74ed6f53c29bb6b77e9fe26
> > 
> > Sorry, no: 
> > with:
> > GNU Emacs 25.0.50.6 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of
> > 2015-04-27 on boo Org-mode version 8.3beta (release_8.3beta-1097-gea5759 @ /home/grfz/src/org-mode/lisp/)       
> >
> > and emacs invoked with -Q I cannot save a modified file with ^x ^s
> > but when I leave emacs:

this is still the case with commit
ea575950d957fcecc74ed6f53c29bb6b77e9fe26 
my mistake was:

> > receipt:
> > emacs -Q -nw /tmp/tempfile
> > 
> > change buffer, do ^x ^s.

not to load the freshly build org-mode.

With this invocation:

emacs-snapshot -Q -nw -L /home/grfz/src/org-mode/lisp/ --debug-init --eval "(require 'org)" /tmp/testfile

change the buffer, try to save it, see: "user-error: Not in a sub-editing buffer"

This ist the case with:
- GNU Emacs 25.0.50.6 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of
- Emacs24 as of Debian Jessie

it's the caese with org-mode commits up to:

- 14f5b132184ac9c0492d8cc94345413b85ef3f55

- ea575950d957fcecc74ed6f53c29bb6b77e9fe26


it's not the case with org- mode commits up to:

- 86dcd907719c97530a266686694a7dc7bd25449a

- 14f5b132184ac9c0492d8cc94345413b85ef3f55  and patch from Nicolas
  email Message-ID: <87oam56dow.fsf@yahoo.fr>  appplied.
  But then I get "defvar: Symbol's value as variable is void: org-src-mode"
  at startup.
  
  
This time I got it right, I hope.

Bye, Gregor

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: "not in sub-editing buffer"
  2015-04-30  8:04 "not in sub-editing buffer" Detlef Steuer
  2015-04-30  8:23 ` Bastien Guerry
  2015-04-30  9:49 ` bisected (was: )Re: " Gregor Zattler
@ 2015-05-01  8:31 ` Nicolas Goaziou
  2 siblings, 0 replies; 12+ messages in thread
From: Nicolas Goaziou @ 2015-05-01  8:31 UTC (permalink / raw)
  To: Detlef Steuer; +Cc: emacs-orgmode

Hello,

Detlef Steuer <detlef.steuer@gmx.de> writes:

> Whatever file I open, I can´t save it with C-c C-s and get the message
> "not in sub-editing buffer"
>
> I verified org is the culprit using emacs -Q and only loading org.
>
> I can save without/before loading org.

Fixed in bce77d0db31cd0f58daf731b0995e3d862541389. Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-05-01  8:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30  8:04 "not in sub-editing buffer" Detlef Steuer
2015-04-30  8:23 ` Bastien Guerry
2015-04-30  9:49 ` bisected (was: )Re: " Gregor Zattler
2015-04-30  9:59   ` bisected Bastien
2015-04-30 12:12     ` bisected Detlef Steuer
2015-04-30 10:05   ` bisected Nicolas Richard
2015-04-30 10:53     ` bisected Gregor Zattler
2015-04-30 11:46       ` bisected Nicolas Richard
2015-04-30 12:08         ` bisected Gregor Zattler
2015-04-30 12:05       ` wrong test, fix works, sorry (was: Re: bisected) Gregor Zattler
2015-04-30 15:50         ` now it get's ridiculous: bug is still there (was: Re: wrong test, fix works, sorry (was: Re: bisected)) Gregor Zattler
2015-05-01  8:31 ` "not in sub-editing buffer" Nicolas Goaziou

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).