all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* allout bug
@ 2006-09-21 13:15 Stephen Berman
  2006-09-21 16:51 ` Ken Manheimer
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Berman @ 2006-09-21 13:15 UTC (permalink / raw)


If you call allout-show-current-branches on a heading that contains
subheadings, it raises a "Wrong type argument: number-or-marker-p"
error.[1] You also get this error if you use `+' in an exposure-spec
applied to a heading that contains subheadings.  The reason in both
cases is that allout-show-current-branches calls allout-show-children
with argument `t', which is passed to the `levels' argument of
allout-chart-subtree and there barfs on the first numerical comparison
test it hits.  I don't know what the best fix for this is, but the
following patch to allout-chart-subtree has worked fine for me so far,
though it looks like an ugly hack:

*** cvsroot/emacs/lisp/allout.el	2006-09-17 12:24:22.000000000 +0200
--- allout.el	                        2006-09-19 16:37:44.000000000 +0200
***************
*** 2551,2556 ****
--- 2551,2557 ----
      (while (and (not (eobp))
  					; Still within original topic?
  		(< orig-depth (setq curr-depth allout-recent-depth))
+ 		(setq levels curr-depth)
  		(cond ((= prev-depth curr-depth)
  		       ;; Register this one and move on:
  		       (setq chart (cons allout-recent-prefix-beginning chart))

It seems more logical not to pass `t' in allout-show-children but
instead a number that specifies the maximum heading depth.  But what
determines that?  Maybe it could somehow be tied to
max-lisp-eval-depth.  By the way, this bug has existed since at least
allout.el version 1.29.4.2 from Emacs 21.3.

Steve Berman

Footnotes: 
[1] You only get the error if point is on the visible part of the
heading; if point is on the invisible part, `t' does not get passed to
the `levels' argument of allout-chart-subtree.  In this case, however,
the entire subtree is exposed, which seems to circumvent the intended
effect of allout-show-current-branches.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-21 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-21 13:15 allout bug Stephen Berman
2006-09-21 16:51 ` Ken Manheimer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.