* Xemacs incompatibilities @ 2010-05-11 9:04 Dr. Volker Zell 2010-05-14 12:40 ` Carsten Dominik 0 siblings, 1 reply; 12+ messages in thread From: Dr. Volker Zell @ 2010-05-11 9:04 UTC (permalink / raw) To: emacs-orgmode Hi I'm using org-6.35i 1.) org-babel-python.el requires (require 'python) whereas Xemacs wants (require 'python-mode) 2.) (require 'htmlize nil t) should be changed to (require 'htmlize) for Xemacs in org-exp.el 3.) When editing a src block with C-c ' in a temporary buffer in it's native mode and then switching back with C-c ' to the original org file, whenever I try to save a file with C-x C-s (not only the org file) I'll get the message This is not a sub-editing buffer, something is wrong... Any body seeing this ? Ciao Volker ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Xemacs incompatibilities 2010-05-11 9:04 Xemacs incompatibilities Dr. Volker Zell @ 2010-05-14 12:40 ` Carsten Dominik 2010-05-15 10:09 ` Leo 2010-05-17 14:39 ` Michael Sperber 0 siblings, 2 replies; 12+ messages in thread From: Carsten Dominik @ 2010-05-14 12:40 UTC (permalink / raw) To: Dr. Volker Zell, Eric Schulte, Dan Davison, Michael Sperber Cc: mailing-list-org-mode Mode On May 11, 2010, at 11:04 AM, Dr. Volker Zell wrote: > Hi > > I'm using org-6.35i > > 1.) > > org-babel-python.el requires > > (require 'python) > > whereas Xemacs wants > > (require 'python-mode) This is a really non-standard way for a mode definition which I guess should be fixed in XEmacs. I have made that change anyway. Eric or Dan, please note this change I made in the Babel sources. > > 2.) > > (require 'htmlize nil t) > > should be changed to > > (require 'htmlize) > > for Xemacs in org-exp.el Fixed this as well. > > > 3.) > > When editing a src block with C-c ' in a temporary buffer in it's > native > mode and then switching back with C-c ' to the original org file, > whenever > I try to save a file with C-x C-s (not only the org file) I'll get > the message > > This is not a sub-editing buffer, something is wrong... I cannot help here. Michael? - Carsten ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Xemacs incompatibilities 2010-05-14 12:40 ` Carsten Dominik @ 2010-05-15 10:09 ` Leo 2010-05-17 14:39 ` Michael Sperber 1 sibling, 0 replies; 12+ messages in thread From: Leo @ 2010-05-15 10:09 UTC (permalink / raw) To: emacs-orgmode On 2010-05-14 13:40 +0100, Carsten Dominik wrote: > This is a really non-standard way for a mode definition which I guess > should be fixed in XEmacs. I have made that change anyway. Eric or > Dan, please note this change I made in the Babel sources. Python-mode.el and python.el are written by different people. They have significant differences. Leo -- CCL-USER> (if you fail to plan (plan to fail)) ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Xemacs incompatibilities 2010-05-14 12:40 ` Carsten Dominik 2010-05-15 10:09 ` Leo @ 2010-05-17 14:39 ` Michael Sperber 2010-05-17 14:46 ` Carsten Dominik 2010-05-20 16:31 ` Dr. Volker Zell 1 sibling, 2 replies; 12+ messages in thread From: Michael Sperber @ 2010-05-17 14:39 UTC (permalink / raw) To: Carsten Dominik; +Cc: Dan Davison, mailing-list-org-mode Mode, Dr. Volker Zell Carsten Dominik <carsten.dominik@gmail.com> writes: > This is a really non-standard way for a mode definition which I guess > should be fixed in XEmacs. I have made that change anyway. Eric or > Dan, please note this change I made in the Babel sources. As someone else pointed out, python-mode.el is something different from python.el: https://launchpad.net/python-mode In particular, fixing the require won't be enough: org-babel-python.el uses `run-python' and interacts with the inferior Python, whereas python-mode.el defines `py-shell'. Should I try to abstract over the differences? >> 3.) >> >> When editing a src block with C-c ' in a temporary buffer in it's >> native mode and then switching back with C-c ' to the original org >> file, whenever I try to save a file with C-x C-s (not only the org >> file) I'll get the message >> >> This is not a sub-editing buffer, something is wrong... Could you provide a little bit more context on what you did? I'm not very familiar with org-src (which I assume this is about), so a step-by-step recipe would help me greatly. -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Xemacs incompatibilities 2010-05-17 14:39 ` Michael Sperber @ 2010-05-17 14:46 ` Carsten Dominik 2010-05-17 18:47 ` Dan Davison 2010-05-24 14:22 ` Michael Sperber 2010-05-20 16:31 ` Dr. Volker Zell 1 sibling, 2 replies; 12+ messages in thread From: Carsten Dominik @ 2010-05-17 14:46 UTC (permalink / raw) To: Michael Sperber; +Cc: Dan Davison, mailing-list-org-mode Mode, Dr. Volker Zell On May 17, 2010, at 4:39 PM, Michael Sperber wrote: > > Carsten Dominik <carsten.dominik@gmail.com> writes: > >> This is a really non-standard way for a mode definition which I guess >> should be fixed in XEmacs. I have made that change anyway. Eric or >> Dan, please note this change I made in the Babel sources. > > As someone else pointed out, python-mode.el is something different > from > python.el: > > https://launchpad.net/python-mode > > In particular, fixing the require won't be enough: org-babel-python.el > uses `run-python' and interacts with the inferior Python, whereas > python-mode.el defines `py-shell'. > > Should I try to abstract over the differences? Yes, this would be much appreciated. (I think, Eric or Dan?) > >>> 3.) >>> >>> When editing a src block with C-c ' in a temporary buffer in it's >>> native mode and then switching back with C-c ' to the original org >>> file, whenever I try to save a file with C-x C-s (not only the org >>> file) I'll get the message >>> >>> This is not a sub-editing buffer, something is wrong... > > Could you provide a little bit more context on what you did? I'm not > very familiar with org-src (which I assume this is about), so a > step-by-step recipe would help me greatly. > > -- > Cheers =8-} Mike > Friede, Völkerverständigung und überhaupt blabla - Carsten ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Xemacs incompatibilities 2010-05-17 14:46 ` Carsten Dominik @ 2010-05-17 18:47 ` Dan Davison 2010-05-20 2:41 ` Dan Davison 2010-05-24 14:22 ` Michael Sperber 1 sibling, 1 reply; 12+ messages in thread From: Dan Davison @ 2010-05-17 18:47 UTC (permalink / raw) To: Carsten Dominik Cc: mailing-list-org-mode Mode, Michael Sperber, Dr. Volker Zell Carsten Dominik <carsten.dominik@gmail.com> writes: > On May 17, 2010, at 4:39 PM, Michael Sperber wrote: > >> >> Carsten Dominik <carsten.dominik@gmail.com> writes: >> >>> This is a really non-standard way for a mode definition which I guess >>> should be fixed in XEmacs. I have made that change anyway. Eric or >>> Dan, please note this change I made in the Babel sources. >> >> As someone else pointed out, python-mode.el is something different >> from >> python.el: >> >> https://launchpad.net/python-mode >> >> In particular, fixing the require won't be enough: org-babel-python.el >> uses `run-python' and interacts with the inferior Python, whereas >> python-mode.el defines `py-shell'. >> >> Should I try to abstract over the differences? > > Yes, this would be much appreciated. (I think, Eric or Dan?) Hi Michael, Yes, that would be appreciated. As you say, our only dependence on python.el is this requirement for a suitable inferior python comint buffer, currently supplied by `run-python'. I'll just note that this is not a requirement for absolutely vanilla, default org-babel operation: by default org-babel runs interpreters as external shell processes; persistent emacs sessions using inferior processes are made available as an option for certain languages via the :session argument. Dan > >> >>>> 3.) >>>> >>>> When editing a src block with C-c ' in a temporary buffer in it's >>>> native mode and then switching back with C-c ' to the original org >>>> file, whenever I try to save a file with C-x C-s (not only the org >>>> file) I'll get the message >>>> >>>> This is not a sub-editing buffer, something is wrong... >> >> Could you provide a little bit more context on what you did? I'm not >> very familiar with org-src (which I assume this is about), so a >> step-by-step recipe would help me greatly. >> >> -- >> Cheers =8-} Mike >> Friede, Völkerverständigung und überhaupt blabla > > - Carsten ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Xemacs incompatibilities 2010-05-17 18:47 ` Dan Davison @ 2010-05-20 2:41 ` Dan Davison 0 siblings, 0 replies; 12+ messages in thread From: Dan Davison @ 2010-05-20 2:41 UTC (permalink / raw) To: Carsten Dominik Cc: mailing-list-org-mode Mode, Michael Sperber, Dr. Volker Zell [...] >>>>> 3.) >>>>> >>>>> When editing a src block with C-c ' in a temporary buffer in it's >>>>> native mode and then switching back with C-c ' to the original org >>>>> file, whenever I try to save a file with C-x C-s (not only the org >>>>> file) I'll get the message >>>>> >>>>> This is not a sub-editing buffer, something is wrong... >>> >>> Could you provide a little bit more context on what you did? I'm not >>> very familiar with org-src (which I assume this is about), so a >>> step-by-step recipe would help me greatly. Hi Mike, Has any progress been made on this bug report? If not, please let me know if I can help. It sounds like the bug could be triggered by entering the following in an org buffer: #+begin_src emacs-lisp nil #+end_src then, with point anywhere in the block, issue C-c '. This should put you in an elisp mode buffer. At that point the following should work: - editing the elisp code followed by C-x C-s should save the elisp back into the block in the org buffer - C-c ' should return you to the org buffer If you would like me to investigate, would you mind providing instructions as to what version of xemacs to download and what steps I need to take to get the latest org-mode working with it? I'm on Ubuntu 10.04. Dan >>> >>> -- >>> Cheers =8-} Mike >>> Friede, Völkerverständigung und überhaupt blabla >> >> - Carsten ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Xemacs incompatibilities 2010-05-17 14:46 ` Carsten Dominik 2010-05-17 18:47 ` Dan Davison @ 2010-05-24 14:22 ` Michael Sperber 1 sibling, 0 replies; 12+ messages in thread From: Michael Sperber @ 2010-05-24 14:22 UTC (permalink / raw) To: Carsten Dominik; +Cc: Dan Davison, mailing-list-org-mode Mode, Dr. Volker Zell [-- Attachment #1: Type: text/plain, Size: 1336 bytes --] Carsten Dominik <carsten.dominik@gmail.com> writes: > On May 17, 2010, at 4:39 PM, Michael Sperber wrote: > >> In particular, fixing the require won't be enough: org-babel-python.el >> uses `run-python' and interacts with the inferior Python, whereas >> python-mode.el defines `py-shell'. >> >> Should I try to abstract over the differences? > > Yes, this would be much appreciated. (I think, Eric or Dan?) OK, I've attached a patch that makes `org-babel-python' work on XEmacs. Most of the issues are pure XEmacs issues. Notes: - XEmacs doesn't have [[:digit:]] - I hope to rectify this in the future, but it seems there's no downside in this particular case to replacing by [0-9]. - XEmacs doesn't have `move-end-of-line', but does have `end-of-line'. I don't understand the intent of having both of these, but the code seems fine with `end-of-line'. - It seems there are way too few `require's throughout org-babel. I don't know if it's OK to add the ones I needed. - `org-babel-python-evaluate' looked broken as-is: It doesn't use the `body' argument properly, the result is (I think) processed in the wrong order and not properly split into lines. I've fixed all these, but a review is probably in order. -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla [-- Attachment #2: Type: text/plain, Size: 12385 bytes --] diff --git a/contrib/babel/lisp/langs/org-babel-R.el b/contrib/babel/lisp/langs/org-babel-R.el index 289c73d..c1dd67a 100644 --- a/contrib/babel/lisp/langs/org-babel-R.el +++ b/contrib/babel/lisp/langs/org-babel-R.el @@ -89,7 +89,7 @@ called by `org-babel-execute-src-block'." vars))) (org-babel-comint-in-buffer session (mapc (lambda (var) - (move-end-of-line 1) (insert var) (comint-send-input nil t) + (end-of-line 1) (insert var) (comint-send-input nil t) (org-babel-comint-wait-for-output session)) var-lines)) session)) diff --git a/contrib/babel/lisp/langs/org-babel-octave.el b/contrib/babel/lisp/langs/org-babel-octave.el index 41a5be6..6cb244f 100644 --- a/contrib/babel/lisp/langs/org-babel-octave.el +++ b/contrib/babel/lisp/langs/org-babel-octave.el @@ -92,7 +92,7 @@ specifying a variable of the same value." vars))) (org-babel-comint-in-buffer session (mapc (lambda (var) - (move-end-of-line 1) (insert var) (comint-send-input nil t) + (end-of-line 1) (insert var) (comint-send-input nil t) (org-babel-comint-wait-for-output session)) var-lines)) session)) diff --git a/contrib/babel/lisp/langs/org-babel-python.el b/contrib/babel/lisp/langs/org-babel-python.el index ea2a217..6c8e5de 100644 --- a/contrib/babel/lisp/langs/org-babel-python.el +++ b/contrib/babel/lisp/langs/org-babel-python.el @@ -30,6 +30,8 @@ ;;; Code: (require 'org-babel) +(require 'org-babel-tangle) +(require 'org-babel-comint) (require (if (featurep 'xemacs) 'python-mode 'python)) (org-babel-add-interpreter "python") @@ -75,7 +77,7 @@ called by `org-babel-execute-src-block'." vars))) (org-babel-comint-in-buffer session (mapc (lambda (var) - (move-end-of-line 1) (insert var) (comint-send-input nil t) + (end-of-line 1) (insert var) (comint-send-input) (org-babel-comint-wait-for-output session)) var-lines)) session)) @@ -123,7 +125,21 @@ then create. Return the initialized session." (save-window-excursion (let* ((session (if session (intern session) :default)) (python-buffer (org-babel-python-session-buffer session))) - (run-python) + (cond + ((fboundp 'run-python) ; python.el + (run-python)) + ((fboundp 'py-shell) ; python-mode.el + ;; `py-shell' creates a buffer whose name is the value of + ;; `py-which-bufname' with '*'s at the beginning and end + (let* ((bufname (if python-buffer + (replace-regexp-in-string "^\\*\\([^*]+\\)\\*$" "\\1" python-buffer) ; zap surrounding * + (concat "Python-" (symbol-name session)))) + (py-which-bufname bufname)) ; avoid making a mess with buffer-local + (py-shell) + (setq python-buffer (concat "*" bufname "*")))) + (t + (error "No function available for running an inferior python."))) + (setq org-babel-python-buffers (cons (cons session python-buffer) (assq-delete-all session org-babel-python-buffers))) session))) @@ -200,19 +216,24 @@ last statement in BODY, as elisp." (org-babel-comint-in-buffer buffer (let* ((raw (org-babel-comint-with-output buffer org-babel-python-eoe-indicator t ;; for some reason python is fussy, and likes enters after every input - (mapc (lambda (statement) (insert statement) (comint-send-input nil t)) - (split-string (org-babel-trim full-body) "[\r\n]+")) - (comint-send-input nil t) (comint-send-input nil t) - (if (member "pp" result-params) - (mapc (lambda (statement) (insert statement) (comint-send-input nil t)) - org-babel-python-pp-last-value-eval) - (insert org-babel-python-last-value-eval)) - (comint-send-input nil t) (comint-send-input nil t) - (insert org-babel-python-eoe-indicator) - (comint-send-input nil t))) + (let ((comint-process-echoes nil)) + (mapc (lambda (statement) (insert statement) (comint-send-input)) + (split-string (org-babel-trim body) "[\r\n]+")) + (comint-send-input) (comint-send-input) + (if (member "pp" result-params) + (mapc (lambda (statement) (insert statement) (comint-send-input)) + org-babel-python-pp-last-value-eval) + (insert org-babel-python-last-value-eval)) + (comint-send-input) (comint-send-input) + (insert org-babel-python-eoe-indicator) + (comint-send-input)))) + (raw (apply #'append ; split further + (mapcar #'(lambda (r) + (split-string r "[\r\n]+")) + raw))) (results (delete org-babel-python-eoe-indicator (cdr (member org-babel-python-eoe-indicator - (reverse (mapcar #'org-babel-trim raw))))))) + (mapcar #'org-babel-trim raw)))))) (unless (or (member "code" result-params) (member "pp" result-params)) (setq results (mapcar #'org-babel-python-read-string results))) (case result-type diff --git a/contrib/babel/lisp/org-babel-lob.el b/contrib/babel/lisp/org-babel-lob.el index 866585c..7bdca5d 100644 --- a/contrib/babel/lisp/org-babel-lob.el +++ b/contrib/babel/lisp/org-babel-lob.el @@ -90,7 +90,7 @@ should be renamed to bring out this similarity, perhaps involving the word 'call'." (let ((case-fold-search t)) (save-excursion - (move-beginning-of-line 1) + (beginning-of-line 1) (if (looking-at org-babel-lob-one-liner-regexp) (mapcar #'org-babel-clean-text-properties (list (format "%s(%s)" (match-string 1) (match-string 2)) diff --git a/contrib/babel/lisp/org-babel-tangle.el b/contrib/babel/lisp/org-babel-tangle.el index e2aa44a..c86e6f8 100644 --- a/contrib/babel/lisp/org-babel-tangle.el +++ b/contrib/babel/lisp/org-babel-tangle.el @@ -158,8 +158,8 @@ references." (goto-char (point-min)) (while (or (re-search-forward "\\[\\[file:.*\\]\\[.*\\]\\]" nil t) (re-search-forward "<<[^[:space:]]*>>" nil t)) - (delete-region (save-excursion (move-beginning-of-line 1) (point)) - (save-excursion (move-end-of-line 1) (forward-char 1) (point))))) + (delete-region (save-excursion (beginning-of-line 1) (point)) + (save-excursion (end-of-line 1) (forward-char 1) (point))))) (defun org-babel-tangle-collect-blocks (&optional lang) "Collect all source blocks in the current org-mode file. @@ -219,7 +219,7 @@ form (when commentable (insert "\n") (comment-region (point) (progn (insert text) (point))) - (move-end-of-line nil) + (end-of-line nil) (insert "\n")))) (let ((link (first spec)) (source-name (second spec)) diff --git a/contrib/babel/lisp/org-babel.el b/contrib/babel/lisp/org-babel.el index d4313b2..ce753b4 100644 --- a/contrib/babel/lisp/org-babel.el +++ b/contrib/babel/lisp/org-babel.el @@ -246,7 +246,7 @@ block." (if (and (not arg) new-hash (equal new-hash old-hash)) (save-excursion ;; return cached result (goto-char (org-babel-where-is-src-block-result nil info)) - (move-end-of-line 1) (forward-char 1) + (end-of-line 1) (forward-char 1) (setq result (org-babel-read-result)) (message (replace-regexp-in-string "%" "%%" (format "%S" result))) result) @@ -305,7 +305,7 @@ session. After loading the body this pops open the session." (pop-to-buffer (funcall (intern (concat "org-babel-load-session:" lang)) session body params)) - (move-end-of-line 1))) + (end-of-line 1))) (defun org-babel-switch-to-session (&optional arg info) "Switch to the session of the current source-code block. @@ -333,7 +333,7 @@ of the source block to the kill ring." (pop-to-buffer (funcall (intern (format "org-babel-%s-initiate-session" lang)) session params)) - (move-end-of-line 1))) + (end-of-line 1))) (defalias 'org-babel-pop-to-session 'org-babel-switch-to-session) @@ -349,7 +349,7 @@ results already exist." (goto-char (or (and (not re-run) (org-babel-where-is-src-block-result)) (progn (org-babel-execute-src-block) (org-babel-where-is-src-block-result)))) - (move-end-of-line 1) (forward-char 1) + (end-of-line 1) (forward-char 1) ;; open the results (if (looking-at org-bracket-link-regexp) ;; file results @@ -766,8 +766,8 @@ If the point is not on a source block then return nil." (re-search-backward "^[ \t]*#\\+begin_src" nil t) (setq top (point)) (re-search-forward "^[ \t]*#\\+end_src" nil t) (setq bottom (point)) (< top initial) (< initial bottom) - (goto-char top) (move-beginning-of-line 1) - (looking-at org-babel-src-block-regexp) + (progn (goto-char top) (beginning-of-line 1) + (looking-at org-babel-src-block-regexp)) (point)))))) (defun org-babel-goto-named-source-block (&optional name) @@ -800,7 +800,7 @@ buffer or nil if no such result exists." (when (re-search-forward (concat org-babel-result-regexp "[ \t]" (regexp-quote name) "[ \t\n\f\v\r]") nil t) - (move-beginning-of-line 0) (point)))) + (beginning-of-line 0) (point)))) (defun org-babel-where-is-src-block-result (&optional insert info hash) "Return the point at the beginning of the result of the current @@ -816,13 +816,13 @@ following the source block." (when head (goto-char head)) (or (and name (org-babel-find-named-result name)) (and (or on-lob-line (re-search-forward "^[ \t]*#\\+end_src" nil t)) - (progn (move-end-of-line 1) + (progn (end-of-line 1) (if (eobp) (insert "\n") (forward-char 1)) (setq end (point)) (or (and (not name) (progn ;; unnamed results line already exists (re-search-forward "[^ \f\t\n\r\v]" nil t) - (move-beginning-of-line 1) + (beginning-of-line 1) (looking-at (concat org-babel-result-regexp "\n")))) ;; or (with optional insert) back up and @@ -835,7 +835,7 @@ following the source block." (when hash (concat "["hash"]")) ":" (when name (concat " " name)) "\n")) - (move-beginning-of-line 0) + (beginning-of-line 0) (if hash (org-babel-hide-hash)) t))) (point)))))) @@ -1035,7 +1035,7 @@ directory then expand relative links." ((< size org-babel-min-lines-for-block-output) (goto-char beg) (dotimes (n size) - (move-beginning-of-line 1) (insert ": ") (forward-line 1))) + (beginning-of-line 1) (insert ": ") (forward-line 1))) (t (goto-char beg) (insert (if results-switches @@ -1192,7 +1192,7 @@ block but are passed literally to the \"example-block\"." (setq prefix (buffer-substring (match-beginning 0) (save-excursion - (move-beginning-of-line 1) (point))))) + (beginning-of-line 1) (point))))) ;; add interval to new-body (removing noweb reference) (goto-char (match-beginning 0)) (nb-add (buffer-substring index (point))) @@ -1260,7 +1260,7 @@ This is taken almost directly from `org-read-prop'." (defun org-babel-number-p (string) "Return t if STRING represents a number" - (if (and (string-match "^-?[[:digit:]]*\\.?[[:digit:]]*$" string) + (if (and (string-match "^-?[0-9]*\\.?[0-9]*$" string) (= (match-end 0) (length string))) (string-to-number string))) [-- Attachment #3: Type: text/plain, Size: 201 bytes --] _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: Xemacs incompatibilities 2010-05-17 14:39 ` Michael Sperber 2010-05-17 14:46 ` Carsten Dominik @ 2010-05-20 16:31 ` Dr. Volker Zell 2010-05-24 8:39 ` PATCH: " Michael Sperber 2010-05-24 8:41 ` PATCH: Fix minor XEmacs compatibility issue Michael Sperber 1 sibling, 2 replies; 12+ messages in thread From: Dr. Volker Zell @ 2010-05-20 16:31 UTC (permalink / raw) To: Michael Sperber Cc: Dan Davison, mailing-list-org-mode Mode, Dr. Volker Zell, Carsten Dominik >>>>> Michael Sperber writes: > Could you provide a little bit more context on what you did? I'm not > very familiar with org-src (which I assume this is about), so a > step-by-step recipe would help me greatly. I'm using o XEmacs 21.4 (patch 22) "Instant Classic" [Lucid] (i686-pc-cygwin, Mule) of Sat Jan 31 2009 on vzell-de Here the recipe: * xemacs -no-init-file * Evaluate in the *scratch* buffer (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (require 'org-install) * Open a file test.org with the following contents: #+BEGIN_SRC emacs-lisp -n (setq a t) #+END_SRC * With the cursor inside the source code press C-c ' * An emacs-lisp buffer pops up with the following message in the minibuffer: -> Edit, then exit with C-c ' (C-c and single quote) * After editing press C-c ' again, and you're back in the org buffer with the source code replaced * Now try to save the buffer. From now on, when you try to save any buffer you'll get -> This is not a sub-editing buffer, something is wrong.. in the minibuffer Ciao Volker ^ permalink raw reply [flat|nested] 12+ messages in thread
* PATCH: Xemacs incompatibilities 2010-05-20 16:31 ` Dr. Volker Zell @ 2010-05-24 8:39 ` Michael Sperber 2010-05-24 13:23 ` Dan Davison 2010-05-24 8:41 ` PATCH: Fix minor XEmacs compatibility issue Michael Sperber 1 sibling, 1 reply; 12+ messages in thread From: Michael Sperber @ 2010-05-24 8:39 UTC (permalink / raw) To: Dr. Volker Zell; +Cc: Dan Davison, mailing-list-org-mode Mode, Carsten Dominik [-- Attachment #1: Type: text/plain, Size: 492 bytes --] "Dr. Volker Zell" <dr.volker.zell@oracle.com> writes: > o XEmacs 21.4 (patch 22) "Instant Classic" [Lucid] (i686-pc-cygwin, Mule) of Sat Jan 31 2009 on vzell-de Ah ... OK, this is a 21.4 issue. The attached patch fixes it. `write-contents-hooks' is not buffer-local by default in 21.4, which is why the the hook for exiting the org-src mode gets run when anything saved, and that checks for the mode. -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla [-- Attachment #2: Type: text/plain, Size: 797 bytes --] diff --git a/lisp/org-src.el b/lisp/org-src.el index 0ac8e6c..63c749c 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -644,8 +644,11 @@ the language, a switch telling if the content should be in a single line." (setq buffer-file-name (concat (buffer-file-name (marker-buffer org-edit-src-beg-marker)) "[" (buffer-name) "]")) - (set (if (featurep 'xemacs) 'write-contents-hooks 'write-contents-functions) - '(org-edit-src-save))) + (if (featurep 'xemacs) + (progn + (make-variable-buffer-local 'write-contents-hooks) ; needed only for 21.4 + (setq write-contents-hooks '(org-edit-src-save))) + (setq write-contents-functions '(org-edit-src-save)))) (setq buffer-read-only t)))) (org-add-hook 'org-src-mode-hook 'org-src-mode-configure-edit-buffer) [-- Attachment #3: Type: text/plain, Size: 201 bytes --] _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: PATCH: Xemacs incompatibilities 2010-05-24 8:39 ` PATCH: " Michael Sperber @ 2010-05-24 13:23 ` Dan Davison 0 siblings, 0 replies; 12+ messages in thread From: Dan Davison @ 2010-05-24 13:23 UTC (permalink / raw) To: Michael Sperber; +Cc: mailing-list-org-mode Mode, Carsten Dominik Michael Sperber <sperber@deinprogramm.de> writes: > "Dr. Volker Zell" <dr.volker.zell@oracle.com> writes: > >> o XEmacs 21.4 (patch 22) "Instant Classic" [Lucid] (i686-pc-cygwin, Mule) of Sat Jan 31 2009 on vzell-de > > Ah ... OK, this is a 21.4 issue. The attached patch fixes it. > > `write-contents-hooks' is not buffer-local by default in 21.4, which is > why the the hook for exiting the org-src mode gets run when anything > saved, and that checks for the mode. Thanks for sorting that out Michael. I've applied the patch. Dan ^ permalink raw reply [flat|nested] 12+ messages in thread
* PATCH: Fix minor XEmacs compatibility issue 2010-05-20 16:31 ` Dr. Volker Zell 2010-05-24 8:39 ` PATCH: " Michael Sperber @ 2010-05-24 8:41 ` Michael Sperber 1 sibling, 0 replies; 12+ messages in thread From: Michael Sperber @ 2010-05-24 8:41 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 249 bytes --] I'd appreciate if this one could be applied. I'll fix XEmacs to accept #B<binary> in the future, but I'd appreciate this one anyway. Doesn't really add complexity ... -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla [-- Attachment #2: Type: text/plain, Size: 440 bytes --] diff --git a/lisp/org-id.el b/lisp/org-id.el index 66b1790..cf61f8a 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -330,9 +330,9 @@ So a typical ID could look like \"Org:4nd91V40HI\"." (substring rnd 13 16) (format "%x" (logior - #B10000000 + #b10000000 (logand - #B10111111 + #b10111111 (string-to-number (substring rnd 16 18) 16)))) (substring rnd 18 20) [-- Attachment #3: Type: text/plain, Size: 201 bytes --] _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-05-24 14:22 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-11 9:04 Xemacs incompatibilities Dr. Volker Zell 2010-05-14 12:40 ` Carsten Dominik 2010-05-15 10:09 ` Leo 2010-05-17 14:39 ` Michael Sperber 2010-05-17 14:46 ` Carsten Dominik 2010-05-17 18:47 ` Dan Davison 2010-05-20 2:41 ` Dan Davison 2010-05-24 14:22 ` Michael Sperber 2010-05-20 16:31 ` Dr. Volker Zell 2010-05-24 8:39 ` PATCH: " Michael Sperber 2010-05-24 13:23 ` Dan Davison 2010-05-24 8:41 ` PATCH: Fix minor XEmacs compatibility issue Michael Sperber
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).