On 03/05/2015 09:22 PM, Paul Onions wrote:
> On 4 Mar 2015, at 22:44, Ralf Hemmecke wrote:
>> 1) In the REPL buffer, when I press ENTER with the cursor on some line,
>> the line will be copied to the bottom of the REPL buffer an serves as
>> input. That's perfect, but it would be great if the line following the
>> line with the cursor is joined to the cursor line (with the _ removed)
>> in case there is a _ at the very end of the cursor line. And this joined
>> line would then be used as the input line.
> 
> Okay, I see what you mean, but the behaviour you describe is actually a
> function of comint-mode (a standard emacs mode from which
> axiom-process-mode inherits much of its behaviour), so this might be a
> bit difficult to achieve.

OK. It's not totally necessary. I just though, it would be quite
practical. Maybe, I should then rather generate my 1d output format into
just a single line, then everything is fine.
Unfortunately, that contradicts a little with what the axiom developers
wanted. We have

    display(f: %): Void == display(f, _$LINELENGTH$Lisp pretend I)

and http://fricas.github.io/api/TexFormat.html#index-7

    display(t) outputs the TeX formatted code t so that each line has
    length less than or equal to the value set by the system command
    spadsys{)set output length}.

Unfortunately, it's only possible to have

    )set output length 245

>> 2) I'm actually just starting with axiom-environment, so maybe it's
>> already there... I'm looking for a way to put my cursor on some line in
>> a buffer containing an *.input file. Then press Ctrl-ENTER and that line
>> would be copied to the REPL buffer and automatically executed.
> 
> It's not there yet.  I have thought about this but got stuck on a way of
> deciding exactly what chunk of code gets sent to the REPL -- only doing
> a single line seems of rather limited use, wouldn't it be better to do
> an entire "toplevel form"?

Not necessarily. For me oneliners would be already something. OK, I
could also use )read instead, but automatically sending a line to the
REPL buffer (but only advancing by one line in the current edit buffer
(with a .input file)) would be useful, I think.

Sending whole toplevel forms would also be nice, but for that you would
have to analyse what is under the cursor. Not sooo easy, I'd say.

But sending also continuation lines, should be easy to achieve.
Concatenation is easy, getting the pile mode right, is hard.

>> 3) Another wish. If I am in a .spad or .input or in the REPL buffer,
>> there sometimes appear FriCAS types. Suppose my cursor is on such a type
>> identifier, for example, Polynomial(Integer), cursor on the m.
>> Then pressing C-c C-h or some other key would call a function that gets
>> "Polynomial" as parameter. In fact, I'd like that function to call
>>
>>  firefox http://fricas.github.io/api/Polynomial.html &
>>
>> or with a local "file://.../Polynomial.html" URL.
> 
> Well C-c C-d a does axiom-process-apropos-thing-at-point which pops up a
> buffer with the result of e.g. ")show Polynomial".  But you are right, 
> it would be nice to be able to open your web-based documentation too.

Oh, can you give me some instructions how I could patch that function
for my which, i.e. C-c C-d should call firefox instead of doing ')show'.

>> 4) Like 3), but instead of calling a browser, it would open the source
>> file where the respective type is defined. Of course, I would have to
>> configure where my FriCAS sources are. And it would need another list.
>> I used the following Makefile target to generate the information that I
>> need for all the cross linking and the link to the .spad sources on
>> http://fricas.github.io/api/Integer.html .
>>
>> abbrev.list:
>> #--rhx: TODO: Does not work for in-source-build!!!
>>     (cd $(ALGEBRASOURCES); \
>>     grep -nH '^)ab[a-z]* [a-z]*  *[A-Z0-9]* *[^ ]*' *.spad \
>>     | sed -e 's/\.spad:/ /' -e 's/:)abbrev//') > $@
> 
> Yes, I have thought about this too, but I would want a way to query a
> running Fricas as to where the source file is.  This would be in keeping
> with the rest of axiom-environment's data/documentation gathering
> functions (where all data is obtained by calling built-in commands and
> SPAD functions).  I think depending on knowledge of an external source
> tree is just too fragile, too liable to break.

Ah, OK. That should be possible, because FriCAS comes with the *.spad
files distributed. Let me see... Does this help you?

    )sys cat $AXIOM/src/algebra/integer.spad

However, these sources would not what I would like to look at (as a
developer). I would like to jump directly into where my repository
checkout is, i.e. the true sources, not the installed ones. So, I would
like a configuration variable which (when NIL) defaults to
$AXIOM/src/algebra as given above. Note, however, in FriCAS the AXIOM
variable will be set by the 'fricas' script and is not generally set in
the users environment before calling fricas.

Ralf

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to