[Top][All Lists]

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

[AUCTeX-devel] Re: Completion for key=value pairs

From: Holger Sparr
Subject: [AUCTeX-devel] Re: Completion for key=value pairs
Date: Wed, 08 Apr 2009 10:16:15 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

Ralf Angeli wrote:
> * Holger Sparr (2009-03-30) writes:
>> Ralf Angeli wrote:
> I don't think this is enough.  In a freshly started Emacs and a file
> using PSTricks, try to insert a pspicture environment.  In my case the
> prompt of the third argument ready "Boolean" instead of "showgrid".
> There seems to be a problem with the value of `parlist' in
> `LaTeX-package-parameter-value'.  (In addition `compl' is let-bound but
> will never be changed before its value is used.)

You are right. I can fix this. I think I introduced 'compl' to check
whether a completion possibility was used or not. If not the the
completion list can be extended. I guess this idea was not finished.

>> I thought when looking at the source again, it was way to complicated.
> This is a reason I'd like to use the new key=value completion mechanism.
> However, I'm not familiar with the features the current prompting
> mechanism in pstricks.el provides, since I could not try it.  Ideally
> the key=value completion should at least be on par with it.

I think the provided history mechanism is important since the set of
used parameters will not change to much. It might be annoying to be
promptep for the same values again and again.

In case you do not use the history you will go through the completing

>> I would suggest to insert a "=" automatically when the first completion
>> is uniquely done or suggest a "=" when possible.
> Yeah, I know.  I experimented with "foo=" strings in the completion
> table (i.e. `LaTeX-listings-key-val-options' in case of listings.el)
> before committing the current version but this did not work.  I'm not
> even sure yet if it is a good idea to put the "=" in the strings of the
> completion table but it would be one way to distinguish keys with a
> value-part from those without one (see e.g. the `print' key in the
> listings package).

Will see.

> If you are interested you can replace the current prompting mechanism in
> pstricks.el with the key=value completion mechanism.  As mentioned above
> we should probably first determine if the key=value completion lacks
> some important features the mechanism currently used has.

I am interested but I can not say when I will have the time to
do some testing and experimenting.

> That reminds me: The key=value completion could possibly improved if it
> provided a hint about the expected type of value if there is no fixed
> set upon which a completion can be made.  For example, in the listings
> package there is the key `breakindent' which accepts a dimension as
> value.  In that case we could provide the user with a hint that a) it
> requires a dimension and b) what a dimension actually is (e.g. "10pt").

In the defined completion list you can add a prompt to use.



reply via email to

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