Notes-Normal beaviour?

In DTPO I have a number of subgroups each of which hold Notes, (Data>New from Template>Note). I create a note in the first subgroup and type in what I want to then go on to the second subgroup, when I create a Note in this subgroup I get an exact copy of the Note in the first subgroup with all its entered data. Is this normal behaviour? I then have to change the note title and all the data on that note and this is irritating me :frowning: Thanks for any help.

Strange. I didn’t realize this about the Note template until I just now looked at the script inside that template. It is built to do exactly what @Allsop posted in the following manner – if the clipboard contains text, then it is pasted into the new “Note” and into the name of the new “Note” (name is "Note: "). To quote from the Templates topic in Help:

I doubt that feature will get rewritten. Here’s what to do if you do not want that behavior. Make an RTF file that is set up the way you wish. Save it with File > Export > As Template with whatever name you wish. Click Data > New from Template > Update Templates Menu. Now, when you use Data > New From Template your personal template will also be listed.

Of course, you could also load the clipboard with something that is not text (like an image or a URL). Or, you could save and run this script before using the built-in Note template:


set s_result to do shell script "echo -n '' | pbcopy"

which sets the clipboard to a zero-length string.

Thank you for your work-around Korm, most appreciated. I wonder why this was written like that , I can’t think of a reason offhand, but there we are, your work-around is no hassle. :slight_smile:

I wasn’t present at the creation, but I would guess two reasons: (1) it demonstrates the use of placeholders in templates for the person who wants to script their own templates, and (2) it is a sort of “annotation-light” template because it makes a note based on the most-recently clipping. Though, the Note template has unusual behavior (e.g., names the new note with the content of the clipboard regardless of how long that text might be).

Glad to help. I’d suggest that finding the in-built features of the application that are designed to do the task one wants to do is perhaps not a “workaround” – it is discovery.

I actually find the Note template useful as-is, especially when combined with LaunchBar. I can quickly copy multiple sections of text to the clipboard, switch to DEVONthink, and then individually load each snippet to the active LaunchBar clipboard, and then create a Note from the template. What this gives me over just using the Services commands to capture text (which I do use the majority of the time) is that each note is formatted the same-useful for clarity when I am sharing my research.

Actually, the note is named to the first carriage return of the clipboard text, so if the clipboard contains this:

This is a note

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

The the name of the note will be ‘This is a note’. It would be more useful if the name were truncated after a certain length, for cases where the initial text on the clipboard is one long paragraph.

Thanks for the use case, Greg. It helps to clarify purpose and suggest a solid, practical application of DEVONthink’s features.

A similar approach could be implemented with Keyboard Maestro (esp. v6), Alfred, and so on.

The fix to the name length logic in the script is very simple – perhaps Christian will update it in the next release?

I second Korm’s thanks!