[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: accessing the Linux clipboard...



Carl Distefano wrote:
I had a further thought about working around SaveDef. What if you APPENDed
the DeFine to an empty file? Like so:

XPLeNCODE v2.0
b-gin [UNTITLED]
;*; Append method[cr|lf]
[DZ_]
{<}IF{<}VA$DE{>}>0{>}
[BX_]es 1[Q2_]
[DB_]
[BX_]ch/s /[wC]/{010}/[Q2_]
{<}SV01,{>}
[BX_]sa %01,\xy4\clip\frxy[Q2_]
[BX_]append \xy4\clip\frxy[Q2_]
[BX_]ch/s /{010}/[wC]/[Q2_]
[BX_]do/nv system xytonix.sh[Q2_]
{<}EX{>}
{<}EI{>}
{<}PRNothing DeFined{>}{<}EX{>}[cr|lf]
-nd
XPLeNCODE

Same again, in XYENCODE:

'%--_XYENCode_start--
',*',_Append_method'^
'DZ
~>0~>
  'BXes_1'Q2
  'DB
  'BXch/s_/;~[/~J/'Q2
  ~
  'BXsa_'/01,\xy4\clip\frxy'Q2
  'BXappend_\xy4\clip\frxy'Q2
  'BXch/s_/~J/;~[/'Q2
  'BXdo/nv_system_xytonix.sh'Q2
  ~
  ~
~~'^
'%--_XYENCode___end--

Does that work?
Carl, this works much better than SAveDef but not as good as CoPy. Sometimes I have an extra character or two at the end of the defined block when I paste it in Linux; so far I do always get the correct start point of the selection.
However, the ch/s way of converting the carriage returns puts the Xy4
cursor at the beginning, not the end of the selection copied to Linux,
when the program is done, and though that can be tweaked, it seems to me
that running two ch/s conversions could be avoid by putting that process
in the xytonix.sh script a la Rafe using dos2unix (aka fromdos).

Paul