emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Le Wang <l26wang@gmail.com>
To: Bastien <bzg@altern.org>
Cc: Bernt Hansen <bernt@norang.ca>, emacs-orgmode@gnu.org
Subject: Re: bug#12905: 24.2.50; org: edit source block causes data loss
Date: Fri, 14 Dec 2012 07:50:56 +0800	[thread overview]
Message-ID: <CAM=K+iqaYq5jg65W2anv2DmS=A_uq-G3fKtzkAcreJb74h_+sA@mail.gmail.com> (raw)
In-Reply-To: <CAM=K+ioHiom-PNz5fV83MtA6JY1pVLG8a8YUvi08MiSUvZbyXw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 45 bytes --]

... one more to fix misuse of signal

-- 
Le

[-- Attachment #2: 0006-fix-mix-use-of-signal.patch --]
[-- Type: application/octet-stream, Size: 2058 bytes --]

From 343ce4349e688660859f24069975215836a69ddd Mon Sep 17 00:00:00 2001
From: Le Wang <le.wang@agworld.com.au>
Date: Fri, 14 Dec 2012 07:47:44 +0800
Subject: [PATCH 6/6] fix mix-use of signal

---
 lisp/org-src.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index d4747ab..f4953a6 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -283,7 +283,7 @@ buffer."
 		       (table-recognize)
 		       (org-set-local 'org-edit-src-content-indentation 0))))
     (unless (functionp lang-f)
-      (signal 'org-src-error "No such language mode: %s" lang-f))
+      (signal 'org-src-error (list (format "No such language mode: %s" lang-f))))
     (save-excursion
       (if (> (point) end) (goto-char end))
       (setq line (org-current-line)
@@ -325,7 +325,7 @@ buffer."
 	(condition-case e
 	    (funcall lang-f)
 	  (error
-	   (signal 'org-src-error "Language mode `%s' fails with: %S" lang-f (nth 1 e)))))
+	   (signal 'org-src-error (list (format "Language mode `%s' fails with: %S" lang-f (nth 1 e)))))))
       (dolist (pair transmitted-variables)
 	(org-set-local (car pair) (cadr pair)))
       ;; Remove protecting commas from visible part of buffer.
@@ -356,7 +356,7 @@ buffer."
   (mouse-set-point e)
   (let ((buf (get-char-property (point) 'edit-buffer)))
     (if buf (org-src-switch-to-buffer buf 'continue)
-      (signal 'org-src-error "Something is wrong here"))))
+      (signal 'org-src-error '("Something is wrong here")))))
 
 (defun org-src-switch-to-buffer (buffer context)
   (case org-src-window-setup
@@ -639,7 +639,7 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
   "Exit special edit and protect problematic lines."
   (interactive)
   (unless (org-bound-and-true-p org-edit-src-from-org-mode)
-    (signal 'org-src-error "This is not a sub-editing buffer, something is wrong"))
+    (signal 'org-src-error '("This is not a sub-editing buffer, something is wrong")))
   (widen)
   (let* ((beg org-edit-src-beg-marker)
 	 (end org-edit-src-end-marker)
-- 
1.7.11.4


  reply	other threads:[~2012-12-13 23:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50A62865.8010904@gmail.com>
2012-12-07 15:36 ` bug#12905: 24.2.50; org: edit source block causes data loss Chong Yidong
     [not found] ` <87sj7han8a.fsf__16482.9143243425$1354894646$gmane$org@gnu.org>
2012-12-12 16:55   ` Bastien
2012-12-12 21:05     ` Bernt Hansen
2012-12-12 21:34       ` Jonathan Leech-Pepin
2012-12-12 21:51         ` Bernt Hansen
2012-12-12 23:18       ` Bastien
2012-12-13  3:27         ` Bernt Hansen
2012-12-13  3:37           ` Bernt Hansen
2012-12-13  4:50             ` Nick Dokos
2012-12-13 12:45               ` Bernt Hansen
2012-12-13 13:41                 ` Bernt Hansen
2012-12-13 10:36             ` Bastien
2012-12-13 13:42               ` Bernt Hansen
2012-12-13 14:36                 ` Le Wang
2012-12-13 15:17                   ` Bastien
2012-12-13 16:06                     ` Le Wang
2012-12-13 16:25                       ` Bastien
2012-12-13 23:40                         ` Le Wang
2012-12-13 23:50                           ` Le Wang [this message]
2012-12-14  9:38                           ` Bastien
2012-12-14  9:39                           ` Bastien
2012-12-16 14:39                             ` Le Wang
2012-12-14  9:40                           ` Bastien
2012-12-13 13:48               ` Bernt Hansen
2012-12-13 16:05                 ` Bastien
2012-12-14  0:04                   ` Bernt Hansen
2012-12-14  9:35                     ` Bastien
2012-12-14  9:57                     ` Le Wang
     [not found]   ` <87wqwnyzud.fsf@bzg.ath.cx>
2012-12-12 17:39     ` Andy Moreton

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM=K+iqaYq5jg65W2anv2DmS=A_uq-G3fKtzkAcreJb74h_+sA@mail.gmail.com' \
    --to=l26wang@gmail.com \
    --cc=bernt@norang.ca \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@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.
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).