Hi,

  do you also hate having to manually input long file paths in that
too-easily-exited footer prompt instead of clicking in a nice dialog? Well,
then please post here and tell me about it, I'll try to fix it. Why? Because
I just found a couple of places where it could be changed and there might be
more I don't know about. And I'd rather do it now, before I forget how it's
done ;) Is there a reason why I shouldn't be doing this? Then please do tell
me as well.

 The first case I found is upon saving a buffer for the first time. You are
now (finally!) presented the typical dialog. The second case is when
attaching a master file in a multi-file project ("Tools->Attach master...").

  The former is already in the SVN, the latter not so because it breaks or
bypasses some internal magic which uses tm-define and :argument. This means
that if the c++ function tm_data_rep::project_attach(string) and the
corresponding tm-define'd property project-attach are changed, adding more
arguments other than a file name, interactive won't automagically detect
those and prompt the user for them, since it's been bypassed.

But if you don't really care about that or don't know what I'm talking about
change line 286 in progs/generic/document_part.scm to the following and
enjoy/suffer:

    ("Attach master" (choose-file (lambda (_arg)
                                  (project-attach (url->string _arg)))
                                  "Choose master file for project" "tm")))

PS: I guess it would be nicer to add a "data-type" parameter to tm-define'd
stuff and let interactive open a file dialog or color picker or whatever as
necessary. But someone knowledgeable would have to comment on this before I
plunged into it.
________________
Miguel de  Benito.
_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to