From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Richard Subject: Re: bisected Date: Thu, 30 Apr 2015 13:46:55 +0200 Message-ID: <87oam56dow.fsf@yahoo.fr> References: <20150430100450.1112136b@gaia> <20150430094957.GC22882@boo.workgroup> <87wq0u53u6.fsf@yahoo.fr> <20150430105304.GD22882@boo.workgroup> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnmuG-0000ku-FR for emacs-orgmode@gnu.org; Thu, 30 Apr 2015 07:45:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnmuB-0008Lr-DA for emacs-orgmode@gnu.org; Thu, 30 Apr 2015 07:45:28 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:37678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnmuB-0008Lh-7p for emacs-orgmode@gnu.org; Thu, 30 Apr 2015 07:45:23 -0400 In-Reply-To: <20150430105304.GD22882@boo.workgroup> (Gregor Zattler's message of "Thu, 30 Apr 2015 12:53:04 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Gregor Zattler 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.