• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/gnus/

Lines Matching +defs:directory +defs:predicate

47 (defcustom gnus-agent-directory (nnheader-concat gnus-directory "agent/")
50 :type 'directory)
151 "When non-nil, the agent will let the agent predicate decide
153 nil, the default, the agent will only let the predicate decide
185 \(gnus-agent-directory) for groups that are no longer agentized.
247 (defvar gnus-category-predicate-cache nil)
284 (setq gnus-category-predicate-cache nil
307 (defsubst gnus-agent-directory ()
308 "The name of the Gnus agent directory."
309 (nnheader-concat gnus-agent-directory
315 (file-name-as-directory
316 (expand-file-name "agent.lib" (gnus-agent-directory)))))
378 gnus-agent-cat-predicate agent-predicate)
435 (defsubst gnus-agent-cat-make (name &optional default-agent-predicate)
436 (list name `(agent-predicate . ,(or default-agent-predicate 'false))))
677 (unless (file-exists-p (nnheader-concat gnus-agent-directory "lib/servers"))
889 (old-path (directory-file-name
893 (new-path (directory-file-name
921 (path (directory-file-name
924 (gnus-delete-directory path)
982 (nnheader-concat gnus-agent-directory "lib/servers"))
1016 (gnus-make-directory (nnheader-concat gnus-agent-directory "lib"))
1019 (with-temp-file (nnheader-concat gnus-agent-directory "lib/servers")
1291 (gnus-make-directory (file-name-directory file))
1356 (gnus-make-directory (file-name-directory file))
1386 (gnus-make-directory (file-name-directory file))
1416 (file-directory-p (expand-file-name group (gnus-agent-directory))))
1425 ;; unplugged. The agent must, therefore, use the same directory
1431 (gnus-agent-directory))))
1540 (gnus-make-directory dir)
1755 (agent-predicate . gnus-agent-predicate)))))))
1762 ;; Do not fetch all headers if the predicate
1764 (not (gnus-predicate-implies-unread
1766 'agent-predicate)))))
1832 (gnus-make-directory (nnheader-translate-file-chars
1833 (file-name-directory file) t))
2074 (gnus-make-directory (gnus-agent-article-name "" group))
2168 "Save gnus-agent-article-local under it method's agent.lib directory."
2175 (gnus-make-directory (gnus-agent-lib-file ""))
2245 (file-name-as-directory
2322 category predicate info marks score-param
2368 (setq predicate
2369 (gnus-get-predicate
2370 (gnus-agent-find-parameter group 'agent-predicate)))
2372 ;; If the selection predicate requires scoring, score each header
2373 (unless (memq predicate '(gnus-agent-true gnus-agent-false))
2387 (unless (and (eq predicate 'gnus-agent-false)
2411 ;; predicate, add it to the download list
2432 (funcall predicate)))
2513 (defvar gnus-agent-predicate 'false
2514 "The selection predicate used when no other source is available.")
2556 "p" gnus-category-edit-predicate
2577 ["Edit predicate" gnus-category-edit-predicate t]
2602 (gnus-set-default-directory)
2657 (nnheader-insert-file-contents (nnheader-concat gnus-agent-directory "lib/categories"))
2679 '(agent-predicate agent-score-file agent-groups))))
2686 (setq gnus-category-predicate-cache nil
2688 (gnus-make-directory (nnheader-concat gnus-agent-directory "lib"))
2689 (with-temp-file (nnheader-concat gnus-agent-directory "lib/categories")
2694 (cdr (assoc 'agent-predicate c))
2702 (defun gnus-category-edit-predicate (category)
2703 "Edit the predicate for CATEGORY."
2707 (gnus-agent-cat-predicate info)
2708 (format "Editing the select predicate for category %s" category)
2709 `(lambda (predicate)
2711 ;; (setf (gnus-agent-cat-predicate (assq ',category gnus-category-alist))
2712 ;; predicate)
2715 'agent-predicate predicate)
2801 (defvar gnus-category-predicate-alist
2810 "Mapping from short score predicate symbols to predicate functions.")
2844 (defun gnus-category-make-function (predicate)
2846 (let ((func (gnus-category-make-function-1 predicate)))
2860 (defun gnus-category-make-function-1 (predicate)
2864 ((or (symbolp predicate)
2865 (functionp predicate))
2866 `(,(or (cdr (assq predicate gnus-category-predicate-alist))
2867 predicate)))
2868 ;; More complex predicate.
2869 ((consp predicate)
2871 ((memq (car predicate) '(& and))
2873 ((memq (car predicate) '(| or))
2875 ((memq (car predicate) gnus-category-not)
2877 ,@(mapcar 'gnus-category-make-function-1 (cdr predicate))))
2879 (error "Unknown predicate type: %s" predicate))))
2881 (defun gnus-get-predicate (predicate)
2883 (or (cdr (assoc predicate gnus-category-predicate-cache))
2884 (let ((func (gnus-category-make-function predicate)))
2885 (setq gnus-category-predicate-cache
2886 (nconc gnus-category-predicate-cache
2887 (list (cons predicate func))))
2890 (defun gnus-predicate-implies-unread (predicate)
2893 That is, if this predicate returns true, then indeed the predicate must
2896 (gnus-category-make-function-1 predicate))))
2899 "Recursively evaluate a predicate function to determine whether it can select
2931 nil) ; The read predicate NEVER returns unread articles
2933 t) ; The false predicate returns t as the empty set excludes all read articles
2935 nil) ; The true predicate ALWAYS returns read articles
2937 (let ((alist gnus-category-predicate-alist))
2944 (error "Unknown predicate function: %s" function)))))
3329 (gnus-make-directory dir)
3424 (gnus-sethash gnus-agent-directory t keep)
3428 (file-directory-p dir))
3431 (setq dir (file-name-directory (directory-file-name dir))))))
3438 "Given a directory, check it and its subdirectories for
3441 (let ((files (directory-files d))
3451 (let ((d (file-name-as-directory d))
3453 ;; Search ancestor's for last directory NOT
3456 (setq d (file-name-directory d)) keep))
3458 d (directory-file-name d)))
3465 ((file-directory-p (setq file (nnheader-concat d file)))
3467 (funcall checker (expand-file-name gnus-agent-directory))
3483 (if (file-directory-p f-or-d)
3485 (delete-directory f-or-d)
3492 (directory-files f-or-d))
3493 (delete-directory f-or-d)))
3576 (gnus-make-directory (nnheader-translate-file-chars
3577 (file-name-directory file) t))
3756 (dir (file-name-directory file))
3760 (and (not (file-directory-p (nnheader-concat dir name)))
3762 (directory-files dir nil "^[0-9]+$" t)))
3764 (progn (gnus-make-directory dir) nil)))