🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
5 messages
5 total messages Started by Daniel Smith - Ministry of Silly... Sat, 06 Jul 1991 22:32
macro for kill-subject?
#1830
Author: Daniel Smith - Ministry of Silly...
Date: Sat, 06 Jul 1991 22:32
20 lines
1438 bytes

	I'd like to write a macro to do the following:

	when invoked, it will prompt me for a letter, once I type that
in, that Subject gets killed.  I don't want to have to always go through
the entire kill-select dialog (I want the macro to do that).

	It would be possible for me to set a variable to the subject (letter)
that I want killed (I think).  The first line of the macro could just
call my grabchars program, then somehow I could set the output of that
to an nn var, and pass that into kill-select...  just thinking out loud.

	Any ideas?

			Daniel
-- 
   daniel@island.com       daniel@world.std.com       dansmith@well.sf.ca.us
Daniel Smith, Island Graphics, 94903, CA (415) 491 0765 x 250(w), 491 0402(fax)
              Disclaimer: written by a highly caffeinated mammal
Re: macro for kill-subject?
#1832
Author: Gerben 'P' Vos
Date: Mon, 08 Jul 1991 02:46
35 lines
1811 bytes
daniel@island.COM (Daniel Smith - Ministry of Silly Walks) writes:

>	I'd like to write a macro to do the following:

>	when invoked, it will prompt me for a letter, once I type that
>in, that Subject gets killed.  I don't want to have to always go through
>the entire kill-select dialog (I want the macro to do that).

I use the following macros:

--- from my init file
# ^K kills, K selects (see default-kill-select)

map menu ^K (
kill-select 'k' 's' "%" input 'g' "30"
)

map show ^K (
kill-select 'k' 's' "%" 'g' "30"
)
---

Note the "input" in the first macro. There is one problem with this macro
(and probably other macros), namely if you enter ^G in an attempt to abort
the macro, the macro doesn't get aborted, but instead article 'g' becomes
selected and you get an error message since nn barfs on the "30".

You may also want to look at the variable default-kill-select. I have set
it such that it defaults to selecting articles for 30 days, instead of
killing. So i can both do select and kill with little keystrokes.

. . . . . . . . . . . . . . . . . . . . . . . . . . . G e r b e n   V o s   <><
Aconet: BIGBEN!Gerben Vos  Internet: gpvos@cs.vu.nl
NASA's primary motivation in space exploration is the hope of finding a planet
with a 25 hour day.
Re: macro for kill-subject?
#1837
Author: Daniel Smith - Ministry of Silly...
Date: Tue, 09 Jul 1991 17:25
207 lines
5531 bytes
In <10392@star.cs.vu.nl> gpvos@cs.vu.nl (Gerben 'P' Vos) writes:

> [I wrote:]

> >	I'd like to write a macro to do the following:

> >	when invoked, it will prompt me for a letter, once I type that
> >in, that Subject gets killed.  I don't want to have to always go through
> >the entire kill-select dialog (I want the macro to do that).

> I use the following macros:

> --- from my init file
> # ^K kills, K selects (see default-kill-select)

> map menu ^K (
> kill-select 'k' 's' "%" input 'g' "30"
> )

> map show ^K (
> kill-select 'k' 's' "%" 'g' "30"
> )


	I'm using 6.4.10, and Gerben's macro doesn't work for me.  I'm
not sure if there's some interference from other parts of my init file,
but I'll investigate.  Here's what I have in my ~/.nn/init file:

search for this next line:
# these are the new ones....

----------------------------------------------
#	my nn init file...first take :-)
#
#	This ~/.nn/init is taken from the examples of:
#
#	well!apple!mace.cc.purdue.edu!asd (Kareth)
#	well!apple!gallifrey.Eng.Sun.COM!deborah (Deborah Bennett)
#	well!apple!wang.com!fitz (Tom Fitzgerald)
#	well!apple!ursa-major.SPDCC.COM!gst (Gary S. Trujillo)
#	Jaap "Down with filters!" Vermeulen <well!apple!sequent.com!jaap>
#	well!phanson (Pete Hanson)
#	rloon@praxis.cs.ruu.nl (Ronald van Loon)
#	well!apple!speedway.Eng.Sun.COM!rock (Bill Petro)
#	David Lesher <well!apple!mthvax.cs.miami.edu!wb8foz>
#	gpvos@cs.vu.nl (Gerben 'P' Vos)

#	variables

#	append my .signature file on outgoing mail and posts..
#set append-signature-mail
#set append-signature-post

set folder ~/text/News

set backup				 # backup the .newsrc
set default-distribution world

#	file oriented
set mail /usr/spool/mail/daniel
set mail-header Cc:
set mail-record ~/text/mail/outbound
set news-record ~/text/mail/outbound_arts
set default-save-file +$F/$N
set new-group-action    2               # Let people see new groups

set orig-to-include-mask 7              # Put "Path" in response's Orig-To list


set confirm-auto-quit true
set confirm-create false
set confirm-append true
set delay-redraw true
set cross-filter-seq
#set inews ~/bin/inews_csh
set printer enscript -2GkriPlw12
set include-art-id true
set keep-unsubscribed true
# Sometimes headers are useful, and it's easier to delete them if I don't
# want them than add them in when I do.

set include-full-header true
set mail-format
set included-mark >\ 			# use "> " for included text


set retry-on-error 2


#	display oriented
set re-layout 2
set mark-overlap
set overlap 1
set sort-mode 2
set show-purpose-mode 2
set split false
set header-lines _FODn=S
set scroll-clear-page   false           # Smoother display

#- set subject matching for binaries/source groups
on entry *sources* *binaries*
        :local subject-match-offset 8
        :local subject-match-parts on
end



#	macros

# macros for 'v': toggle show full/short header
define 1
        # set short header
        :set header-lines _FODn=S
        :map show v macro 2
        # no redraw on start-up/in menu
        ?show redraw
end
define 2
        # set full header
        :set header-lines FO_S_Y_KABCDdfILNPRWXx
        :map show v macro 1
        # no redraw on start-up/in menu
        ?show redraw
end

#	keymaps

# v: toggle show full/short header
map show v macro 2

# ^A: select all
map menu ^a (
        find "."
)

# ^E: edit & load init file
map both ^e (
        :!$EDITOR ~/.nn/init
        :load init
)

# these are the new ones....

# ^K kills, K selects (see default-kill-select)

map menu ^K (
kill-select 'k' 's' "%" input 'g' "30"
)

map show ^K (
kill-select 'k' 's' "%" 'g' "30"
)


# ^T: append current group to init file and optionally edit init file
map both ^t (
        prompt "Append group name to group sequence?"
        ?yes :!echo $G >> ~/.nn/init
        prompt "Edit init file?"
        ?no return
        :!$EDITOR ~/.nn/init
        redraw
        echo "Init file updates will be used on next invokation of nn"
)

# ^O: forward article to myself
map show ^o (
        mail yes "" "" no
)

# g: get menu of articles with current subject

map show g (
        goto-group "s" ""
)


# define ctrl-x keymap
make map ctl-x
map show ^x prefix ctl-x

# ^X g: get menu of articles with current subject
map ctl-x g (
        goto-group "s" ""
)

#	startup processsing

on start-up
        # set short header
        :map show v macro 2
end

#	group presentation sequence, this is warped
sequence
NEW
@
>  etc...etc...etc...


	thanks for any insights!

			Daniel
-- 
   daniel@island.com       daniel@world.std.com       dansmith@well.sf.ca.us
Daniel Smith, Island Graphics, 94903, CA (415) 491 0765 x 250(w), 491 0402(fax)
              Disclaimer: written by a highly caffeinated mammal
Re: macro for kill-subject?
#1844
Author: Gerben 'P' Vos
Date: Thu, 11 Jul 1991 03:19
24 lines
1663 bytes
daniel@island.COM (Daniel Smith - Ministry of Silly Walks) writes:

>	I'm using 6.4.10, and Gerben's macro doesn't work for me.  I'm
>not sure if there's some interference from other parts of my init file,
>but I'll investigate.  Here's what I have in my ~/.nn/init file:

I can't see why they wouldn't work. One other thing i forgot to mention is
that the macros want confirmation at the end of the macro (just to be sure).
If you're sure that you're always sure, you can add

	yes

at the end of the macros. I think that should work. If it's something else,
maybe you could explain exactly what the macro does and does not.

Or maybe on your terminal ^K has some special meaning?

BTW, i'm only just starting to learn to use nn macros, so don't take my
word as the Ultimate Answer.

. . . . . . . . . . . . . . . . . . . . . . . . . . . G e r b e n   V o s   <><
Aconet: 8500/104!Gerben Vos  Internet: gpvos@cs.vu.nl
NASA's primary motivation in space exploration is the hope of finding a planet
with a 25 hour day.
Re: macro for kill-subject?
#1861
Author: Dan Smith
Date: Sun, 14 Jul 1991 16:54
24 lines
1443 bytes
In <10437@star.cs.vu.nl> gpvos@cs.vu.nl (Gerben 'P' Vos) writes:

> Or maybe on your terminal ^K has some special meaning?

	Actually that's it...'K' works though...  I've since simplified
the macro to:

# K kills (see default-kill-select)
map menu K (
	kill-select '^M' input
)

	saves me one whole keystroke :-)   Thanks for getting me pointed
in the right direction though!

	What I would like to do from here is figure out how to have it
prompt me for a range (like "g-i") and loop through...possible?

				Daniel
-- 
   daniel@island.com       daniel@world.std.com       dansmith@well.sf.ca.us
Daniel Smith, Island Graphics, 94903, CA (415) 491 0765 x 250(w), 491 0402(fax)
              Disclaimer: written by a highly caffeinated mammal
$|=1;for("..."," hacker"," perl"," a","just"){print $l=$_.$l,"\015";sleep 1;}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads