texmacs-dev
[Top][All Lists]
Advanced

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

[Texmacs-dev] Re: [TeXmacs] macros, passing paramaters to with, and usin


From: Corey Sweeney
Subject: [Texmacs-dev] Re: [TeXmacs] macros, passing paramaters to with, and using includes
Date: Wed, 15 Mar 2006 14:46:34 -0600

I fully agree.  And I believe the "extern" allows a good and reliable way to implement workarounds.  The only part that's missing is the "convenient" part.  I think we'd all agree that after a extern gets to be a couple lines long, it's hard to keep track of them.  For those who haven't seen externs, here's a example (that i acutally use :) :

  <assign|wierd3|<macro|<extern|(lambda (zz) (let* ((dirstream (opendir
  "/usr")) (dirlist ( (lambda (y) (y y)) (lambda (self) (let ((current
  (readdir dirstream))) (if (eof-object? current) `() (cons current (self
  self)))))))) `(concat ,@(map (lambda (x) `(render-file ,x)) dirlist))
  ))|a>>>

Don't ask me how it works anymore :)



I can think of the following things that could make our externs become "convenient externs".

Indentation:
  - allowing line breaks {enter key and "shift-enter" currently does nothing}
  - auto-indenting via the tab key

Parenthisis balancing:
  - auto-indenting via the tab key
  - some way of indicating  what open parenthisis matches the close paren that you have selected.  (like emacs "jump the cursor for a fraction of a second, or coloring, etc)

Tab completion:
  - querying the valid symbol names that are available in texmacs-guile, and filling the rest in automatically if there is only one completion, and displaying the available options if there are multiple completions.  (this is basically the differnce between spending your time programming vs spending your time looking through reference manuals)

">" support:
  - allowing the use of stree->tree in externs, (and every other > based symbol). 
{our "temporary hack" now can become a multi-line embedable scheme hack, written as a extern for conversion from x-}y to x->y.}


Of course they don't all have to be implemented for externs to be "convient".  Each just adds a little contribution.  I see any of these conviences getting implemented as allowing the maximum extern to get a little longer.  (maximum = maximum size before the code became unmanagable)




Next subject:
I found out that calling with a introducary text parameter via the scheme include seems to prevent the passed lines from automatically wrapping in their inserted place.  I'll try your new "substitution method" and see if those wrap...


more text below the quoted text:

On 3/11/06, Henri Lesourd <address@hidden> wrote:
> I see.  If i pass it as a arg by using macro, then passed paragraph
> will be editable in the document that requests the other document to
> be included.  However the document that's being included will not be
> editable, as it's now a macro.

The document that's being included is not editable not because it is part
of a macro (because inside a macro, you can precisely turn parts to being
editable using <arg>), but because it is part of <include>. On the other
hand, even in the context of only one document, the tags
<value|variable-name>
do not allow for direct editing of the variable value.

> If I pass it as a value via <value|intro-text>, then the document
> that's being included is editable,

No, its not : as soon as you use <include> or any of its derivatives
(like the
one I wrote in Scheme), the included text is *not* editable any more.


By the inluded file being editable i didn't mean editing it from the document doing the including, but I was refering to being able to load the included file in a seperate texmacs buffer and edit it.  We could turn the included file into a "pure" macro (without a include & "value" call), but then we loose our normal editing abilities on this buffer, and can only work in "code mode" (as "<assign|x|<macro|..." statements don't display anything)


Corey


--
((lambda (y) (y y)) (lambda (y) (y y)))
reply via email to

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