On Apr 25, 2007, at 10:36, Armin Deierling wrote:
Let me throw in another negative impact of this \r thing:
I do a lot of scripting for an EDA Tool in Scheme.
During debugging of the scripts I usually copy chunks of code from
the editor window and paste it into the command line window of the
EDA application running in an X11 environment.
When I copy from a BBEdit window I see the line endings as \r
which are NOT accepted in the EDA Tool.
So this renders the technique unusable and I have to use e.g. NEdit.
I'd really love to be able (again) to use BBEdit for this task.
This ought to do it for you, I think. Save the script below in a file
called 'Edit•Copy.scpt' in the AppleScript editor, and place that
file in '~/Library/Application Support/BBEdit/Menu Scripts'. After
you copied something to the clipboard in BBEdit, the shell script
will be called to translate the \r into \n for whatever is stored in
the clipboard, and copied back onto it.
Maarten
on postmenuselect(menuName, itemName)
if menuName = "Edit" and itemName = "Copy" then
tell application "BBEdit"
do shell script "pbpaste | tr '\\r' '\\n' | pbcopy"
end tell
end if
end postmenuselect
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>