Re: [rkward-devel] [rkward-cvs] [rkward] rkward: erm, ok, here are the missing files to the last commit...

2014-11-28 Thread meik michalke
hi,

Am Freitag, 28. November 2014, 08:04:57 schrieb Thomas Friedrichsmeier:
 On Friday 28 November 2014 01:07:40 meik michalke wrote:
  are you sure?
 
 no. Except perhaps no the part about shipping both mime-types in one file.

good point -- i did that, and i also renamed the file to vnd.rkward.r.xml, 
which makes it a vendor-specific MIME type declaration. that makes it possible 
for us to define that MIME type without colliding with other packages doing 
the same. the original XML file is now being installed to 
/usr/share/mime/packages, but XDG does also automatically generate 
/usr/share/mime/text/r.xml and /usr/share/mime/application/rdata.xml from it. 
in effect it's the same result.

 I'm still somewhat worried about future clashes. _If_ R ever decides to
 start shipping these mime-types, RKWard is going to get the blame for
 conflicting names, I'm afraid.

i hope this is solved for good now. the hint to libreoffice.xml was useful and 
led me to the vnd.* files.

i'll try and test if this and the protocol handler also works on OS X. can you 
check that on windows?

  and if you click on an *.RData file, you're asked *once* whether the
  workspace should be saved -- after that, the current worspace is just
  silently replaced with the content of any other RData file you click.
 
 I changed that a bit, and yes, it might be buggy, but I think you should
 find, the behavior is now:
 - If a workspace has just been loaded, and not been touched, don't ask
 whether to save it before quitting / replacing it.
 - If you touch some object in between, you should be prompted, again.

right, i missed that part -- i was just baffled that rkward switched from one 
workspace to another without asking, and i was wondering what that would do to 
one's data if you accidentally clicked on a *.RData file... but that's a good 
solution now.

 - Now as to why you're prompted for the initial - probably empty -
 workspace: It's that .Random.seed that gets created some time in the middle
 of starting up. Did not think up a nice way to cope with that, yet.

actually, that is something that has always annoyed me a bit: i start RKWard 
and want to *open* a previous workspace, but the first thing i get is a 
question whether to *save* the workspace. good thing if that was gone.

do we have to care for that single .Random.seed object when one wants to open 
another workspace anyway?

  single objects can't be added to the workspace this way either. there
  should probably be two methods for handling *.RData files: complete
  workspace or individual R objects,
 
 True.

KDE knows this as service menus, i can try to write an according *.desktop 
file as well. then you'd have to actively open the file via right click. that 
would need another option for the rkward binary.

alternatively, RKWard could ask you how to deal with the input: replace 
current workspace or add all objects to the current one. do you know whether 
there's a difference between *.RData files containing saved workspaces and 
saved R objects? if there was, we could add a magic section to the MIME 
type, which would cause the first bits of a file to be read to get its type.

  and you should always be asked before
  your workspace is wiped.
 
 Really?

no, its fine as it is (except maybe for the initial workspace).


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  institut fur experimentelle psychologie
  abt. fur diagnostik und differentielle psychologie
  heinrich-heine-universitat d-40204 dusseldorf

signature.asc
Description: This is a digitally signed message part.
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel


Re: [rkward-devel] [rkward-cvs] [rkward] rkward: erm, ok, here are the missing files to the last commit...

2014-11-28 Thread Thomas Friedrichsmeier
On Friday 28 November 2014 16:20:10 meik michalke wrote:
 good point -- i did that, and i also renamed the file to vnd.rkward.r.xml,
 which makes it a vendor-specific MIME type declaration. that makes it
 possible for us to define that MIME type without colliding with other
 packages doing the same.

Ah, yes, that sounds much better!

 i'll try and test if this and the protocol handler also works on OS X. can
 you check that on windows?

Will try to remember. I have an inkling it's going to require adding it to the 
registry, though...

 actually, that is something that has always annoyed me a bit: i start RKWard
 and want to *open* a previous workspace, but the first thing i get is a
 question whether to *save* the workspace. good thing if that was gone.

Yes. I'll try to come up with something.
 
 do we have to care for that single .Random.seed object when one wants to
 open another workspace anyway?

No, but how to tell it apart for other, more interesting objects, reliably. I 
think the solution will have to involve something like marking the workspace 
as clean, at an appropriate point in the startup sequence, and then only 
asking to save, if it was modified after that.

 alternatively, RKWard could ask you how to deal with the input: replace
 current workspace or add all objects to the current one. do you know whether
 there's a difference between *.RData files containing saved workspaces and
 saved R objects? if there was, we could add a magic section to the MIME
 type, which would cause the first bits of a file to be read to get its
 type.

I don't think so. ?save.image says: save.image() is just a short-cut for 
‘save my current workspace’, i.e., save(list = ls(all = TRUE), file = 
.RData). Even if you could tell how it was saved, that still doesn't tell, 
reliably, how you'd like to use it. In general, there are three options:
  - Replace current workspace
  - Merge with current workspace (potentially overwriting objects)
  - Import into a sub-environment
And then, if a .workplace-file exists to go with that, for the first two, 
there's also the question, whether to load that, and if so, whether to close 
all other windows first...

So - a whole lot of options, really. I guess a plan could look like this: In 
the menu, provide two actions: One is the current behavior. The second 
(perhaps called Import Workspace...?) would offer all applicable choices. If 
there is a request to open a workspace file in a running session (from 
RKWard's own filebrowser, or externally), and the current workspace is not 
empty, use that second action, too.

Regards
Thomas

signature.asc
Description: This is a digitally signed message part.
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel


[rkward-devel] file formats [was: rkward: erm, ok, here are the missing files to the last commit...]

2014-11-28 Thread meik michalke
hi,

Am Freitag, 28. November 2014, 08:04:57 schrieb Thomas Friedrichsmeier:
  btw. there's some other issues: RKWard doesn't recognise *.rda files yet;
 
 Ok, will add.

i'd vote for RKWard being able to edit all text files it is using, i.e., also 
adding *.xml and *.js to the list. plugin development would benefit from it, 
at least i'd use kate anyway.


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  institut fur experimentelle psychologie
  abt. fur diagnostik und differentielle psychologie
  heinrich-heine-universitat d-40204 dusseldorf

signature.asc
Description: This is a digitally signed message part.
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel