tag:blogger.com,1999:blog-5304409.post1453855607525694750..comments2024-03-17T16:17:20.145-07:00Comments on Amit's Thoughts: Emacs: Helm for finding filesAmithttp://www.blogger.com/profile/12159325271882018300noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-5304409.post-46070868858672577712016-11-27T15:43:30.872-08:002016-11-27T15:43:30.872-08:00Thanks. I do also this
grep_query="$grep_quer...Thanks. I do also this<br />grep_query="$grep_query | grep -i '$bit'"<br />It will be faster to type when theres no case sensitive grep<br />Kari Argillanderhttps://www.blogger.com/profile/05032367622815399350noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-33062468821094300132016-06-12T16:24:50.196-07:002016-06-12T16:24:50.196-07:00Thanks exuberance! That looks useful.Thanks exuberance! That looks useful.Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-13744801044516052482016-06-11T19:11:35.172-07:002016-06-11T19:11:35.172-07:00Thanks for the posting.
Here's a varation on ...Thanks for the posting.<br /><br />Here's a varation on your script that let's one search for N terms in the complete path. It still requires that the first term appear in the basename of the file.<br /><br /><br />mdfind_query="kMDItemFSName==\"*$1*\"cd"<br />shift<br />grep_query='cat'<br />for bit in "$@" ; do<br /> grep_query="$grep_query | grep '$bit'"<br />done<br />echo $grep_query >> /tmp/foo1<br />mdfind -onlyin $HOME "$mdfind_query" \<br /> | eval "$grep_query" \<br /> | grep -v "$HOME/Library/" \<br /> | grep -v "$HOME/Pictures/" \<br /> | grep -v "$HOME/Music/" \<br /> | sed -e "s|^$HOME|~|"<br />exuberancehttps://www.blogger.com/profile/02180872922559635562noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-62649430530780189742014-03-06T12:24:06.501-08:002014-03-06T12:24:06.501-08:00Hi PuercoPop, I use the bash script because I want...Hi PuercoPop, I use the bash script because I want to modify the results of mdfind. You can see in my script, I filter out certain folders.Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-77336962625191401252014-03-06T12:17:55.271-08:002014-03-06T12:17:55.271-08:00You don't need the bash script at all you can ...You don't need the bash script at all you can configure Emacs to use mfind (spotlight) as its locate command:<br />(setq locate-command "mdfind")<br /><br />You can read more at http://emacsredux.com/blog/2013/07/05/locate/PuercoPophttps://www.blogger.com/profile/07379528198607819536noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-21368064970689668952013-03-16T15:53:25.006-07:002013-03-16T15:53:25.006-07:00n: good question; I don't remember! I was prob...n: good question; I don't remember! I was probably browsing some Mac helpful hints site when I found it. I also occasionally look in /usr/bin to see what's there that I'm not familiar with.Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-69042864439299043602013-03-16T14:43:24.078-07:002013-03-16T14:43:24.078-07:00How did you know about mdfind? Is there anywhere I...How did you know about mdfind? Is there anywhere I can learn about these mac specific unix commands?nhttps://www.blogger.com/profile/17129801584581480941noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-59367434460304645852013-02-08T13:53:46.760-08:002013-02-08T13:53:46.760-08:00Hi gogleyedboggle,
You can put the bash script an...Hi gogleyedboggle,<br /><br />You can put the bash script anywhere but you need to set <i>helm-c-locate-command</i> to point to it.Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-19030924463055610492013-02-08T07:12:12.213-08:002013-02-08T07:12:12.213-08:00Dont understand how you integrate your bash script...Dont understand how you integrate your bash script with helm - where doyou put the bash script and how do you refer to it ?gogleyedbogglehttps://www.blogger.com/profile/13728025921478323618noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-14255673313034091352013-02-01T23:16:24.128-08:002013-02-01T23:16:24.128-08:00I've been using ido for a long time but I'...I've been using ido for a long time but I'll give this a shotJeremy Onghttps://www.blogger.com/profile/06478936258544670170noreply@blogger.comtag:blogger.com,1999:blog-5304409.post-1003501715915558932012-10-29T14:28:17.223-07:002012-10-29T14:28:17.223-07:00thanks for the recommendation! helm definitely loo...thanks for the recommendation! helm definitely looks like a worthy successor to ido, anything, and others. i'm now using it for finding files/switching buffers, like you, and for minibuffer history isearch. my only tweak beyond your settings was to add <i>helm-c-source-find-files</i> to <i>helm-for-files-preferred-list</i> so i could type (partial) paths occasionally, since the locate source doesn't seem to handle those well.<br /><br />looking forward to diving in more!Anonymousnoreply@blogger.com