Gregor Zattler <telegr...@gmx.net> writes: > Sorry, no: >From Bastien's comment, I wonder : does the following patch helps ?
--- /dev/fd/63 2015-04-30 13:44:20.900676564 +0200 +++ /tmp/org-src.el 2015-04-30 13:43:50.924673810 +0200 @@ -539,35 +539,36 @@ - When formatting a source code snippet for export with htmlize. There is a mode hook, and keybindings for `org-edit-src-exit' and `org-edit-src-save'" - (when org-edit-src-persistent-message - (org-set-local - 'header-line-format - (substitute-command-keys - (if org-src--allow-write-back - "Edit, then exit with \\[org-edit-src-exit] or abort with \ + (when org-src-mode + (when org-edit-src-persistent-message + (org-set-local + 'header-line-format + (substitute-command-keys + (if org-src--allow-write-back + "Edit, then exit with \\[org-edit-src-exit] or abort with \ \\[org-edit-src-abort]" - "Exit with \\[org-edit-src-exit] or abort with \ + "Exit with \\[org-edit-src-exit] or abort with \ \\[org-edit-src-abort]")))) - ;; Possibly activate various auto-save features (for the edit buffer - ;; or the source buffer). - (when org-edit-src-turn-on-auto-save - (setq buffer-auto-save-file-name - (concat (make-temp-name "org-src-") - (format-time-string "-%Y-%d-%m") - ".txt"))) - (unless (or org-src--auto-save-timer (zerop org-edit-src-auto-save-idle-delay)) - (setq org-src--auto-save-timer - (run-with-idle-timer - org-edit-src-auto-save-idle-delay t - (lambda () - (let (edit-flag) - (dolist (b (buffer-list)) - (when (org-src-edit-buffer-p) - (unless edit-flag (setq edit-flag t)) - (when (buffer-modified-p) (org-edit-src-save)))) - (unless edit-flag - (cancel-timer org-src--auto-save-timer) - (setq org-src--auto-save-timer nil)))))))) + ;; Possibly activate various auto-save features (for the edit buffer + ;; or the source buffer). + (when org-edit-src-turn-on-auto-save + (setq buffer-auto-save-file-name + (concat (make-temp-name "org-src-") + (format-time-string "-%Y-%d-%m") + ".txt"))) + (unless (or org-src--auto-save-timer (zerop org-edit-src-auto-save-idle-delay)) + (setq org-src--auto-save-timer + (run-with-idle-timer + org-edit-src-auto-save-idle-delay t + (lambda () + (let (edit-flag) + (dolist (b (buffer-list)) + (when (org-src-edit-buffer-p) + (unless edit-flag (setq edit-flag t)) + (when (buffer-modified-p) (org-edit-src-save)))) + (unless edit-flag + (cancel-timer org-src--auto-save-timer) + (setq org-src--auto-save-timer nil))))))))) (defun org-src-mode-configure-edit-buffer () (when (org-bound-and-true-p org-src--from-org-mode) -- Nicolas.