lewang / flx

Fuzzy matching for Emacs ... a la Sublime Text.
GNU General Public License v3.0
518 stars 37 forks source link

flx: introduce flx-dir-face for directories #36

Closed artagnon closed 2 years ago

artagnon commented 11 years ago

So it's easy to distinguish between files and directories: it complements flx-highlight-face, and does not conflict with it.

Signed-off-by: Ramkumar Ramachandra artagnon@gmail.com

bbatsov commented 11 years ago

ido normally doesn't highlight directories and I'm not sure what difference would it make if flx-ido used a different face for them. Maybe you can submit here a screenshot illustrating the advantages of the suggested face?

artagnon commented 11 years ago

Um, it's just a port of the ido-subdir face.

artagnon commented 11 years ago

... and the screenshot:

2013-07-28-034658_955x39_scrot

lewang commented 11 years ago

@artagnon If ido-subdir already exists, can you amend your patch to use it (i.e. don't define a new face) conditionally based on ido-use-faces?

bbatsov commented 11 years ago

I think that ideally the flx face should always be appended to the Ido faces rendering the need to disable Ido's faces obsolete.

On Sunday, July 28, 2013, Le Wang wrote:

@artagnon https://github.com/artagnon If ido-subdir already exists, can you amend your patch to use it (i.e. don't define a new face) conditionally based on ido-use-faces?

— Reply to this email directly or view it on GitHubhttps://github.com/lewang/flx/pull/36#issuecomment-21677611 .

lewang commented 11 years ago

@bbatsov You mean like #22 ? I haven't had time to look into that yet. I'm not that familiar with Emacs faces.

bbatsov commented 11 years ago

Yep, exactly. Appending the face will automatically solve all problems related to the disabled Ido faces.

On Sunday, July 28, 2013, Le Wang wrote:

@bbatsov https://github.com/bbatsov You mean like #22https://github.com/lewang/flx/issues/22? I haven't had time to look into that yet. I'm not that familiar with Emacs faces.

— Reply to this email directly or view it on GitHubhttps://github.com/lewang/flx/pull/36#issuecomment-21677665 .

lewang commented 11 years ago

@artagnon I'm trying your branch ... flx-highlight-face supposed still work within directory items? It doesn't for me.

lewang commented 11 years ago

I see from the screenshot it does for you ... double checking.

artagnon commented 11 years ago

Double-check that it's not picking up a precompiled elc?

lewang commented 11 years ago

I just started from emacs -Q and manually eval'ed the files and still no good. I'm using 24.3.1 . I know this has changed in master recently, though.

lewang commented 11 years ago

ah, you've disabled ido faces. as per my instructions. I see.

artagnon commented 11 years ago

Yes, you have no choice but to disable ido faces, otherwise they'll override whatever faces you set in flx. I already wrote about it detail: https://github.com/lewang/flx/issues/22#issuecomment-21681521

bbatsov commented 11 years ago

Btw, one more thing that worries me about this patch - it's basically ido specific code in the ido independent portion of flx. Ido specific code should be restricted to flx-ido.el IMO, which is another argument in favor of overriding ido-complete as suggested by @artagnon.

lewang commented 11 years ago

@artagnon @bbatsov I've followed #22 and should have something along those lines soon.

lewang commented 11 years ago

I intended to advice ido-completions, with flet binding but put-text-property to something else, but since put-text-property is defined in C I ran into all kinds of trouble.