Umenu/Emdl

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Umenu/Emdl

Grahame Blackwood
Hi Steve and all

I've installed umenu/emdl using the umenu-0.7.0-easyinstall.tgz and it
was an easy kick-off. Much easier than the previous method.

Getting the process of editing, compiling and transferring menus was a
bit more difficult.

The senario is like this:

I edit a main menu, say f.emdl, save it and exit Vim and return to the menu.
Then Compile it, giving the name f when the program asks for the menu name
and similarly giving the name f when doing the Transfer.

However, if the f.emdl has a sub-menu in the source called e, and I
edit that part of the f.emdl and save it as before, Compile it giving
the name f and then do the transfer, instead of giving the name f I had
to give the name fe to make the transfer work.

I don't know if this is expected behaviour but I can imagine that it
could save borking the whole menu if an error was made in the e part of
the source. However, I found it less than intuitive and it took me a
while to realise what was going on.

Having said that I'm making progress and I've got a few simple processes
installed in menus and they are effective.

One problem I found in using the menus was the lack of ability to pass a
parameter to a shell script called by a menu item (just date in the form of
YYMnth in my case). I solved that by adding a menu option to change the shell
script itself using vim. It would be nice though if umenu/emdl could pass
parameters to programs called by the menus.

Progress and I've learned quite a lot the last 24hrs or so.

So thanks and cheers

G


_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo
Reply | Threaded
Open this post in threaded view
|

Re: Umenu/Emdl

David J Patrick-2
Grahame Blackwood wrote:
> Hi Steve and all
>
> I've installed umenu/emdl using the umenu-0.7.0-easyinstall.tgz and it
> was an easy kick-off. Much easier than the previous method.

I took it for a quick test-drive, the "install" was trivial, the
function obvious. I have yet to make mu own menus, but it looks easy.
I will report back,
djp
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo
Reply | Threaded
Open this post in threaded view
|

Re: Umenu/Emdl

Steve Litt
In reply to this post by Grahame Blackwood
On Monday 12 October 2009 15:07:37 Grahame Blackwood wrote:

> Hi Steve and all
>
> I've installed umenu/emdl using the umenu-0.7.0-easyinstall.tgz and it
> was an easy kick-off. Much easier than the previous method.
>
> Getting the process of editing, compiling and transferring menus was a
> bit more difficult.
>
> The senario is like this:
>
> I edit a main menu, say f.emdl, save it and exit Vim and return to the
> menu. Then Compile it, giving the name f when the program asks for the menu
> name and similarly giving the name f when doing the Transfer.
>
> However, if the f.emdl has a sub-menu in the source called e, and I
> edit that part of the f.emdl and save it as before, Compile it giving
> the name f and then do the transfer, instead of giving the name f I had
> to give the name fe to make the transfer work.
Hi Grahame,

I can't quite visualize what you mean, but I'm attaching a copy of the (very
much in progress) tutorial web page. That should answer this particular
question.

>
> I don't know if this is expected behaviour but I can imagine that it
> could save borking the whole menu if an error was made in the e part of
> the source. However, I found it less than intuitive and it took me a
> while to realise what was going on.
>
> Having said that I'm making progress and I've got a few simple processes
> installed in menus and they are effective.
>
> One problem I found in using the menus was the lack of ability to pass a
> parameter to a shell script called by a menu item (just date in the form of
> YYMnth in my case).
Here's how you'd do that:
Showdate
        param
                D: $HOME/showdatedir
                C: ./showdate.sh '07/11/21'

There's also the E: parameter which sets an environment variable.

> I solved that by adding a menu option to change the
> shell script itself using vim.

:-)

Self modifying code you maniac :-) I always wanted to write self modifying
code but never had the guts.

Another thing: If you want UMENU to query the user for an option, use Prompted
Argument Substitution. It looks like this:

param
        C: echo %1%Type string here please:%%

Whatever you typed will be used as an argument. I'll have that incorporated in
the tutorial by tomorrow.

> It would be nice though if umenu/emdl could
> pass parameters to programs called by the menus.
>
> Progress and I've learned quite a lot the last 24hrs or so.

Welcome! I'll try to get that tutorial to you as soon as prompted argument
substitution is in it. I think that will help a lot.

Steve

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt



_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo

tutorial_20091012_1708.html (24K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Umenu/Emdl

Steve Litt
In reply to this post by Grahame Blackwood
On Monday 12 October 2009 15:07:37 Grahame Blackwood wrote:
> Hi Steve and all
>
> I've installed umenu/emdl using the umenu-0.7.0-easyinstall.tgz and it
> was an easy kick-off. Much easier than the previous method.
>
> Getting the process of editing, compiling and transferring menus was a
> bit more difficult.

Hi Grahame (and any others messing with the new UMENU)

Place the attached tutorial.html in your $HOME/.umenu/docs/html directory, and
follow its exercises. It will probably take 2 hours and you'll be a UMENU guru
-- probably more UMENU knowledgeable than me.

By the way, here's how you set VimOutliner to recognize that an .emdl file is
an outline:

Within $HOME/.vim/ftdetect, create a file called my_vo_extensions with the
following content:

augroup filetypedetect
  au! BufRead,BufNewFile *.emdl         setfiletype vo_base
  au! BufRead,BufNewFile *.pho          setfiletype vo_base
augroup END

The preceding makes anything with extensions of .emdl or .pho outlines
editable as outlines by Vim. You probably don't have .pho files, so you can get
rid of that line.

When Vim starts, it runs every script in $HOME/.vim/ftdetect, so simply having
that file in the directory is enough to make .emdl files VO editable.

HTH

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt



_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo

tutorial.html (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Umenu/Emdl

Grahame Blackwood
In reply to this post by Grahame Blackwood
On Tuesday 13 October 2009 21:05:23 you wrote:

> > Getting the process of editing, compiling and transferring menus was a
> > bit more difficult.
> >
> > The scenario is like this:
> >
> > I edit a main menu, say f.emdl, save it and exit Vim and return to the
> > menu. Then Compile it, giving the name f when the program asks for the
> > menu name and similarly giving the name f when doing the Transfer.
> >
> > However, if the f.emdl has a sub-menu in the source called e, and I
> > edit that part of the f.emdl and save it as before, Compile it giving
> > the name f and then do the transfer, instead of giving the name f I had
> > to give the name fe to make the transfer work.
>
> Hi Grahame,
>
> I can't quite visualize what you mean, but I'm attaching a copy of the
> (very much in progress) tutorial web page. That should answer this
> particular question.
>
Apologies for my inadequate explanation. However, I think I have the
process in my head now and I don't think it will cause me any real
problems from now on. I look forward to you tutorial web page. The link
at the bottom of you email looked like raw html when I aimed my browser
at it. Not good to read! So I'll wait a bit until it's ready.

> > One problem I found in using the menus was the lack of ability to pass a
> > parameter to a shell script called by a menu item (just date in the form
> > of YYMnth in my case).
>
> Here's how you'd do that:
> Showdate
>         param
>                 D: $HOME/showdatedir
>                 C: ./showdate.sh '07/11/21'
>
> There's also the E: parameter which sets an environment variable.
>
> > I solved that by adding a menu option to change the
> > shell script itself using vim.
> >
>
> Self modifying code you maniac :-) I always wanted to write self modifying
> code but never had the guts.
>
Er, not really self modifying code! I just edited the source of the
shell script to include a variable rather than use $1 as a parameter to
the shell script. I'll try your suggestions today.

> Another thing: If you want UMENU to query the user for an option, use
> Prompted Argument Substitution. It looks like this:
>
> param
>         C: echo %1%Type string here please:%%
>
> Whatever you typed will be used as an argument. I'll have that incorporated
> in the tutorial by tomorrow.

That's kind of what I was looking for originally but saw a reference in
the EMDL README.html that Prompted Argument Substitution wasn't possible
so didn't look much further. However, there are examples in the
firstmenu.emdl so I should have known.
>
> Welcome! I'll try to get that tutorial to you as soon as prompted argument
> substitution is in it. I think that will help a lot.

Yes, I'm looking forward to that as well as a more VO like UMENU/EMDL.

Cheers and many thanks for your efforts.

G




_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo
Reply | Threaded
Open this post in threaded view
|

Re: Umenu/Emdl

Grahame Blackwood
In reply to this post by Grahame Blackwood
Hi Steve and all

My comments interspersed:

On Wednesday 14 October 2009 18:25:04 you wrote:
> Place the attached tutorial.html in your $HOME/.umenu/docs/html directory,
> and follow its exercises. It will probably take 2 hours and you'll be a
> UMENU guru -- probably more UMENU knowledgeable than me.

> http://lists.vimoutliner.org/pipermail/vimoutliner/attachments/20091013/e94
>fc15e/tutorial.html

I still can't read this comfortably as it presents itself as raw html.

>
> By the way, here's how you set VimOutliner to recognize that an .emdl file
> is an outline:
>
> Within $HOME/.vim/ftdetect, create a file called my_vo_extensions with the
> following content:
>
> augroup filetypedetect
>   au! BufRead,BufNewFile *.emdl         setfiletype vo_base
>   au! BufRead,BufNewFile *.pho          setfiletype vo_base
> augroup END
>
> The preceding makes anything with extensions of .emdl or .pho outlines
> editable as outlines by Vim. You probably don't have .pho files, so you can
> get rid of that line.
>
> When Vim starts, it runs every script in $HOME/.vim/ftdetect, so simply
> having that file in the directory is enough to make .emdl files VO
> editable.

Absolutely love this. Menu files in glorious technicolor and VO
abilities as well! They are so much more readable and obvious in colour.
However, I couldn't get the my_vo_extensions file to work as you set out
above.

What brought success was to copy the line from your example:

  au! BufRead,BufNewFile *.emdl         setfiletype vo_base

directly into the vo_base.vim file.

I don't know how legitimate this is or why your example wouldn't work
for me as you set it out.

I don't know how legitimate this is or why your example wouldn't work
for me as you set it out.

In an earlier email you showed me the following example which works fine
and allows me to pass parameters to scripts:

Showdate
        param
                D: $HOME/showdatedir
                C: ./showdate.sh '07/11/21'

I haven't yet tried the E: parameter which sets an environment variable,
but I'll keep it in mind.

Thanks again for the guidance and your patience. Progress for me!

Cheers

G





_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo