Door Games Unlimited

Welcome, Guest.


Subject: Re: First World Problems. Date: Sun Mar 06 2016 06:10:09
From: Accession To: Digital Man

Hello Digital Man,

 Ac>> Not sure I understand what you mean here. By "run it from JS" you mean
 Ac>> nano? 

 DM> The editor. The console.editfile() method uses whatever editor the user
 DM> has selected as their preferred editor to edit the filename passed.

Even when nano itself is not configured in External Editors? I don't see how the
 JS could know that the user is actually selecting nano as their editor. See bel
ow..

 Ac>> I suppose I should explain what is going on. I asked Nightfox if he
 Ac>> could rip out the function in SlyEdit that reformats MSGTMP with
 Ac>> quoted initials, so I could offer up nano as a message editor as well
 Ac>> (and possibly even vim in the future), since they can be used in
 Ac>> "restricted" mode where nothing on the disk can be altered except the
 Ac>> file loaded, ie: MSGTMP. 
 
 Ac>> So after all of that is done, and a new formatted MSGTMP is created,
 Ac>> the JS runs nano, where you can edit and save, and then the JS posts
 Ac>> the message and exits back to the BBS.

 Ac>> So if there's a better way than the first option above you gave, by
 Ac>> all means explain it to me in laman's terms and I'll give that a shot
 Ac>> as well. 

 DM> It sounds like you want to use SlyEdit as a quoter, but not an editor?

Something like that. Basically only the function of SlyEdit that retreives the n
ame in the TO field for initials, and quote/reformat/rewrap function of SlyEdit 
is being used here, so "SlyEdit" as a whole is not being used, correct.

 DM> There's really no built-in method in Synchronet to do that (support
 DM> external "quoters"). If you just want to use nano as an editor and don't
 DM> need anything from SlyEdit, the proper way would be to configure nano in
 DM> SCFG->External Programs->External Editors.

Understood. What we've done here is basically strip those mentioned functions ou
t of SlyEdit, and along with some added error checking as well as checking to ma
ke sure QUOTES.TXT is present (if not, edit the message as "new"), and check for
 modifications to MSGTMP (if not, abort the message), and then nano is ran from 
the script using bbs.exec().

So basically I think we've gotten it to the point where you can run ?msgQuoteWra
p.js "/usr/bin/nano [-opts]" %f from the command line in External Editors, the s
cript takes care of the options and editor you choose,aand away you go!

With this being said, vi(m) also seems to work, although it seems some of the ba
ckspace/delete stuff may have to be tinkered with on my end, but that's minimal.

Regards,
Nick

---
 ■ Synchronet ■ thePharcyde_ telnet://bbs.pharcyde.org (Wisconsin)

Previous Message       Next Message
In Reply To: Re: First World Problems. (Digital Man)
Replies: Re: First World Problems. (Nightfox)Re: First World Problems. (Digital Man)