all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
To: rms@gnu.org
Cc: rgm@gnu.org, lennart.borgman@gmail.com, emacs-devel@gnu.org
Subject: Re: The *Warnings* buffer and undo
Date: Sun, 01 Apr 2007 09:44:36 +0900	[thread overview]
Message-ID: <87mz1sylcb.fsf@catnip.gol.com> (raw)
In-Reply-To: <871wj5ymd5.fsf@catnip.gol.com> (Miles Bader's message of "Sun\, 01 Apr 2007 09\:22\:30 +0900")

I wrote:
> However in some other potential applications (someone mentioned
> customization buffers, where you probably want to restrict undo to the
> user-editable fields), things are not so simple, so having something
> which works at a primitive level (like "inhibit-undo") might be nice in
> general.

I think I slightly mis-read your message.  The method you mention --
looking at buffer-undo-list after the fact, and then removing some
entries and using them to fix up the rest of the entries -- sounds like
a very workable approach in lisp, since the to-be-discarded entries will
contain all the information you need.

A possible interface could be:

  (let ((keep-undo buffer-undo-list))

    ;; do some modifications which shouldn't be kept in the undo list
    (do-some-buffer-modifications)

    (discard-undo-entries keep-undo))

"discard-undo-entries" would just take a tail of the undo list as an
argument and discard everything before it (fixing up the rest).

-Miles

-- 
A zen-buddhist walked into a pizza shop and
said, "Make me one with everything."

  reply	other threads:[~2007-04-01  0:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-24 20:01 The *Warnings* buffer and undo Lennart Borgman (gmail)
2007-03-25 17:27 ` Richard Stallman
2007-03-28  0:47   ` Glenn Morris
2007-03-28 19:36     ` David Kastrup
2007-03-28 20:52       ` Glenn Morris
2007-03-29 17:59       ` Richard Stallman
2007-03-29 18:35         ` David Kastrup
2007-03-30 12:42           ` Richard Stallman
2007-03-30 19:18             ` Glenn Morris
2007-03-30 19:53               ` Lennart Borgman (gmail)
2007-03-31  7:20                 ` Richard Stallman
2007-03-31 19:41                   ` Glenn Morris
2007-03-31 23:21                     ` Richard Stallman
2007-03-29 22:07         ` Miles Bader
2007-03-30 21:23           ` Richard Stallman
2007-03-30 21:45             ` Glenn Morris
2007-03-30 22:50             ` Miles Bader
2007-03-31 20:43               ` Richard Stallman
2007-04-01  0:22                 ` Miles Bader
2007-04-01  0:44                   ` Miles Bader [this message]
2007-03-29 15:32     ` 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=87mz1sylcb.fsf@catnip.gol.com \
    --to=miles@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=rgm@gnu.org \
    --cc=rms@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.