Services item in editor menu on Mac

Is this a feature request? What services do you hope to see?

All the services registred as described in this article https://robservatory.com/the-useful-yet-useless-services-menu/. I do not share the views of the author of the article when he says it is useless. In our case it is a perfect entry point for many text app, for instance, check speller. I’m French and most check spellers do not fit my needs (I use Antidote which can be added to the services menu precisely)
The official entry point for services in Apple developer https://developer.apple.com/design/human-interface-guidelines/macos/extensions/services/
Thanks

2 Likes

I would like to see Brett Terpstra’s services available in Obsidian. Note that one of his services pastes a link in markdown, something we need often here.

7 Likes

Another vote for this if it’s a feature request. This goes further towards making it a good Mac citizen app. A lot of text-manipulation can be done without using any third party apps like KM or TE using mac’s built-in automation support which is only accessible through the services menu.

5 Likes

Thank you for indicating this service :slight_smile:

1 Like

Another vote for services. I am currently generating Zotero references in Ulysses using an applescript linked to services/quick-action (https://github.com/davepwsmith/zotpick-applescript), and it would be fantastic to be able to do this within Obsidian.

5 Likes

I was just planning to request this as well. On MacOS, applications can access “services” that can do a lot of things. For me, I have a number of system shortcuts that I created with Automator and I keep forgetting they won’t show up when using Obsidian.

For example, in Bear I have some shortcuts for various date formats.

I’d love to be able to access some of these automations when using Obsidian.

5 Likes

Can someone please explain this to me?

Over the past two days I’ve spent hours trying to get Dave Smith’s zotpick working in Obsidian. But no matter what I did, hitting the shortcut from Obsidian never brought up the Zotero selector dialog.

At first, I didn’t know what was wrong. Then I suspected the dialog was behind visible windows. That was wrong.

Eventually, I tried to track down the problem by opening TextEdit and working with a blank file. Initially, I had to give TextEdit various permissions, but ultimately I got it to work.

I went back to Obsidian, resized the window to take but 1/4 of a screen, and even moved the window to a different monitor. Still no dialog.

Then I came across this thread. I’ve pretty much stayed away from AppleScript and services. But I always thought Services were system level. This thread seems to imply that Services are optional for an app.

But this page implies that all legitimate MacOS apps have Services. In turn, this implies Obsidian violates basic OS-level conventions.

Exactly what’s going on?

2 Likes

Electron apps are not compatible with many OS features without significant effort to set them up, as far as I understand.

I have not used Zotpick, though, so I have no idea how it works. The readme says it should “work with any app.” I imagine that this line…

  • If you use an app-launching utility that lets you assign key combos to apps, use that to launch these scripts.

…means that you should be able to call Zotpick with e.g. Alfred or Keyboard Maestro. Have you tried that?

1 Like

Having not to be able to assess System Services on macOS is really sad to me, because I’ve written quite a lot of services to support writing in Markdown. I would be happy to assess this functionality in Obsidian without having to switch to an external editor.

I understand this, however, many other Electron apps like Typora or Mark Text do support System Services, so I still hope to see it added to Obsidian too.

8 Likes

I think the intention or point is that existing services would be able to be used as is without much if any modification to obsidian.

So, for example, maybe no one has to make or install an Obsidian plugin for formatting markdown tables - but instead we could had a services menu – and could use one of Brett’s existing scripts: https://brettterpstra.com/projects/markdown-service-tools/ .

The services scripts can just take and replace the selected text.

So long story short, it seems like it would require very little work, but would be a way to easily add value to Markdown, especially with the tools linked above.

1 Like

Another vote here to use standard macOS services menu.

There’s a bunch of very very useful functions, like Brett Terpstra’s SearchLink which takes the selected text and returns markdown-formatted links, and it has super powerful customization.

Or also a smart converter for Title Case that respects products capitalization and APA style.

They work with every other markdown editor and even some electron apps—so definitely possible and doable.

2 Likes

MacOS Services Menu … YES.

4 Likes

An observation that adds hope to this being possible is that Typora, which is Electron, has it:

I was excited about this suggestion, so I reached out to the developer of Typora to ask for tips on how they did it. They were kind enough to respond. Sadly, though, Typora on the Mac isn’t actually based on electron, but some native frameworks. So, this won’t directly help us on Obsidian.

I’m thinking a two-stage approach might work: a command for “Run macOS text services on selected text,” that then offers the services menu, perhaps via e.g., an NPM package offering a Javascript-Objective C/Swift bridge.

Edit: it seems it is possible to programmatically call the services menu:

2 Likes

Oh wow: Typora has always been upheld as a champion Electron app but I didn’t realise it was only the non-MacOS versions.

Hmm that would solve a lot of issues but might be going against the grain of how Services work in MacOS. It is usually also present in an app’s title menu option. Only on selected text limits services to not be applicable to higher scopes like the note file itself.

Would love that too! I’m using services to sort paragraphs or add "* " to a paragraph.

I’d love to have a Hotkey for ALL CAPS (e.g Shift Command U) :wink:

Just like to add my vote for access to the ordinary trans-app Mac contextual menu functions, in particular the ability to highlight a word, control-click, and then have the option Look Up “highlighted word”. Particularly useful if working in second language.

You can “easily” (for given values of easy) replace the services you need using Keyboard Maestro.
I have a very simple KM macro

  • it’s in a group that’s only active in Obsidian
  • The action simulates a copy keystroke, sends the variable over to an AppleScript call of SearchLink:
set myVar to do shell script "echo $KMVAR_LinkQuery"

set myString to do shell script "automator -r -i " & quoted form of myVar & " ~/Library/Services/SearchLink.workflow|awk '/http/{gsub(/^[ 	]*\"|\"[	 ]*$/,\"\"); print}'"

return myString

and voilà. I just use the same keyboard shortcut for this macro than for my SearchLink macro and I don’t see the difference.

It’s a hack, you need KM, but it works.