Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mnemonics not being remembered #2301

Closed
craigfrancis opened this issue Jan 1, 2017 · 21 comments · Fixed by #2308
Closed

Mnemonics not being remembered #2301

craigfrancis opened this issue Jan 1, 2017 · 21 comments · Fixed by #2308

Comments

@craigfrancis
Copy link

@craigfrancis craigfrancis commented Jan 1, 2017

I'm doing a clean install of macOS Sierra (10.12.2), and QS 1.5.1 (401C); but this also seems to effect my old computer on El Capitan (OSX 10.11.6) that has just updated QS to 1.5.1 (401C).

Normally when using QS, if you start typing, you can press the down arrow and select something else that matches - doing so increases it's score, so when it's score is high enough, it can be the default for what you just typed.

At the moment the score does not change - for example, when I type "cal", I currently have the Calendar app in second place with a score of 92, and this does not not change, no matter how many times I select it.

I'm also unable to right hand click and use the "Make Default" menu item (it's there, but it's disabled).

On my old computer, where I've been using QuickSilver for years, the scores are no longer changing either - but that's kind of ok, because the defaults are pretty much correct.

screen-shot-2017-01-01-at-13 49 20

@craigfrancis
Copy link
Author

@craigfrancis craigfrancis commented Jan 1, 2017

Is this to do with Mnemonics.plist?

After quitting QuickSilver, deleting this file, starting again, typing "cal" and selecting "Calendar", I'm getting:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>abbreviation</key>
	<dict>
		<key>QSActionMnemonic:NSFilenamesPboardType</key>
		<array>
			<string>AppLaunchAction</string>
			<string>AppReopenAction</string>
		</array>
		<key>cal</key>
		<array>
			<string>/Library/Scripts/Script Editor Scripts/Image Manipulation/Scale.scpt</string>
		</array>
	</dict>
	<key>implied</key>
	<dict>
		<key>/Applications/Internet Explorer.app</key>
		<dict>
			<key>ie</key>
			<integer>2</integer>
		</dict>
		<key>/Applications/Mail.app</key>
		<dict>
			<key>m</key>
			<integer>2</integer>
			<key>mail</key>
			<integer>2</integer>
		</dict>
		<key>/Applications/Safari.app</key>
		<dict>
			<key>s</key>
			<integer>2</integer>
			<key>safari</key>
			<integer>2</integer>
		</dict>
		<key>/Applications/iTunes.app</key>
		<dict>
			<key>it</key>
			<integer>2</integer>
			<key>itunes</key>
			<integer>2</integer>
		</dict>
		<key>/Library/Scripts/Script Editor Scripts/Image Manipulation/Scale.scpt</key>
		<dict>
			<key>cal</key>
			<integer>1</integer>
		</dict>
	</dict>
</dict>
</plist>

Not sure why we have "/Image Manipulation/Scale.scpt".

Or why there is an entry for "Internet Explorer.app" (I've not had that installed for years, and it wouldn't have touched this laptop, as Internet Explorer was for PowerPC, not Intel).


I've also tried copying the "Mnemonics.plist" from my old computer, and things are back in the right order... but does not change order.

@tdn007
Copy link

@tdn007 tdn007 commented Jan 1, 2017

Same problem here.
I'm also unable to right hand click and use the "Make Default" menu item (it's there, but it's disabled).
I go back to version 1.4.2 because "Make Default" is essential for my all day workflow.

@skurfer skurfer changed the title Defaults not being remembered Mnemonics not being remembered Jan 3, 2017
@skurfer
Copy link
Member

@skurfer skurfer commented Jan 3, 2017

There was inconsistent behavior regarding clearing the search string in versions prior to 1.5.0. The search string is now cleared more consistently, but that means more aggressively.

Initially, this led to a bug in 1.5.0 where mnemonics were never being saved, but that should have been fixed for 1.5.1. You should see mnemonics get updated automatically when you “use” and object.

As for updating them manually, you should be aware that the search string is now cleared when the interface is dismissed. Previously, you could search for something, run an action on it, then call up the interface and set defaults, etc. This worked because the search string was still there, but it really shouldn’t have been. (Or so it seemed. I’m starting to wonder…)

As of 1.5.x, if you want to manually assign a search string as the default for something, you need to do it before dismissing the interface, while the search string still exists. Honestly though, you shouldn’t need to use “Set as Default” very often and definitely not daily. In my experience, using an abbreviation for something once or twice just naturally makes it the default.

FYI, the Internet Explorer reference is coming from the default file. We should probably update that (or just make it empty by default).

@craigfrancis
Copy link
Author

@craigfrancis craigfrancis commented Jan 3, 2017

Mnemonics are not being saved in 1.5.1, at least on my two computers.

My comment about "Make Default" was more of an observation that something is broken (personally I've only ever used it once).

@skurfer
Copy link
Member

@skurfer skurfer commented Jan 3, 2017

OK. I’m not seeing this (and it was very noticeable when I was), but I’ll do some testing.

@skurfer
Copy link
Member

@skurfer skurfer commented Jan 3, 2017

I tried

  1. Shutting down QS
  2. Moving Mnemonics.plist to the Desktop
  3. Starting QS
  4. Searching for “cal”, selecting Calendar, and opening it
  5. Searching for my initials, selecting my Address Book entry, and opening it

After that, Calendar had become the default for “cal” and my entry was default for my initials. The contents of Mnemonics.plist looked correct.

What do you mean when you say you “selected” Calendar? Mnemonics won’t get updated unless you do something to confirm “this is the thing I wanted”. That includes running an action, hitting → or /, hitting comma, and a few others.

@hmelman
Copy link

@hmelman hmelman commented Jan 3, 2017

So it seems better with this version but not quite sure it's as good as it was. Specifically, I have a long Safari bookmark: "Amazon Comics to Buy". The first 7 characters are not unique. I've been away a few days, but trying now I had to type "amacomics" before seeing it 2nd in the results list (I type until it's onscreen, I'm not scrolling). I was typing "amacomicstobuy" so it's improved, I'd like it require less typing faster but I don't have specific examples for you of how fast it's learning.

@skurfer
Copy link
Member

@skurfer skurfer commented Jan 4, 2017

I think you should try the same things in 1.4.2 @hmelman. There haven’t been any changes to the matching/ranking code, and the recent tweaks to learning were all in 1.4.1.

@craigfrancis
Copy link
Author

@craigfrancis craigfrancis commented Jan 4, 2017

I've just created a video showing what's happening on my computer, where I emptied the folders:

~/Library/Application Support/Quicksilver/
~/Library/Caches/Quicksilver/

And deleted the preferences with defaults delete com.blacktree.Quicksilver.plist (because the preferences can be cached by the OS).

Interestingly, you will notice that it continued using the "Bezel" interface (not Primer), and it didn't go though the first-run setup process - it's as though some of my preferences are being remembered somewhere else.

Also, at the end of the video, the "Set as Default for CAL" is available, I can't work out why, and I've not been able to make it do it again since.

QuickSilver-Defaults.m4v.zip

@skurfer
Copy link
Member

@skurfer skurfer commented Jan 4, 2017

Well, that is weird. I can explain at least part of it. Your preferences aren’t getting wiped because com.blacktree.Quicksilver.plist is the name of the file, but not the bundle ID. Try this instead:

defaults delete com.blacktree.Quicksilver

See if it’s any different with blank preferences. If it is, we need to figure out why, because it’s not as if there’s a checkbox for “never learn anything”. 😃

@craigfrancis
Copy link
Author

@craigfrancis craigfrancis commented Jan 5, 2017

Good point, while including ".plist" did delete the file, that didn't clear the preferences cache.

Issuing defaults delete com.blacktree.Quicksilver (as you wrote) does reset the preferences properly (as in, it goes though the setup process, and changes the interface back to "Primer").

However, it still does not make any difference to the ordering of items.

I can keep typing "cal" and selecting "Calendar" as much as I like, the /Library/Scripts/Script Editor Scripts/Image Manipulation/Scale.scpt script (and no idea why this one) appears first - it just happens to be under "Catalog > Scripts > Scripts (All Users)".

And no matter what I do with any other selection, their orders remains the same, and the "Make Default" menu item is nearly always disabled.

@craigfrancis
Copy link
Author

@craigfrancis craigfrancis commented Jan 5, 2017

Considering I'm not a Objective C programmer, I am intrigued by "rankMenuWithTarget" in QSRankedObject.m:

- (NSMenu *)rankMenuWithTarget:(NSView *)target {

As the action for the "Make Default" menu item is based on "defineMnemonicImmediately":

- (IBAction)defineMnemonicImmediately:(id)sender {

if ([anItem action] == @selector(defineMnemonicImmediately:) ) {

Both check self matchedString.

It is possible (yep, I'm guessing quite a bit now), that this is nil? otherwise this menu item looks like it would change to "Set as Default for X".

@skurfer
Copy link
Member

@skurfer skurfer commented Jan 5, 2017

Short answer: The behavior is definitely influenced by the values of searchString and matchedString.

More importantly, I just blew away all of my settings and I can now reproduce the problem. Thanks for taking the time to provide so much detail. I’ll look into it as soon as I can.

@craigfrancis
Copy link
Author

@craigfrancis craigfrancis commented Jan 5, 2017

Thanks for looking into this, and for supporting QuickSilver, it's one of those apps that I never think about until it's not there (I use it all the time, and OSX feels broken without it).

As to deleting your settings, sorry about that, by any chance would you have a backup? maybe via TimeMachine?

@skurfer
Copy link
Member

@skurfer skurfer commented Jan 5, 2017

As to deleting your settings, sorry about that, by any chance would you have a backup?

Oh, don’t worry. I did it on purpose. I have a script that puts all my QS settings in a DMG, and brings it back when I say.

@tdn007
Copy link

@tdn007 tdn007 commented Jan 5, 2017

Thank you Skurfer!

@skurfer
Copy link
Member

@skurfer skurfer commented Jan 5, 2017

Found the problem (sort of). As a temporary work-around, go to Preferences → Command and disable “Reset search after” or increase the time.

@craigfrancis
Copy link
Author

@craigfrancis craigfrancis commented Jan 6, 2017

It's half way there... switching off "Reset search after" allows me to manually set the default now; but if I'm using Quicksilver normally, the order (score) still isn't changing.

Notice how the screenshot shows the score still at 92 (and that didn't change no matter how many times I used Quicksilver to open the Calendar).

screen shot 2017-01-06 at 10 55 19

@skurfer
Copy link
Member

@skurfer skurfer commented Jan 6, 2017

OK, sorry. I think it takes a combination of turning off the reset and using the code from #2304 (which is what I was using). Hopefully we’ll have a fix out soon.

@craigfrancis
Copy link
Author

@craigfrancis craigfrancis commented Jan 6, 2017

Thanks skurfer, for now it's not urgent as I've been able to copy my old Mnemonics.plist, and that gets most entries right :-)

@craigfrancis
Copy link
Author

@craigfrancis craigfrancis commented Jan 18, 2017

Thanks skurfer, I can confirm this has fixed the problems for me :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants