From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: <tomas@tuxteam.de>
Newsgroups: gmane.emacs.help
Subject: Re: !?  user-error: Not in a sub-editing buffer
Date: Thu, 30 Apr 2015 11:44:33 +0200
Message-ID: <20150430094433.GA1375@tuxteam.de>
References: <20150430093138.GA22882@boo.workgroup>
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; x-action=pgp-signed
Content-Transfer-Encoding: 8bit
X-Trace: ger.gmane.org 1430387129 26428 80.91.229.3 (30 Apr 2015 09:45:29 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 30 Apr 2015 09:45:29 +0000 (UTC)
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 30 11:45:28 2015
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geh-help-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>)
	id 1Ynl24-0007aO-Mu
	for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Apr 2015 11:45:24 +0200
Original-Received: from localhost ([::1]:42812 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>)
	id 1Ynl24-00085W-5c
	for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Apr 2015 05:45:24 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37547)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tomas@tuxteam.de>) id 1Ynl1T-0007Io-Hu
	for help-gnu-emacs@gnu.org; Thu, 30 Apr 2015 05:44:48 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tomas@tuxteam.de>) id 1Ynl1N-00021I-Hp
	for help-gnu-emacs@gnu.org; Thu, 30 Apr 2015 05:44:46 -0400
Original-Received: from mail.tuxteam.de ([5.199.139.25]:58382 helo=tomasium.tuxteam.de)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tomas@tuxteam.de>) id 1Ynl1N-00020J-CE
	for help-gnu-emacs@gnu.org; Thu, 30 Apr 2015 05:44:41 -0400
Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80)
	(envelope-from <tomas@tuxteam.de>) id 1Ynl1F-0000Tz-Mv
	for help-gnu-emacs@gnu.org; Thu, 30 Apr 2015 11:44:33 +0200
In-Reply-To: <20150430093138.GA22882@boo.workgroup>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 5.199.139.25
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Xref: news.gmane.org gmane.emacs.help:104093
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/104093>

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