vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] (no subject)


From: Wayne Cuddy
Subject: Re: [vile] (no subject)
Date: Mon, 31 Aug 2015 12:45:10 -0400
User-agent: Mutt/1.4.2.3i

On Sat, Aug 22, 2015 at 04:12:44PM -0400, Thomas Dickey wrote:
> On Sat, Aug 22, 2015 at 10:49:11AM -0400, address@hidden wrote:
> > : ; Fri, 21 Aug 2015 12:41:04 -0400
> > Date: Fri, 21 Aug 2015 12:41:04 -0400
> > From: Wayne Cuddy <address@hidden>
> > To: Vile List <address@hidden>
> > Subject: show contents of only a specified register
> ...
> > Is there a way to show the contents just one register?
> 
> You could do this with a macro, e.g., something using the "put" command
> into a buffer.
>  
> > Sometimes I have a lot of registers in use so show-registers is a
> > little noisy.
>

So here is the macro that I've come up with. The problem I'm having is
that the 'put' function doesn't seem to accept the register to put from.

~~~~~~~~~~~~~~~~~~~~
store-procedure show-register string="reg" "show the contents of a single 
register"
    ~local %bn
    setv %bn &cat "register-" $1
    find-file %bn
    1 goto-line
    delete-lines-til end-of-file
    put $1
~endm
~~~~~~~~~~~~~~~~~~~~

I've tried:

put "$1"
$1 put
"$1" put

It will only put the contents of the unnamed register. If there is
nothing in the unnamed register then it produces an error stating there
is nothing in register 0.

Also, I would have preferred to use kill-buffer to remove any existing
register-X buffer before putting the register's contents. However when a
buffer already exists, which is the case on subsequent runs, kill-buffer
prompts to remove a modified but unsaved buffer. I tried the various
nowarn settings as well as ~force with no success.

Wayne



reply via email to

[Prev in Thread] Current Thread [Next in Thread]