Re: ;;; anything.el --- open anything
Hi Tassilo, Tassilo Horn <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: >>> Hey, that's nice. I'll integrate it in anything-config.el, but I'll >>> modify it a bit to have the same interface as the action >>> transformers. > > Done! Yay! Looks nice! >> That would be nice - it would keep the action and candidate transform >> definitions consistent. > > Yep. > >> If you plan to add my code as an example transform, you probably >> should add "delete-dups" to it too: > > No, I didn't do that, but you can easily add `delete-duplicates' as a > transformer to `anything-candidate-transformers-file'. > > Not making it a default operation may save some processing costs for > users that don't need it. Yes, it's easy enough to do that now. BTW, I didn't know about the "rx" function before - that's quite handy! - Bill ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: install-elisp.el --- Simple Emacs Lisp installer using curl
On Thu, 26 Jul 2007 12:59:58 -0400 Richard Stallman <[EMAIL PROTECTED]> wrote: RS> Given that Emacs now has url-retrieve, I don't see any reason to make RS> provision for any other method. I am in full agreement. In fact I just found out why install-elisp.el wasn't working for me (that was why I had switched to wget): I had a .curlrc file that was causing problems by always requesting the headers; I had used it for debugging and forgot it was there. Using `url-retrieve' would have saved me some time, and of course it works better across all the platforms Emacs supports. So to all package authors: avoid external commands as much as possible :) Ted ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: ;;; anything.el --- open anything
[EMAIL PROTECTED] writes: Hi Bill, >> Hey, that's nice. I'll integrate it in anything-config.el, but I'll >> modify it a bit to have the same interface as the action >> transformers. Done! > That would be nice - it would keep the action and candidate transform > definitions consistent. Yep. > If you plan to add my code as an example transform, you probably > should add "delete-dups" to it too: No, I didn't do that, but you can easily add `delete-duplicates' as a transformer to `anything-candidate-transformers-file'. Not making it a default operation may save some processing costs for users that don't need it. Bye, Tassilo -- A morning without coffee is like something without something else. ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: ;;; anything.el --- open anything
On Jul 31, 5:36 pm, [EMAIL PROTECTED] wrote: > > I know that this has been brought up in the past and (setq history- > delete-duplicates t) is supposed to fix the problem; however, I still > get duplicates in the file history list. So, having the delete-dups in > the candidate transformer ensures that there's only 1 instance of a > file name displayed. Originally there was delete-dups in the default anything sources, but I removed it after a while, because for sources with large candidate sets it caused a noticable delay. For example, I have history-length set to 1000 and it was annoying I had to wait a second or so when anything was started while anything removed duplicates from the file-name-history. So this setting as a default might not appeal to most users, unless my large history setting is not common. /Tamas ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: ;;; anything.el --- open anything
On Jul 31, 6:41 am, Tassilo Horn <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > Hi Bill, > > > > > (setq anything-transform-files-excludes (list "/Applications/cache/" > > "/.backups" > > "/.svn" > > "/CVS" > > "/.DS_Store" > > "/.cvsignore")) > > > (defun anything-transform-files (files) > > "Transform file candidates." > > > (if anything-transform-files-excludes > > (setq files (let ((filtered-files nil)) > >(loop for file in files > > do (if (loop for regexp in > > anything-transform-files-excludes > > do (if (string-match regexp file) (return > > nil)) > > finally (return file)) > > (setq filtered-files (append (list file) > > filtered-files))) > > finally (return filtered-files) > > > (let ((boring-file-regexp > > (concat "\\(?:" (regexp-opt completion-ignored-extensions) "\ > > \)\\'"))) > > (mapcar (lambda (file) > > ;; Add shadow face property to boring files. > > (let ((face (if (facep 'file-name-shadow) > > 'file-name-shadow > > ;; fall back to default on XEmacs > > 'default))) > > (if (string-match boring-file-regexp file) > > (setq file (propertize file 'face face > > > ;; replace path of HOME directory in paths with the > > string > > ;; > > (let ((home (replace-regexp-in-string "" "/" ; > > stupid Windows... > > (getenv "HOME" > > (if (string-match home file) > > (cons (replace-match "" nil nil file) file) > > file))) > > files))) > > Hey, that's nice. I'll integrate it in anything-config.el, but I'll > modify it a bit to have the same interface as the action transformers. That would be nice - it would keep the action and candidate transform definitions consistent. If you plan to add my code as an example transform, you probably should add "delete-dups" to it too: (setq anything-transform-files-excludes (list "/Applications/cache/" "/\.backups" "/\.svn" "/CVS" "/\.DS_Store" "/\.cvsignore" ".*~$")) (defun anything-transform-files (files) "Transform file candidates." (if anything-transform-files-excludes (setq files (delete-dups (let ((filtered-files nil)) (loop for file in files do (if (loop for regexp in anything-transform-files- excludes do (if (string-match regexp file) (return nil)) finally (return file)) (setq filtered-files (append (list file) filtered-files))) finally (return filtered-files))) I know that this has been brought up in the past and (setq history- delete-duplicates t) is supposed to fix the problem; however, I still get duplicates in the file history list. So, having the delete-dups in the candidate transformer ensures that there's only 1 instance of a file name displayed. - Bill ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: ;;; anything.el --- open anything
On Jul 31, 1:14 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jul 31, 6:56 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Hi, > > > On Jul 31, 12:33 am, [EMAIL PROTECTED] wrote: > > > > However, another problem (in addition > > > to the ones you mentioned) with doing the exclusions in a candidate > > > transformer function is that the anything-candidate-number-limit has > > > already been checked prior to the transformer function being > > > called. > > > It's a bug. I'll see to it. > > Turned out it was pretty easy to fix. See the newest version on Emacs > Wiki. > > Let me know if it works properly and if it does then I'll address the > other problem too regarding incomplete lines. Yes, it's working fine for me now - thanks! BTW, I also like the new isearch functionality!! - Bill ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: ;;; anything.el --- open anything
[EMAIL PROTECTED] writes: Hi Bill, > (setq anything-transform-files-excludes (list "/Applications/cache/" > "/.backups" > "/.svn" > "/CVS" > "/.DS_Store" > "/.cvsignore")) > > (defun anything-transform-files (files) > "Transform file candidates." > > (if anything-transform-files-excludes > (setq files (let ((filtered-files nil)) > (loop for file in files > do (if (loop for regexp in > anything-transform-files-excludes > do (if (string-match regexp file) > (return nil)) > finally (return file)) >(setq filtered-files (append (list file) > filtered-files))) > finally (return filtered-files) > > (let ((boring-file-regexp > (concat "\\(?:" (regexp-opt completion-ignored-extensions) "\ > \)\\'"))) > (mapcar (lambda (file) > ;; Add shadow face property to boring files. > (let ((face (if (facep 'file-name-shadow) > 'file-name-shadow > ;; fall back to default on XEmacs > 'default))) > (if (string-match boring-file-regexp file) > (setq file (propertize file 'face face > > ;; replace path of HOME directory in paths with the > string > ;; > (let ((home (replace-regexp-in-string "" "/" ; > stupid Windows... > (getenv "HOME" > (if (string-match home file) > (cons (replace-match "" nil nil file) file) > file))) > files))) Hey, that's nice. I'll integrate it in anything-config.el, but I'll modify it a bit to have the same interface as the action transformers. Bye, Tassilo -- The movie "Delta Force" was extremely hard to make because Chuck had to downplay his abilities. The first few cuts were completely unbelievable. ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: ;;; anything.el --- open anything
On Jul 31, 6:56 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > On Jul 31, 12:33 am, [EMAIL PROTECTED] wrote: > > > However, another problem (in addition > > to the ones you mentioned) with doing the exclusions in a candidate > > transformer function is that the anything-candidate-number-limit has > > already been checked prior to the transformer function being > > called. > > It's a bug. I'll see to it. > Turned out it was pretty easy to fix. See the newest version on Emacs Wiki. Let me know if it works properly and if it does then I'll address the other problem too regarding incomplete lines. /Tamas ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources