all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Please try Pmail
Date: Wed, 21 Jan 2009 16:21:40 -0500	[thread overview]
Message-ID: <87bpu0uzh7.fsf@cyd.mit.edu> (raw)
In-Reply-To: <jwvd4ego0q7.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 21 Jan 2009 15:38:59 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I don't propose a hook, but a buffer-local *-function (as opposed to
> *-functions or *-hook).  I.e. a single function, just like your
> proposal, except it's stored in the final "returned" buffer, rather than
> returned explicitly.

You mean something like this?

  DEFVAR_LISP ("write-region-annotate-functions", &Vwrite_region_annotate_functions,
         doc: /* A list of functions to be called at the start of `write-region'.
Each is passed two arguments, START and END as for `write-region'.
These are usually two numbers but not always; see the documentation
for `write-region'.  The function should return a list of pairs
of the form (POSITION . STRING), consisting of strings to be effectively
inserted at the specified positions of the file being written (1 means to
insert before the first byte written).  The POSITIONs must be sorted into
increasing order.

If there are several annotation functions, the lists returned by the
annotation functions are merged destructively.  As each annotation
function runs, the variable `write-region-annotations-so-far' contains
a list of all annotations returned by previous annotation functions.

An annotation function can return with a different buffer current.
Doing so removes the annotations returned by previous functions.

After `write-region' completes, Emacs calls the function stored in
`write-region-post-annotation-function', once for each buffer that was
current when building the annotations (i.e., at least once if
`write-region-annotate-functions' is non-nil).  This function is called
with no arguments, and with that buffer current.  */);




  reply	other threads:[~2009-01-21 21:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-18  3:43 Please try Pmail Richard M Stallman
2009-01-18 14:47 ` Chong Yidong
2009-01-18 15:06   ` Alfred M. Szmidt
2009-01-18 20:40   ` Stefan Monnier
2009-01-19  1:41     ` Chong Yidong
2009-01-19  2:57     ` Chong Yidong
2009-01-20  4:57       ` Stefan Monnier
2009-01-20 14:20         ` Chong Yidong
2009-01-21  2:37           ` Stefan Monnier
2009-01-21  4:11             ` Chong Yidong
2009-01-21  4:18               ` Stefan Monnier
2009-01-21 15:06                 ` Chong Yidong
2009-01-21 20:38                   ` Stefan Monnier
2009-01-21 21:21                     ` Chong Yidong [this message]
2009-01-22  4:12                       ` Stefan Monnier
2009-01-22  4:55                         ` Chong Yidong
2009-01-23  1:52                           ` Richard M Stallman
2009-01-23  2:35                             ` Chong Yidong
2009-01-21 20:32               ` Richard M Stallman
2009-01-21 21:07                 ` Chong Yidong
2009-01-20 23:00         ` Richard M Stallman
2009-01-21  5:56           ` Eli Zaretskii
2009-01-20  1:00     ` Richard M Stallman
2009-01-19  4:31   ` Richard M Stallman
2009-01-19 14:39     ` Chong Yidong
2009-01-19  1:59 ` Glenn Morris
2009-01-20  0:59   ` Richard M 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=87bpu0uzh7.fsf@cyd.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --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.