From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: [new-exporter] org-export-before-parsing-hook GOTCHA Date: Fri, 15 Mar 2013 21:43:36 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGcPr-0005Lw-Sv for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 17:43:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGcPn-0002RT-3P for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 17:43:55 -0400 Received: from plane.gmane.org ([80.91.229.3]:58460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGcPm-0002Qi-NV for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 17:43:50 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UGcQ7-0006nY-R1 for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 22:44:12 +0100 Received: from 169.228.164.109 ([169.228.164.109]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Mar 2013 22:44:11 +0100 Received: from ccberry by 169.228.164.109 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Mar 2013 22:44:11 +0100 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@gnu.org Is this a feature or a bug? in org-export-as, there are these lines ,---- | (goto-char (point-min)) | (run-hook-with-args 'org-export-before-parsing-hook backend) `---- For some time, I used hook functions that usually reset the position of *point*. They worked fine. Recently, they produced strange results in subtree exports - a later headline was used as the title even when :EXPORT_TITLE: was set. Other properties like :EXPORT_FILE_NAME: seemed unaffected (OK). I have put `save-excursion' in my code, and all seems to be well. But I wonder if it is understood in defun'ing hooks that it is up to the coder to make sure that *point* gets put back where it needs to be. Or should there be another (goto-char (point-min)) after the lines above.