all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* !?  user-error: Not in a sub-editing buffer
@ 2015-04-30  9:31 Gregor Zattler
  2015-04-30  9:43 ` Gregor Zattler
  2015-04-30  9:44 ` tomas
  0 siblings, 2 replies; 3+ messages in thread
From: Gregor Zattler @ 2015-04-30  9:31 UTC (permalink / raw
  To: help-gnu-emacs

Dear Emacs users,

since today I cannot save buffers via ^x^s but Emacs says:

„user-error: Not in a sub-editing buffer“

When I do ^x # (server-edit) in order to leave emacsclient 
Emacs asks if I want to save the buffer.  

This is strange since I build Emacs from sources and rgrep does
neither find „Not in a sub-editing buffer“ in Emacs sources nore
under ~/.emacs.d/

Any ideas?



This is GNU Emacs 25.0.50.6 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of 2015-04-27 on boo
with loads of packages.

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



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

* Re: !?  user-error: Not in a sub-editing buffer
  2015-04-30  9:31 !? user-error: Not in a sub-editing buffer Gregor Zattler
@ 2015-04-30  9:43 ` Gregor Zattler
  2015-04-30  9:44 ` tomas
  1 sibling, 0 replies; 3+ messages in thread
From: Gregor Zattler @ 2015-04-30  9:43 UTC (permalink / raw
  To: help-gnu-emacs

This seems to be an error in org-mode (other source directory) it's
already asked on the org-mode mailinng list.

Sorry for the noise, Grfegor



* Gregor Zattler <telegraph@gmx.net> [30. Apr. 2015]:
> Dear Emacs users,
> 
> since today I cannot save buffers via ^x^s but Emacs says:
> 
> „user-error: Not in a sub-editing buffer“
> 
> When I do ^x # (server-edit) in order to leave emacsclient 
> Emacs asks if I want to save the buffer.  
> 
> This is strange since I build Emacs from sources and rgrep does
> neither find „Not in a sub-editing buffer“ in Emacs sources nore
> under ~/.emacs.d/
> 
> Any ideas?
> 
> 
> 
> This is GNU Emacs 25.0.50.6 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of 2015-04-27 on boo
> with loads of packages.
> 
> Ciao, Gregor
> -- 
>  -... --- .-. . -.. ..--.. ...-.-
> 

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



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

* Re: !?  user-error: Not in a sub-editing buffer
  2015-04-30  9:31 !? user-error: Not in a sub-editing buffer Gregor Zattler
  2015-04-30  9:43 ` Gregor Zattler
@ 2015-04-30  9:44 ` tomas
  1 sibling, 0 replies; 3+ messages in thread
From: tomas @ 2015-04-30  9:44 UTC (permalink / raw
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Apr 30, 2015 at 11:31:38AM +0200, Gregor Zattler wrote:
> Dear Emacs users,
> 
> since today I cannot save buffers via ^x^s but Emacs says:
> 
> „user-error: Not in a sub-editing buffer“

Just FWIW and the result of a very quick-and-dirty Duck search:

this message lives (among possibly a myriad of other places, what
do I know) in Org-mode:

  (defun org-edit-src-save ()
    "Save parent buffer with current state source-code buffer."
    (interactive)
    (unless (org-src-edit-buffer-p) (user-error "Not in a sub-editing buffer"))
    (set-buffer-modified-p nil)
    (let ((edited-code (org-src--contents-for-write-back))
          (beg org-src--beg-marker)
          (end org-src--end-marker)
          (overlay org-src--overlay))
      (with-current-buffer (org-src--source-buffer)
        (undo-boundary)
        (goto-char beg)
        (delete-region beg end)
        (when (org-string-nw-p edited-code) (insert edited-code))
        (unless (bolp) (insert "\n"))
        (move-overlay overlay beg (point))
        (save-buffer))))

which is, AFAICS there for editing a source block in the source's major
mode: this makes the error message more understandable.

To debug it further you could (a) toggle-debug-on-error; (b) look for
the existence (and state) of a (presumedly) buffer local variable
org-src-edit-buffer-p in the buffer you're trying to save.

Take with a fist of salt.

- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlVB+YEACgkQBcgs9XrR2kb2LgCeNr+2qV5zo4b3Vm0GmAl0AITJ
O2wAmwbBZwvmy0hHWeVqWeo4NfL0IhUs
=M8z1
-----END PGP SIGNATURE-----



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

end of thread, other threads:[~2015-04-30  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30  9:31 !? user-error: Not in a sub-editing buffer Gregor Zattler
2015-04-30  9:43 ` Gregor Zattler
2015-04-30  9:44 ` tomas

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.