Hi Hans,
This certainly helps! Did some further experiments (detailed below) to clarify the role of
the 'Pristine Copy' dir.
Thanks a lot,
Rob
On Dec 3, 2009, at 12:28 PM, Hans-Jörg Bibiko wrote:
[snipped a bunch]
What is the
'TextMate' way to preserve these changes with future updates? From the docs,
should I have updated below 'cd ...' line to point at
'~/Library/"Application Support"/TextMate/"Pristine
Copy"/Bundles' (or even to go into /Library/...)?
It depends on how you would like to be up-to-date. Via svn is one way. Then:
export LC_CTYPE=en_US.UTF-8
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
svn co
http://svn.textmate.org/trunk/Bundles/R.tmbundle
or to update only
svn up
http://svn.textmate.org/trunk/Bundles/R.tmbundle
works fine.
An other way is GetBundles which informs you about updates and you can install a new
bundle or update a bundle just by double-clicking at the bundle name. Furthermore
GetBundles keeps your Support/lib folder up-to-date.
Auto-update seems to work, other parts of GetBundles don't work on my system. e.g.
listing bundles in the repository never finishes.
Both ways won't touch your local changes because
your changes are stored in .../Pristine Copy/Bundles - as the name it says. If you add
your favourite commands this would be ok but if you changes a pre-defined command, well
this could lead to some problems.
From this statement, below help text and the meaning of pristine (doesn't it mean
'fresh, unspoiled'?) I got confused. On a 2nd machine I cleaned out all TextMate
stuff and installed a new version and all additional packages in
'/Library/.../Bundles'. It then seems to install my local changes in
'~/.../Bundles' though, not in '~/.../"Pristine Copy"/Bundles'.
Auto-update too seems to write to the '.../"Pristine Copy"/Bundles'
directory (below the command, slightly updated, as on my system). Not sure how
'/Library/.../Bundles' , '~/.../Pristine Copy/Bundles' and
'~/.../Bundles' exactly get merged (I assume somewhat like specialization in
inheritance, the latter being the most specific), but given that on this 2nd system
'~/.../Pristine Copy/Bundles' was empty, auto-update didn't do anything.
After installing the additional packages in ~/.../Pristine Copy/Bundles' and adding
the 'echo "$f"' in the auto-update for loop, auto-update shows:
ANTLR.tmbundle ASP.tmbundle ASP_vb_NET.tmbundle Active4D.tmbundle Ada.tmbundle
Ant.tmbundle Bison.tmbundle Bulletin Board.tmbundle C++ Qt.tmbundle CTags.tmbundle
CVS.tmbundle ColdFusion.tmbundle Context Free.tmbundle D.tmbundle Darcs.tmbundle
DokuWiki.tmbundle Doxygen.tmbundle Dylan.tmbundle Eiffel.tmbundle Erlang.tmbundle
Experimental Wiki.tmbundle Experimental.tmbundle F-Script.tmbundle FXScript.tmbundle
FileMerge.tmbundle Fortran.tmbundle GTD2.tmbundle GTDAlt.tmbundle GetBundle.tmbundle
Gettext.tmbundle Graphviz.tmbundle Greasemonkey.tmbundle Gri.tmbundle Groovy
Grails.tmbundle Groovy.tmbundle Haskell.tmbundle Hotkey.tmbundle ImageBrowser.tmbundle
Inform.tmbundle Ini.tmbundle Installer.tmbundle Io.tmbundle JSON.tmbundle JavaScript
Flash.tmbundle JavaScript MooTools.tmbundle JavaScript Objective-J.tmbundle JavaScript
Prototype & Script_aculo_us.tmbundle JavaScript YUI.tmbundle JavaScript
jQuery.tmbundle Lex-Flex.tmbundle Lighttpd.tmbundle LilyPond.tmbundle Lisp.tmbundle
Logo.tmbundle Logtalk.tmbundle Lua.tmbundle MEL.tmbundle MIPS.tmbundle MacPorts.tmbundle
Make.tmbundle Man Pages.tmbundle Matlab.tmbundle Maven.tmbundle Mediawiki.tmbundle
Mercurial.tmbundle Modula.tmbundle MoinMoin.tmbundle Movable Type.tmbundle
Navigation.tmbundle Nemerle.tmbundle OCaml Experimental Completions.tmbundle
OCaml.tmbundle OCamlCodeCompletion Misc.tmbundle OCamlCodeCompletion Unix.tmbundle
OCamlCodeCompletion.tmbundle ODCompletion.tmbundle Outlines.tmbundle PHP Smarty.tmbundle
Pascal.tmbundle Perforce.tmbundle Perl HTML-Template.tmbundle Perl Mason.tmbundle Perl
Template Toolkit.tmbundle PmWiki.tmbundle Postscript.tmbundle Processing.tmbundle
Prolog.tmbundle Propel.tmbundle Python Django Templates.tmbundle Python Django.tmbundle
Quake.tmbundle R Console (R_app).tmbundle R Console (Rdaemon).tmbundle R.tmbundle
Ragel.tmbundle RegularExpressions.tmbundle Remind.tmbundle Rez.tmbundle Ruby Haml.tmbundle
Ruby RSpec.tmbundle S5.tmbundle SCons.tmbundle SSH-Config.tmbundle SVK.tmbundle
SWIG.tmbundle SWeave.tmbundle Scheme.tmbundle Scilab.tmbundle Setext.tmbundle
Slate.tmbundle Standard ML.tmbundle Tabular.tmbundle Tcl.tmbundle TerminalMate.tmbundle
Textile.tmbundle Thrift.tmbundle Transmit.tmbundle Twiki.tmbundle Txt2tags.tmbundle
Vectorscript.tmbundle Widget Creator.tmbundle iCalendar.tmbundle iTerm.tmbundle
reStructuredText.tmbundle
/Users/rob/Library/Application Support/TextMate/Pristine
Copy/Bundles/GetBundle.tmbundle/Support/notify.rb:19: warning: found = in conditional,
should be ==
This makes more sense. The final message disappeared after I changed the assignment into a
comparison operator in notify.rb. Maybe this was caused by the newer version of Ruby on
SnowLeopard.
Rob
------
5.2 Editing Default Bundles / Items
Some of the default items may not be to your exact liking, for example the coding style in
snippets may differ from yours, so you may want other tab triggers, key equivalents, or
similar modifications.
If you edit a default item the difference will be stored in ~/Library/Application
Support/TextMate/Bundles. These are then merged with the default version so your changes
will be effective even after upgrading TextMate. All new items you create also end up in
this location.
Bundles or bundle items which you install by dragging them to TextMate or double clicking
will be installed in~/Library/Application Support/TextMate/Pristine Copy/Bundles. Editing
these will also result in only the differences being stored in ~/Library/Application
Support/TextMate/Bundles, meaning that if you later get a new version of this third party
bundle, you can safely install this one on top of the old one (by dragging it to TextMate)
and again your changes will be preserved.
------
SVN="${TM_BUNDLE_SUPPORT}/bin/svn"
REV=$(< "$TM_SUPPORT_PATH/version")
SVN_OPTS="-r$REV --no-auth-cache --non-interactive"
cd ~/Library/Application\ Support/TextMate/Pristine\ Copy/Bundles
if [[ $? == 0 ]]; then
for f in *.tmbundle; do "$SVN" up $SVN_OPTS "$f"; echo
"$f"; done \
2> >(CocoaDialog progressbar --indeterminate --title 'Updating all your
Bundles' --text 'This could take a while...')
osascript -e 'tell app "TextMate" to reload bundles'
"${TM_RUBY:-ruby}" -wKU "$TM_BUNDLE_SUPPORT/notify.rb" updated
else
"${TM_RUBY:-ruby}" -wKU "$TM_BUNDLE_SUPPORT/notify.rb"
update_failed
fi
------