Saturday, May 10, 2008

Fast Editing Hint #2: Copy and Paste from Konqueror to text

Have you ever tried graphically copying a file from Konqueror (or another graphical file manager) and pasting it into a text file? Paste it into another graphical window, and the file itself will be copied into the corresponding directory. On the other hand, if you paste it into a test file, What you get is the instructions for finding the file: the file's url, or absolute path:

file:///files/audio/garage-punk/01_pink_stainless_tail_free_software_song.ogg

This is important information. It's useful for scripting, for using the command line, or for editing your kickbox files. You didn't have to type it, and there's no chance of making a mistake.

Here's an example of how to use this info, which has been obtained so quickly, so accurately, and so ...graphically.


1. If I want to add a link to the PDF file "Emacs Beginner How To" to my menu under book marked files, the first thing I do is copy it to the clipboard with Konqueror (Turns out that this is exceedingly hard to capture in a screenshot.)

I can highlight the item and hit Ctrl+C or I can right click on the item and choose "copy" from the popup menu.



2. I open the "menu" text file (Ctrl + Shift + F1), and find the template for the "Bookmark Files" menu



3. I paste in the verbatim path information from the clipboard, which, when translated into text, looks like this:
file:///files/books/Emacs-Beginner-HOWTO.pdf,
into the appropriate space, and fill in the rest of the information (The title for the menu display, the application needed to open the file)



4. I save the file, and I have a new menu item.

No comments: