From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: [NEW] navi-mode for org files Date: Tue, 09 Apr 2013 09:58:53 +0200 Message-ID: <87wqscjfsy.fsf@gmail.com> References: <878v4y9ziu.fsf@gmail.com> <877gkcvn4a.fsf@gmail.com> <87d2u4u0li.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPTSK-0002Po-A0 for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 03:59:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPTSI-0000x4-Ip for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 03:59:04 -0400 Received: from plane.gmane.org ([80.91.229.3]:52251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPTSI-0000wx-Bn for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 03:59:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UPTSH-0001qW-Fb for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 09:59:01 +0200 Received: from e178058213.adsl.alicedsl.de ([85.178.58.213]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Apr 2013 09:59:01 +0200 Received: from tjolitz by e178058213.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Apr 2013 09:59:01 +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@gnu.org Charles Berry writes: > Thorsten Jolitz gmail.com> writes: > >> >> Charles Berry ucsd.edu> writes: >> >> > `------------------------------------------------------------------------ >> >> > >> >> > I cannot seem to get this to work. If I try to execute >> >> > >> >> > ;; # #+begin_src emacs-lisp >> >> > ;; # (require 'outshine) >> >> > ;; # (add-hook ‘outline-minor-mode-hook ‘outshine-hook-function) >> >> > ;; # #+end_src >> >> > >> >> > the add-hook returns >> >> > >> >> > Debugger entered--Lisp error: (void-variable ‘outline-minor-mode-hook) >> >> > >> >> > > > SOLVED! > > The clue was: > > ,---- > | (add-hook HOOK FUNCTION &optional APPEND LOCAL) > | > | Add to the value of HOOK the function FUNCTION. > | > |[...] > | > | HOOK should be a symbol, and FUNCTION may be any valid function. If > | HOOK is void, it is first set to nil. If HOOK's value is a single > | function, it is changed to a list of functions. > `---- > > So how can this not work? > > Well, with point on the character just before "outline-minor...", > > C-u C-x = > > tells me that I was *not* looking at an apostrophe!!! > > ,---- > | position: 2519 of 66947 (4%), column: 17 > | character: ‘ (displayed as ‘) (codepoint 8216, #o20030, > |[snip] > | Character code properties: customize what to show > | name: LEFT SINGLE QUOTATION MARK > | old-name: SINGLE TURNED COMMA QUOTATION MARK > | general-category: Pi (Punctuation, Initial quote) > | decomposition: (8216) ('‘') > `---- > > So, add-hook was trying to reference a variable called > > "‘outline-minor-mode-hook" > > If I replace the "left single quotation marks" in that line with > "apostrophes", outline-minor-mode seems to work. > > :-) > > Maybe a similar edit of the source would protect others like me who > copy and paste what they see rather than typing it in longhand. Thanks for finding this strange bug! I don't even have LEFT SINGLE QUOTATION MARK on my keyboard and wasn't aware of its existance, so this must be a bug caused by 'copy&paste' or so. No idea where this comes from. Actually, for me it wasn't even a bug since it only appereared in the comment-sections (and thus in the README files) of the libraries, not in the code (in my dot emacs) itself. I fixed that and pushed new versions on Github. Sorry for the hassle. -- cheers, Thorsten