From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takaaki ISHIKAWA Subject: Re: org-tree-slide annoyance Date: Tue, 16 Jul 2013 14:46:34 +0900 Message-ID: References: <87a9lo6x3f.fsf@bye.fritz.box> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyy5y-0003ah-2j for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 01:46:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uyy5w-00084J-SL for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 01:46:42 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:37739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyy5w-000848-LA for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 01:46:40 -0400 Received: by mail-pb0-f50.google.com with SMTP id wz7so305427pbc.37 for ; Mon, 15 Jul 2013 22:46:39 -0700 (PDT) In-Reply-To: <87a9lo6x3f.fsf@bye.fritz.box> 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: henry atts Cc: emacs-orgmode@gnu.org Hi Henry, Thank you for using org-tree-slide and reporting the issue. Please use the following patch to avoid the error. PATCH: Replace the original code with ---- (defun ots-display-tree-with-narrow () "Show a tree with narrowing and also set a header at the head of slide." (goto-char (point-at-bol)) (when (ots-last-heading-position) (hide-subtree) ; support CONTENT (subtrees are shown) (org-show-entry) (show-children) (org-cycle-hide-drawers 'all) (org-narrow-to-subtree)) (setq display-tree-slide-string (if (equal org-tree-slide-modeline-display 'outside) (ots-count-slide (point)) "")) (when org-tree-slide-slide-in-effect (ots-slide-in org-tree-slide-slide-in-brank-lines)) (when org-tree-slide-header (ots-show-slide-header))) ---- This patch is a tentative code for checking behavior in your environments, but I think you will be able to open org files without heading. I'll update it again within a few days. Best, Takaaki On Jul 15, 2013, at 5:33 PM, henry atts wrote: > I use org-tree-slide-mode by default with > > (add-hook 'org-mode-hook 'org-tree-slide-mode) > > This works kind of acceptable minus some minor annoyances. But one thing > makes it nearly unusuable. tree-slide rigidly expects at least one > header. So if I open an org file without heading, or if I create a new > one, I get an error message: > > File mode specification error: (error "before first heading") > > If I include a setup file with `#+SETUPFILE:', which of course has no > headings in it, org-tree-slide stops working at all. > > henry > > -- > web: http://literaturlatenight.de > jabberID: atting@jabber.at > > -- Takaaki ISHIKAWA GITI, Waseda University :) http://about.me/takaxp