Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a text clipping containing the '@' character System
I needed to create a text clipping that contained the "@" character, but couldn't, because MacOS creates dragged text containing an "@" character as an email link. See for yourself: Select the following text -- xxxx+yyyy -- then drag it to your Desktop. This creates a text clipping file named xxxx+yyyy.textClipping. Now select the following text -- xxxx@yyyy -- and drag it to your Desktop, and notice that the file is named xxxx@yyyy.mailloc, and its icon says MAILTO. If you drag and drop this text into a program, it will get pasted as mailto:xxxx@yyyy.mailloc.

The solution requires editing the xxxx+yyyy.textClipping clipping file. This requires several steps:
  1. Extract the contents of its resource fork into a temporary file (using a receipe from this hint)
  2. Edit the temporary file
  3. Write the temporary file back into the resource fork.
Read on for the details...

Step One: Extract the resource fork. In Terminal, do this:
 % cd Desktop
 % cat xxxx+yyyy.textClipping/rsrc > tmp.txt
Step Two: Edit the temporary file. Now use your favorite editor (mine is to carefully replace all instances of + with @ in tmp.txt. I chose the "+" character for my clipping file based on the observation that the clipping resource is unlikely to contain that character. Feel free to use a different character, but make sure it doesn't appear elsewhere in the clipping file.

Step Three: Write the file back into the resource fork. Again in Terminal, use this command:
 % cat tmp.txt > xxxx+yyyy.textClipping/rsrc
Or, if you get an error saying xxxx+yyyy.textClipping/rsrc: File exists, try the following instead:
 % cat tmp.txt >! xxxx+yyyy.textClipping/rsrc
Now you may delete the temporary file, and rename the text clipping if you wish. Dragging the clipping file into a text area will then paste the intended text.

[robg adds: Because the resource fork is created when the clipping file is created, you can't just change the extension, type, and creator of the file. If anyone knows a simpler way to get an "@" character into a text clipping, please post in the comments.]
  • Currently 1.43 / 5
  You rated: 2 / 5 (7 votes cast)

Create a text clipping containing the '@' character | 8 comments | Create New Account
Click here to return to the 'Create a text clipping containing the '@' character' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
It just works (without any tweaks) on my Mac
Authored by: sredlums on Dec 04, '08 09:57:48AM

I just tried it and it works without any problem, no need for any of these steps.
I have a Mac mini G4 with Mac OS X Leopard 10.5.5, and though I do try out some stuff and made some tweaks, I really wouldn't know what I could have done that influenced the behaviour of the textclippings... :-/
Anyway, I like this behaviour, so i'm not complaining :-)

[ Reply to This | # ]
It just works (without any tweaks) on my Mac
Authored by: robg on Dec 04, '08 11:34:15AM

It didn't work for me here in 10.5.5 on either a Mac Pro or a MacBook Pro.


[ Reply to This | # ]
It just works (without any tweaks) on my Mac
Authored by: osxpounder on Dec 08, '08 03:23:00PM

I confirm that dragging xxx@yyy to the Desktop creates a Mail To link, not a text clipping, on a iMac running 10.5.5.

I have stopped using text clippings on the Macs I use regularly, though I do use them when I'm on someone else's Mac (as when I attend a training course, or visit a friend).

For my Macs, I keep TextEdit in my Dock. I wish I could drag text onto the TextEdit toolbar icon I also have in Finder, but it doesn't work for me. Pity.

Still, it's quick & easy for me to drag text onto the TextEdit icon in the Dock.

I appreciate your hint, and I don't want you to think of my alternative as a criticism at all. Different strokes for different folks.

[ Reply to This | # ]
Create a text clipping containing the '@' character
Authored by: flyingcactus on Dec 04, '08 10:56:25AM

or if you select "xxxx@yyyy -" (including the space and the character from the next or previous word) it will give you a text clipping. It is way faster to remove the two extra characters than to follow the instructions in this hint.

[ Reply to This | # ]
Create a text clipping containing the '@' character
Authored by: gshenaut on Dec 05, '08 09:21:52AM

I'm using Path Finder, and when I dragged xxxx@yyyy either to a Path Finder window or to the desktop, it just worked (that is, it produced "xxxx@yyyy.textClipping").

Greg Shenaut

[ Reply to This | # ]
Create a text clipping containing the '@' character
Authored by: HandyMac on Dec 06, '08 04:55:08PM
Could also use ClipEdit to edit the clipping.

[ Reply to This | # ]
Create a text clipping containing the '@' character
Authored by: Mike Perry on Dec 08, '08 12:23:00PM
If you get tired of command line frustrations, you might want to download the free SymbolicLinker either from VersionTracker or the creator's website:

It did and it seems to work quite well. It adds a contextual Finder menu for creating a symbolic link. I klutzing around for half an hour with the command line getting errors that made no sense. In a few seconds with SymbolicLinker I had what I needed.

[ Reply to This | # ]
Create a text clipping containing the '@' character
Authored by: Abel on Dec 09, '08 06:01:15AM
I might be overcomplicating this, but you can combine steps 1 and 2 with the following command:
cat xxxx+yyyy.textClipping/rsrc | sed 's|+|@|g' > tmp.txt
Or, if you're like me and love one-liners, this one cuts all in a single slash:
cat xxxx+yyyy.textClipping/rsrc | sed 's|+|@|g' > tmp.txt && cat tmp.txt > xxxx+yyyy.textClipping/rsrc && rm tmp.txt
(No, you can't redirect sed's output directly back into xxxx+yyyy.textClipping/rsrc — that just leaves you with an empty clipping. But you may already know that.)

[ Reply to This | # ]