* adding a new digest type to nndoc-type-alist
@ 2000-09-25 18:04 Ted Stern
2000-09-25 22:19 ` Kai Großjohann
0 siblings, 1 reply; 2+ messages in thread
From: Ted Stern @ 2000-09-25 18:04 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 829 bytes --]
Sorry folks, I know the answer to this one, but I lack the elisp to implement
it.
I recently subscribed to a mailing list on eGroups and elected to receive
notices in digested form. The individual messages are separated by double
lines of underscores, which seems like a good convention, unlikely to be found
in ordinary emails.
Since digest formats seem mostly the same except for the choice of message
separator, perhaps there should be some sort of digest template one could
use to make that one-item change.
--
Ted Stern Analysis/Porting/Tuning, Engineering Applications
Cray Inc. http://www.cray.com
411 First Avenue South, Suite 600 Direct 206-701-2182, Main 206-701-2000
Seattle, WA 98104-2860 FAX 206-701-2500
[-- Attachment #2: Type: message/rfc822, Size: 3494 bytes --]
From: vim@egroups.com
To: vim@egroups.com
Subject: [vim] Digest Number 210
Date: 25 Sep 2000 09:01:51 -0000
Message-ID: <969872511.1793@egroups.com>
-------------------------- eGroups Sponsor -------------------------~-~>
Get news. Source products. Interact with colleagues.
Connect with your industry at WIRELESS NETWORKS ONLINE:
http://click.egroups.com/1/9276/14/_/3884/_/969872511/
---------------------------------------------------------------------_->
There is 1 message in this issue.
Topics in this digest:
1. RE: line renumbering
From: Michael Geddes <mgeddes@cybergraphic.com.au>
________________________________________________________________________
________________________________________________________________________
Message: 1
Date: Mon, 25 Sep 2000 10:40:09 +1100
From: Michael Geddes <mgeddes@cybergraphic.com.au>
Subject: RE: line renumbering
fun! Renumber() range
let here=0
let mx='^\(\s*\)\(\d\+\>\)'
let i = a:firstline
while i <= a:lastline
let line=getline(i)
if line =~mx
if here==0
let here = substitute(matchstr(line,mx),mx,'\2','')
else
let here=here+1
call setline(i,substitute(line,mx,'\1'.here,''))
endif
endif
let i=i+1
endwhile
endfun
:%call Renumber()
-----Original Message-----
From: Jason Freund [SMTP:freundj@pacbell.net]
Sent: Thursday, 21 September 2000 9:21
To: vim@vim.org
Subject: line renumbering
Hi,
I need a macro to incrementally renumber lines starting with the
first given line number. But it needs to skip blank lines or
comment
lines (beginning with '#' character)
Example input:
=================
# comment
5 A
12 B
3 C
# comment
4 D
1 E
=================
Example output:
=================
#comment
5 A
6 B
7 C
#comment
8 D
9 E
=================
Can anyone recommend a macro that can do this? Please cc:
freundj@pacbell.net
-Jason
________________________________________________________________________
________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: adding a new digest type to nndoc-type-alist
2000-09-25 18:04 adding a new digest type to nndoc-type-alist Ted Stern
@ 2000-09-25 22:19 ` Kai Großjohann
0 siblings, 0 replies; 2+ messages in thread
From: Kai Großjohann @ 2000-09-25 22:19 UTC (permalink / raw)
Cc: ding
On 25 Sep 2000, Ted Stern wrote:
> I recently subscribed to a mailing list on eGroups and elected to
> receive notices in digested form. The individual messages are
> separated by double lines of underscores, which seems like a good
> convention, unlikely to be found in ordinary emails.
The problem is the header formatting. You'd need to include a
function which removes the spaces before header names.
Sadly, I've never written a function like this, but it seems that
there are a couple of `generate-head-function' examples in the default
value that one could look at.
kai
--
I like BOTH kinds of music.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-09-25 22:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-25 18:04 adding a new digest type to nndoc-type-alist Ted Stern
2000-09-25 22:19 ` Kai Großjohann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).