[EMBOSS] An emacs mode to edit acd files

Peter Rice pmr at ebi.ac.uk
Tue Aug 14 13:04:49 UTC 2007


Ye Wenbin wrote:
> I wrote some simple description about features of acd-mode in the header
> of the files. Except keywords highlight and indentation as a major modes
> should do, I add some useful feature for editing:
>   1. support for imenu. You can use M-x imenu to move to other tokens

Interesting. It understands sections.

>     And if you think you abbrev still to long, you can use
>     M-x tempo-complete-tag to complete an abbrev, it is bound to C-c TAB.

Easy ... but it seems I have to use the exact abbreviation.

Something that expands any abbreviation (if it is unique) and adds a set of 
attributes is very useful. This combines the abbreviation handling with the C-c 
TAB. Is that easy to implement?

>   3. Completion. Many things can be completed using TAB. For example,
>     the name of data type bool<TAB> can complete to boolean. And the
>     attributes of the data type can be completed like:
>     boolean feature [
>        def<TAB>
>     will get "default".

Can it insert default and information (for example) as attributes?

>     The name of variable can be completed when it is declare before point:
>      sequence: inseq [
>        features: $(fe<TAB>
>     will get "feature" if the variable "feature" is declare before.
>     The calculated attributes also can be completed. $(inseq.le<TAB> can get
>     "length" if the "inseq" is declared as type "sequence" before.
>     Today I add completions for standard groups because I think it is hard  
> to
>     remember so many groups. You can complete group name as:
>       groups: "<TAB>

That is useful.

The current group names are stored in emboss/acd/groups.standard

We validate them automatically. If we add acd.el to the EMBOSS CVS tree we can 
validate the list there and keep it updated.

> I want add a command acd-pretty that use command acdpretty to reformat
> code, but I don't know how to make the command read input from stdin,
> I use command:
> $ cat appl.acd | acdpretty -filter
> but failed. Is it possible to make the command read from stdin?

No. The -filter option works for EMBOSS programs and the ACD file that acdpretty 
is reading (you can still use all the command line options of that ACD file).

But it is easy to reformat code in emacs .. the indentation is not difficult. 
acdpretty also completes abbreviations and adds missing quotes.
>>  Which version of EMBOSS did you use?
> I check out the cvs version of emboss, and build it myself.

Thanks. So we can try it without having to make updates.

> This is some question about the document of library. I can find some scripts
> to generate documents for libraries under directory "scripts", but I can find
> command to build it.
> How can I use those scripts?

Ah ... we make the documentation in another directory (because the documentation 
is on the sourceforge website, and sourceforge has restrictions on using CVS, we 
have to use a sourceforge CVS server).

I run embossdoc.csh with two arguments - where to find the source code, and 
where to store the documentation.

You can also pick up the documentation from emboss.cvs.sourceforge.net in 
directory sfdoc/developers
and give the sfdoc.developers directory as the second argment to embossdoc.csh

regards,

Peter Rice



More information about the EMBOSS mailing list