From: <tomas@tuxteam.de>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: !? user-error: Not in a sub-editing buffer
Date: Thu, 30 Apr 2015 11:44:33 +0200 [thread overview]
Message-ID: <20150430094433.GA1375@tuxteam.de> (raw)
In-Reply-To: <20150430093138.GA22882@boo.workgroup>
-----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-----
prev parent reply other threads:[~2015-04-30 9:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150430094433.GA1375@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@gnu.org \
/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.
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).