From: "Ken Manheimer" <ken.manheimer@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: allout bugfixes - small bugs in charts, exposure specs
Date: Sat, 30 Sep 2006 17:29:20 -0400 [thread overview]
Message-ID: <2cd46e7f0609301429k5aa9d6f2q25081b8a0c0bae0f@mail.gmail.com> (raw)
In-Reply-To: <877izl6ul5.fsf@escher.local.home>
[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]
my apologies, steve - i was too cursory when i looked back through my
allout correspondance. i really do appreciate the fix, even if i
didn't keep your name straight!
i've attached a new ChangeLog fragment, with separate entries for
stephen's and my changes (and a formatting error corrected, besides),
and the same, consolidated patch as before.
ken
On 9/30/06, Stephen Berman <Stephen.Berman@gmx.net> wrote:
> On Sat, 30 Sep 2006 13:04:24 -0400 Richard Stallman <rms@gnu.org> wrote:
>
> > (allout-expose-topic): Rectify implementation of "+" spec, so that
> > the subtrees are hidden and only the headlines are exposed.
> > (Thanks to bill white for contributing this fix.)
> >
> > Please don't ever put other people's code under your name in the
> > change log file. That would confuse our copyright clerk.
> >
> > If that change was written by Bill White, you should put it
> > in a change log entry with his name on it, not under your name.
>
> Since you seem to want an accurate record, I feel compelled to say
> that, unless Bill White happened to send Ken the same patch as I did,
> I think the change he referred to is one I sent him. Since it's only
> a three line patch, I have no objection to it appearing under Ken's
> name. If you think it's important that it appear under my name, of
> course I have no objection to that either (and if copyright assignment
> is necessary, I did sign papers for Emacs some years ago).
>
> Steve Berman
[-- Attachment #2: allout-patch.txt --]
[-- Type: text/plain, Size: 5860 bytes --]
--- allout.el 19 Sep 2006 17:55:44 -0400 1.84
+++ allout.el 29 Sep 2006 13:19:06 -0400
@@ -2202,8 +2202,9 @@
(save-excursion
(allout-beginning-of-current-line)
(and (looking-at allout-regexp)
- (not (allout-aberrant-container-p))
- (allout-prefix-data))))
+ (allout-prefix-data)
+ (or (> allout-recent-depth allout-doublecheck-at-and-shallower)
+ (not (allout-aberrant-container-p))))))
;;;_ > allout-on-heading-p ()
(defalias 'allout-on-heading-p 'allout-on-current-heading-p)
;;;_ > allout-e-o-prefix-p ()
@@ -2329,7 +2330,7 @@
(save-excursion
(cond ((and depth (<= depth 0) 0))
- ((or (not depth) (= depth (allout-depth)))
+ ((or (null depth) (= depth (allout-depth)))
(let ((index 1))
(while (allout-previous-sibling allout-recent-depth nil)
(setq index (1+ index)))
@@ -2505,13 +2506,13 @@
(defun allout-chart-subtree (&optional levels visible orig-depth prev-depth)
"Produce a location \"chart\" of subtopics of the containing topic.
-Optional argument LEVELS specifies the depth \(relative to start
-depth) for the chart.
+Optional argument LEVELS specifies a depth limit \(relative to start
+depth) for the chart. Null LEVELS means no limit.
When optional argument VISIBLE is non-nil, the chart includes
only the visible subelements of the charted subjects.
-The remaining optional args are not for internal use by the function.
+The remaining optional args are for internal use by the function.
Point is left at the end of the subtree.
@@ -2618,16 +2619,19 @@
"Return a flat list of hidden points in subtree CHART, up to DEPTH.
+If DEPTH is nil, include hidden points at any depth.
+
Note that point can be left at any of the points on chart, or at the
start point."
(let (result here)
- (while (and (or (eq depth t) (> depth 0))
+ (while (and (or (null depth) (> depth 0))
chart)
(setq here (car chart))
(if (listp here)
- (let ((further (allout-chart-to-reveal here (or (eq depth t)
- (1- depth)))))
+ (let ((further (allout-chart-to-reveal here (if (null depth)
+ depth
+ (1- depth)))))
;; We're on the start of a subtree - recurse with it, if there's
;; more depth to go:
(if further (setq result (append further result)))
@@ -2697,7 +2701,10 @@
(defun allout-goto-prefix-doublechecked ()
"Put point at beginning of immediately containing outline topic.
-Like `allout-goto-prefix', but shallow topics \(according to `allout-doublecheck-at-and-shallower') are checked and disqualified for child containment discontinuity, according to `allout-aberrant-container-p'."
+Like `allout-goto-prefix', but shallow topics \(according to
+`allout-doublecheck-at-and-shallower') are checked and
+disqualified for child containment discontinuity, according to
+`allout-aberrant-container-p'."
(allout-goto-prefix)
(if (and (<= allout-recent-depth allout-doublecheck-at-and-shallower)
(allout-aberrant-container-p))
@@ -4620,8 +4627,13 @@
(allout-beginning-of-current-line)
(save-restriction
(let* (depth
- (chart (allout-chart-subtree (or level 1)))
- (to-reveal (or (allout-chart-to-reveal chart (or level 1))
+ ;; translate the level spec for this routine to the ones
+ ;; used by -chart-subtree and -chart-to-reveal:
+ (chart-level (cond ((not level) 1)
+ ((eq level t) nil)
+ (t level)))
+ (chart (allout-chart-subtree chart-level))
+ (to-reveal (or (allout-chart-to-reveal chart chart-level)
;; interactive, show discontinuous children:
(and chart
(interactive-p)
@@ -4672,22 +4684,22 @@
(orig-pt (point))
(orig-pref (allout-goto-prefix-doublechecked))
(last-at (point))
- bag-it)
- (while (or bag-it (allout-hidden-p))
+ (bag-it 0))
+ (while (or (> bag-it 1) (allout-hidden-p))
(while (allout-hidden-p)
(move-beginning-of-line 1)
(if (allout-hidden-p) (forward-char -1)))
(if (= last-at (setq last-at (point)))
- ;; Oops, we're not making any progress! Show the current
- ;; topic completely, and bag this try.
+ ;; Oops, we're not making any progress! Show the current topic
+ ;; completely, and try one more time here, if we haven't already.
(progn (beginning-of-line)
(allout-show-current-subtree)
(goto-char orig-pt)
- (setq bag-it t)
- (beep)
- (message "%s: %s"
- "allout-show-to-offshoot: "
- "Aberrant nesting encountered."))
+ (setq bag-it (1+ bag-it))
+ (if (> bag-it 1)
+ (error "allout-show-to-offshoot: %s"
+ "Stumped by aberrant nesting.")))
+ (if (> bag-it 0) (setq bag-it 0))
(allout-show-children)
(goto-char orig-pref)))
(goto-char orig-pt)))
@@ -4895,7 +4907,10 @@
(cond ((eq curr-elem '*) (allout-show-current-subtree)
(if (> allout-recent-end-of-subtree max-pos)
(setq max-pos allout-recent-end-of-subtree)))
- ((eq curr-elem '+) (allout-show-current-branches)
+ ((eq curr-elem '+)
+ (if (not (allout-hidden-p))
+ (save-excursion (allout-hide-current-subtree t)))
+ (allout-show-current-branches)
(if (> allout-recent-end-of-subtree max-pos)
(setq max-pos allout-recent-end-of-subtree)))
((eq curr-elem '-) (allout-show-current-entry))
[-- Attachment #3: ChangeLog-entry.txt --]
[-- Type: text/plain, Size: 1084 bytes --]
2006-09-29 Stephen Berman <Stephen.Berman@gmx.net>
* allout.el (allout-expose-topic): Rectify implementation of "+"
spec, so that bodies are not exposed with headlines.
2006-09-29 Ken Manheimer <ken.manheimer@gmail.com>
* allout.el (allout-current-depth): Do aberrent check only at or
below doublecheck depth.
(allout-chart-subtree): Make it explicit that LEVELS being nil
means unlimited depth. Drop undocumented support for LEVELS value
t meaning unlimited depth. (This is consistent with
allout-chart-to-reveal, but contrary to allout-show-children,
which needs to use nil to default to depth of 1.)
(allout-goto-prefix-doublechecked): Wrap long docstring line.
(allout-chart-to-reveal): Be explicit in docstring about meaning
of nil LEVELS, and drop support for LEVELS value t.
(allout-show-children): Translate the level spec used by this
routine to that used by allout-chart-subtree and
allout-chart-to-reveal.
(allout-show-to-offshoot): Retry once when stuck, after opening
subtree - improvements in discontinuity handling likely will
enable progress.
[-- Attachment #4: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2006-09-30 21:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-29 18:56 allout bugfixes - small bugs in charts, exposure specs Ken Manheimer
2006-09-30 17:04 ` Richard Stallman
2006-09-30 19:08 ` Stephen Berman
2006-09-30 21:29 ` Ken Manheimer [this message]
2006-10-01 15:15 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2cd46e7f0609301429k5aa9d6f2q25081b8a0c0bae0f@mail.gmail.com \
--to=ken.manheimer@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.