Is there a way to automatically set the note name from the note?

Example, automatically set note name to first heading 1, ie, #, in markdown.

I use an Applescript to assist in setting the note name
It could retrieve the first markdown heading

i use a “Set Title As” script. I think I’d originally done it per the instructions at this old post, but it looks like things have changed a bit. But check out and play with the scripts under Script>Rename, maybe one of them gets you close?

1 Like

Indeed that is possible via the contextual menu or Edit > Set Name As or Command-Control-i with the desired text selected.

3 Likes

Command-Control-I is what I use!

1 Like

I have been using this (amazing) capability for years - thank you DevonThink
Then I scripted it and dedicated F6 to it (being a lazy guy(
Then for the occasions where I wanted to APPEND something to the file name, something selected from the text itself, I wrote a simple script (no try’s, other checks, I know) - but I use it all the time

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application id "DNtp"
	set x to the name of the content record of think window 1 as text
	set the name of the content record of think window 1 to x & "_" & the selected text of think window 1
end tell

For example, I may use F6 to name the file to the text “Diagrams” then F7 to append “_scientific”, by having selected “scientific” in the text. Of course, often the selected text is longer, that’s why me ebing lazy was an incentive :wink:

Great workarounds, but I still think it would be a really nice feature to have built in to DEVONthink.

For certain data types, the semantic info’s readily available, can fall back to first line if it’s missing or types without this info. Sounds like a quick win.

Scripts for more specific convenience still work as expected.

I seem to remember a recent post where someone complained about the title of a note being set from its first line. That might have been in DTTG, but still…

I wasn’t aware of that, and it’s very useful :slight_smile: thanks