emacs/lisp/obsolete/xesam.el

913 lines
33 KiB
EmacsLisp
Raw Normal View History

2008-07-24 21:45:01 +00:00
;;; xesam.el --- Xesam interface to search engines.
;; Copyright (C) 2008-2019 Free Software Foundation, Inc.
2008-07-24 21:45:01 +00:00
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: tools, hypermedia
2013-05-24 12:35:56 +02:00
;; Obsolete-since: 24.4
2008-07-24 21:45:01 +00:00
;; This file is part of GNU Emacs.
2008-08-10 00:32:57 +00:00
;; GNU Emacs is free software: you can redistribute it and/or modify
2008-07-24 21:45:01 +00:00
;; it under the terms of the GNU General Public License as published by
2008-08-10 00:32:57 +00:00
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
2008-07-24 21:45:01 +00:00
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
2008-07-24 21:45:01 +00:00
;;; Commentary:
2013-05-24 12:35:56 +02:00
;; This file is obsolete.
;; This package provides an interface to Xesam, a D-Bus based "eXtEnsible
2008-07-24 21:45:01 +00:00
;; Search And Metadata specification". It has been tested with
;;
;; xesam-glib 0.3.4, xesam-tools 0.6.1
;; beagle 0.3.7, beagle-xesam 0.2
;; strigi 0.5.11
2008-07-24 21:45:01 +00:00
;; The precondition for this package is a D-Bus aware Emacs. This is
;; configured per default, when Emacs is built on a machine running
;; D-Bus. Furthermore, there must be at least one search engine
;; running, which supports the Xesam interface. Beagle and strigi have
2008-07-24 21:45:01 +00:00
;; been tested; tracker, pinot and recoll are also said to support
;; Xesam. You can check the existence of such a search engine by
;;
;; (dbus-list-queued-owners :session "org.freedesktop.xesam.searcher")
;; In order to start a search, you must load xesam.el:
;;
;; (require 'xesam)
;; xesam.el supports two types of queries, which are explained *very* short:
;;
;; * Full text queries. Just search keys shall be given, like
;;
;; hello world
;;
;; A full text query in xesam.el is restricted to files.
;;
;; * Xesam End User Search Language queries. The Xesam query language
;; is described at <http://xesam.org/main/XesamUserSearchLanguage>,
;; which must be consulted for the whole features.
;;
;; A query string consists of search keys, collectors, selectors,
;; and phrases. Search keys are words like in a full text query:
;;
;; hello word
;;
;; A selector is a tuple <keyword><relation>. <keyword> can be any
;; predefined Xesam keyword, the most common keywords are "ext"
;; (file name extension), "format " (mime type), "tag" (user
;; keywords) and "type" (types of items, like "audio", "file",
;; "picture", "attachment"). <relation> is a comparison to a value,
;; which must be a string (relation ":" or "=") or number (relation
;; "<=", ">=", "<", ">"):
;;
;; type:attachment ext=el
;;
;; A collector is one of the items "AND", "and", "&&", "OR", "or",
;; "||", or "-". The default collector on multiple terms is "AND";
;; "-" means "AND NOT".
;;
;; albinus -type:file
;;
;; A phrase is a string enclosed in quotes, with appended modifiers
;; (single letters). Examples of modifiers are "c" (case
;; sensitive), "C" (case insensitive), "e" (exact match), "r"
;; (regular expression):
;;
;; "Hello world"c
;; You can customize, whether you want to apply a Xesam user query, or
;; a full text query. Note, that not every search engine supports
;; both query types.
;;
;; (setq xesam-query-type 'fulltext-query)
;;
2011-11-19 18:29:42 -08:00
;; Another option to be customized is the number of hits to be
2008-07-24 21:45:01 +00:00
;; presented at once.
;;
;; (setq xesam-hits-per-page 50)
;; A search can be started by the command
;;
;; M-x xesam-search
;;
;; When several search engines are registered, the engine to be used
;; can be selected via minibuffer completion. Afterwards, the query
;; shall be entered in the minibuffer.
;; Search results are presented in a new buffer. This buffer has the
;; major mode `xesam-mode', with the following keybindings:
;; SPC `scroll-up'
;; DEL `scroll-down'
;; < `beginning-of-buffer'
;; > `end-of-buffer'
;; q `quit-window'
;; z `kill-this-buffer'
;; g `revert-buffer'
;; The search results are represented by widgets. Navigation commands
;; are the usual widget navigation commands:
;; TAB `widget-forward'
;; <backtab> `widget-backward'
;; Applying RET, <down-mouse-1>, or <down-mouse-2> on a URL belonging
;; to the widget, brings up more details of the search hit. The way,
;; how this hit is presented, depends on the type of the hit. HTML
;; files are opened via `browse-url'. Local files are opened in a new
;; buffer, with highlighted search hits (highlighting can be toggled
;; by `xesam-minor-mode' in that buffer).
2008-07-24 21:45:01 +00:00
;;; Code:
(require 'dbus)
;; Widgets are used to highlight the search results.
(require 'widget)
(require 'wid-edit)
2008-07-24 21:45:01 +00:00
;; `run-at-time' is used in the signal handler.
(require 'timer)
;; The default search field is "xesam:url". It must be inspected.
(require 'url)
(defgroup xesam nil
"Xesam compatible interface to search engines."
:group 'extensions
:group 'comm
2008-07-24 21:45:01 +00:00
:version "23.1")
(defcustom xesam-query-type 'user-query
"Xesam query language type."
:group 'xesam
:type '(choice
(const :tag "Xesam user query" user-query)
(const :tag "Xesam fulltext query" fulltext-query)))
(defcustom xesam-hits-per-page 20
"Number of search hits to be displayed in the result buffer."
2008-07-24 21:45:01 +00:00
:group 'xesam
:type 'integer)
(defface xesam-mode-line '((t :inherit mode-line-emphasis))
"Face to highlight mode line."
:group 'xesam)
(defface xesam-highlight '((t :inherit match))
"Face to highlight query entries.
2011-12-11 21:32:49 -08:00
It will be overlaid by `widget-documentation-face', so it shall
be different at least in one face property not set in that face."
:group 'xesam)
2008-07-24 21:45:01 +00:00
(defvar xesam-debug nil
"Insert debug information in the help echo.")
2008-07-24 21:45:01 +00:00
(defconst xesam-service-search "org.freedesktop.xesam.searcher"
"The D-Bus name used to talk to Xesam.")
(defconst xesam-path-search "/org/freedesktop/xesam/searcher/main"
"The D-Bus object path used to talk to Xesam.")
;; Methods: "NewSession", "SetProperty", "GetProperty",
;; "CloseSession", "NewSearch", "StartSearch", "GetHitCount",
;; "GetHits", "GetHitData", "CloseSearch" and "GetState".
;; Signals: "HitsAdded", "HitsRemoved", "HitsModified", "SearchDone"
;; and "StateChanged".
(defconst xesam-interface-search "org.freedesktop.xesam.Search"
"The D-Bus Xesam search interface.")
(defconst xesam-all-fields
'("xesam:35mmEquivalent" "xesam:aimContactMedium" "xesam:aperture"
"xesam:aspectRatio" "xesam:attachmentEncoding" "xesam:attendee"
2011-11-22 23:03:56 -08:00
"xesam:audioBitrate" "xesam:audioChannels" "xesam:audioCodec"
"xesam:audioCodecType" "xesam:audioSampleFormat" "xesam:audioSampleRate"
"xesam:author" "xesam:bcc" "xesam:birthDate" "xesam:blogContactURL"
2008-07-24 21:45:01 +00:00
"xesam:cameraManufacturer" "xesam:cameraModel" "xesam:cc" "xesam:ccdWidth"
"xesam:cellPhoneNumber" "xesam:characterCount" "xesam:charset"
"xesam:colorCount" "xesam:colorSpace" "xesam:columnCount" "xesam:comment"
"xesam:commentCharacterCount" "xesam:conflicts" "xesam:contactMedium"
"xesam:contactName" "xesam:contactNick" "xesam:contactPhoto"
"xesam:contactURL" "xesam:contains" "xesam:contentKeyword"
2008-07-24 21:45:01 +00:00
"xesam:contentComment" "xesam:contentCreated" "xesam:contentModified"
"xesam:contentType" "xesam:contributor" "xesam:copyright" "xesam:creator"
"xesam:definesClass" "xesam:definesFunction" "xesam:definesGlobalVariable"
"xesam:deletionTime" "xesam:depends" "xesam:description" "xesam:device"
"xesam:disclaimer" "xesam:documentCategory" "xesam:duration"
"xesam:emailAddress" "xesam:eventEnd" "xesam:eventLocation"
"xesam:eventStart" "xesam:exposureBias" "xesam:exposureProgram"
"xesam:exposureTime" "xesam:faxPhoneNumber" "xesam:fileExtension"
"xesam:fileSystemType" "xesam:flashUsed" "xesam:focalLength"
"xesam:focusDistance" "xesam:formatSubtype" "xesam:frameCount"
"xesam:frameRate" "xesam:freeSpace" "xesam:gender" "xesam:generator"
"xesam:generatorOptions" "xesam:group" "xesam:hash" "xesam:hash"
"xesam:height" "xesam:homeEmailAddress" "xesam:homePhoneNumber"
"xesam:homePostalAddress" "xesam:homepageContactURL"
"xesam:horizontalResolution" "xesam:icqContactMedium" "xesam:id"
"xesam:imContactMedium" "xesam:interests" "xesam:interlaceMode"
"xesam:isEncrypted" "xesam:isImportant" "xesam:isInProgress"
"xesam:isPasswordProtected" "xesam:isRead" "xesam:isoEquivalent"
"xesam:jabberContactMedium" "xesam:keyword" "xesam:language" "xesam:legal"
"xesam:license" "xesam:licenseType" "xesam:lineCount" "xesam:links"
"xesam:mailingPostalAddress" "xesam:maintainer" "xesam:md5Hash"
"xesam:mediaCodec" "xesam:mediaCodecBitrate" "xesam:mediaCodecType"
"xesam:meteringMode" "xesam:mimeType" "xesam:mountPoint"
"xesam:msnContactMedium" "xesam:name" "xesam:occupiedSpace"
"xesam:orientation" "xesam:originalLocation" "xesam:owner"
"xesam:pageCount" "xesam:permissions" "xesam:phoneNumber"
"xesam:physicalAddress" "xesam:pixelFormat" "xesam:primaryRecipient"
"xesam:programmingLanguage" "xesam:rating" "xesam:receptionTime"
"xesam:recipient" "xesam:related" "xesam:remoteUser" "xesam:rowCount"
"xesam:sampleBitDepth" "xesam:sampleFormat" "xesam:secondaryRecipient"
"xesam:sha1Hash" "xesam:size" "xesam:skypeContactMedium"
"xesam:sourceCreated" "xesam:sourceModified" "xesam:storageSize"
"xesam:subject" "xesam:supercedes" "xesam:title" "xesam:to"
"xesam:totalSpace" "xesam:totalUncompressedSize" "xesam:url"
"xesam:usageIntensity" "xesam:userComment" "xesam:userKeyword"
2011-11-22 23:03:56 -08:00
"xesam:uuid" "xesam:version" "xesam:verticalResolution"
"xesam:videoBitrate"
2008-07-24 21:45:01 +00:00
"xesam:videoCodec" "xesam:videoCodecType" "xesam:whiteBalance"
"xesam:width" "xesam:wordCount" "xesam:workEmailAddress"
"xesam:workPhoneNumber" "xesam:workPostalAddress"
"xesam:yahooContactMedium")
"All fields from the Xesam Core Ontology.
This defconst can be used to check for a new search engine, which
fields are supported.")
(defconst xesam-user-query
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<request xmlns=\"http://freedesktop.org/standards/xesam/1.0/query\">
<userQuery>
%s
</userQuery>
</request>"
"The Xesam user query XML.")
(defconst xesam-fulltext-query
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<request xmlns=\"http://freedesktop.org/standards/xesam/1.0/query\">
<query content=\"xesam:Document\" source=\"xesam:File\">
<fullText>
<string>%s</string>
</fullText>
</query>
</request>"
"The Xesam fulltext query XML.")
(declare-function dbus-get-unique-name "dbusbind.c" (bus))
(defvar xesam-dbus-unique-names
(ignore-errors
(list (cons :system (dbus-get-unique-name :system))
(cons :session (dbus-get-unique-name :session))))
"The unique names, under which Emacs is registered at D-Bus.")
(defun xesam-dbus-call-method (&rest args)
"Apply a D-Bus method call.
2011-12-05 00:55:25 -08:00
`dbus-call-method' is preferred, because it performs better.
If the target D-Bus service is owned by Emacs, this
is not applicable, and `dbus-call-method-non-blocking' must be
used instead. ARGS are identical to the argument list of both
functions."
(apply
;; The first argument is the bus, the second argument the targt service.
(if (string-equal (cdr (assoc (car args) xesam-dbus-unique-names))
(cadr args))
'dbus-call-method-non-blocking 'dbus-call-method)
args))
2008-07-24 21:45:01 +00:00
(defun xesam-get-property (engine property)
"Return the PROPERTY value of ENGINE."
;; "GetProperty" returns a variant, so we must use the car.
(car (xesam-dbus-call-method
2008-07-24 21:45:01 +00:00
:session (car engine) xesam-path-search
xesam-interface-search "GetProperty"
(xesam-get-cached-property engine "session") property)))
2008-07-24 21:45:01 +00:00
(defun xesam-set-property (engine property value)
"Set the PROPERTY of ENGINE to VALUE.
VALUE can be a string, a non-negative integer, a boolean
value (nil or t), or a list of them. It returns the new value of
PROPERTY in the search engine. This new value can be different
from VALUE, depending on what the search engine accepts."
;; "SetProperty" returns a variant, so we must use the car.
(car (xesam-dbus-call-method
2008-07-24 21:45:01 +00:00
:session (car engine) xesam-path-search
xesam-interface-search "SetProperty"
(xesam-get-cached-property engine "session") property
2008-07-24 21:45:01 +00:00
;; The value must be a variant. It can be only a string, an
;; unsigned int, a boolean, or an array of them. So we need
;; no type keyword; we let the type check to the search
;; engine.
(list :variant value))))
(defvar xesam-minibuffer-vendor-history nil
"Interactive vendor history.")
(defvar xesam-minibuffer-query-history nil
"Interactive query history.")
;; Pacify byte compiler.
(defvar xesam-vendor nil)
(make-variable-buffer-local 'xesam-vendor)
(put 'xesam-vendor 'permanent-local t)
2008-07-24 21:45:01 +00:00
(defvar xesam-engine nil)
(defvar xesam-search nil)
(defvar xesam-type nil)
(defvar xesam-query nil)
(defvar xesam-xml-string nil)
(defvar xesam-objects nil)
2008-07-24 21:45:01 +00:00
(defvar xesam-current nil)
(defvar xesam-count nil)
(defvar xesam-to nil)
(defvar xesam-notify-function nil)
2008-07-24 21:45:01 +00:00
(defvar xesam-refreshing nil)
;;; Search engines.
(defvar xesam-search-engines nil
"List of available Xesam search engines.
Every entry is an association list, with a car denoting the
unique D-Bus service name of the engine. The rest of the entry
are cached associations of engine attributes, like the session
identifier, and the display name. Example:
\(\(\":1.59\"
\(\"session\" . \"0t1214948020ut358230u0p2698r3912347765k3213849828\")
\(\"vendor.display\" . \"Tracker Xesam Service\"))
\(\":1.27\"
\(\"session\" . \"strigisession1369133069\")
\(\"vendor.display\" . \"Strigi Desktop Search\")))
2008-07-24 21:45:01 +00:00
A Xesam-compatible search engine is identified as a queued D-Bus
service of the known service `xesam-service-search'.")
(defun xesam-get-cached-property (engine property)
"Return the PROPERTY value of ENGINE from the cache.
If PROPERTY is not existing, retrieve it from ENGINE first."
;; If the property has not been cached yet, we retrieve it from the
;; engine, and cache it.
(unless (assoc property engine)
(xesam-set-cached-property
engine property (xesam-get-property engine property)))
(cdr (assoc property engine)))
(defun xesam-set-cached-property (engine property value)
"Set the PROPERTY of ENGINE to VALUE in the cache."
(setcdr engine (append (cdr engine) (list (cons property value)))))
2008-07-24 21:45:01 +00:00
(defun xesam-delete-search-engine (&rest args)
"Remove service from `xesam-search-engines'."
(setq xesam-search-engines
(delete (assoc (car args) xesam-search-engines) xesam-search-engines)))
2008-07-24 21:45:01 +00:00
(defvar dbus-debug)
2008-07-24 21:45:01 +00:00
(defun xesam-search-engines ()
"Return Xesam search engines, stored in `xesam-search-engines'.
The first search engine is the name owner of `xesam-service-search'.
If there is no registered search engine at all, the function returns nil."
2008-07-24 21:45:01 +00:00
(let ((services (dbus-ignore-errors
(dbus-list-queued-owners
:session xesam-service-search)))
engine vendor-id hit-fields)
(dolist (service services)
(unless (assoc-string service xesam-search-engines)
;; Open a new session, and add it to the search engines list.
(add-to-list 'xesam-search-engines (list service) 'append)
(setq engine (assoc service xesam-search-engines))
;; Add the session string.
(xesam-set-cached-property
engine "session"
(xesam-dbus-call-method
:session service xesam-path-search
xesam-interface-search "NewSession"))
;; Unset the "search.live" property; we don't want to be
;; informed by changed results.
(xesam-set-property engine "search.live" nil)
2008-07-24 21:45:01 +00:00
;; Check the vendor properties.
(setq vendor-id (xesam-get-property engine "vendor.id")
hit-fields (xesam-get-property engine "hit.fields"))
2011-11-14 12:23:26 -08:00
;; Usually, `hit.fields' shall describe supported fields.
2008-07-24 21:45:01 +00:00
;; That is not the case now, so we set it ourselves.
;; Hopefully, this will change later.
(setq hit-fields
More CL cleanups and reduction of use of cl.el. * woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el: * vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el: * textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el: * strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el: * progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el: * play/tetris.el, play/snake.el, play/pong.el, play/landmark.el: * play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el: * net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el: * image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el: * eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el: * eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el: * eshell/em-cmpl.el, eshell/em-banner.el: * url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el: * url/url-future.el, url/url-dav.el, url/url-cookie.el: * calendar/parse-time.el, test/eshell.el: Use cl-lib. * wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el: * vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el: * textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el: * term/ns-win.el, term.el, shell.el, ps-samp.el: * progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el: * progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el: * play/gamegrid.el, play/bubbles.el, novice.el, notifications.el: * net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el: * net/ldap.el, net/eudc.el, net/browse-url.el, man.el: * mail/mailheader.el, mail/feedmail.el: * url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el: * url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el: Dont use CL. * ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time. * eshell/esh-opt.el (eshell-eval-using-options): Quote code with `lambda' rather than with `quote'. (eshell-do-opt): Adjust accordingly. (eshell-process-option): Simplify. * eshell/esh-var.el: * eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options. * emacs-pcase.el (pcase--dontcare-upats, pcase--let*) (pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern to `pcase--dontcare'. * emacs-cl.el (labels): Mark obsolete. (cl--letf, letf): Move to cl-lib. (cl--letf*, letf*): Remove. * emacs-cl-lib.el (cl-nth-value): Use defalias. * emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule. (cl-progv): Rewrite. (cl--letf, cl-letf): Move from cl.el. (cl-letf*): New macro. * emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 19:13:41 -04:00
(pcase (intern vendor-id)
Replace insignificant backquotes Replace most insignificant occurrences of '`' with a straight quote, sharp quote or nothing. This includes backquotes in 'pcase' patterns. * admin/admin.el: * lisp/apropos.el: * lisp/arc-mode.el: * lisp/auth-source.el: * lisp/avoid.el: * lisp/bindings.el: * lisp/bs.el: * lisp/calculator.el: * lisp/calendar/todo-mode.el: * lisp/cedet/semantic.el: * lisp/cedet/semantic/analyze/debug.el: * lisp/cedet/semantic/bovine.el: * lisp/cedet/semantic/dep.el: * lisp/cedet/semantic/grammar.el: * lisp/cedet/semantic/wisent/comp.el: * lisp/cedet/semantic/wisent/grammar.el: * lisp/cedet/srecode/mode.el: * lisp/cus-edit.el: * lisp/doc-view.el: * lisp/elec-pair.el: * lisp/electric.el: * lisp/emacs-lisp/autoload.el: * lisp/emacs-lisp/benchmark.el: * lisp/emacs-lisp/byte-opt.el: * lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/cconv.el: * lisp/emacs-lisp/cl-extra.el: * lisp/emacs-lisp/cl-generic.el: * lisp/emacs-lisp/cl-macs.el: * lisp/emacs-lisp/copyright.el: * lisp/emacs-lisp/debug.el: * lisp/emacs-lisp/eieio-compat.el: * lisp/emacs-lisp/ert.el: * lisp/emacs-lisp/generator.el: * lisp/emacs-lisp/inline.el: * lisp/emacs-lisp/macroexp.el: * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/package-x.el: * lisp/emacs-lisp/package.el: * lisp/emacs-lisp/radix-tree.el: * lisp/emacs-lisp/smie.el: * lisp/epa.el: * lisp/erc/erc-dcc.el: * lisp/erc/erc-track.el: * lisp/erc/erc.el: * lisp/eshell/em-ls.el: * lisp/eshell/esh-cmd.el: * lisp/files.el: * lisp/filesets.el: * lisp/font-lock.el: * lisp/frameset.el: * lisp/gnus/gnus-agent.el: * lisp/gnus/gnus-art.el: * lisp/gnus/gnus-cite.el: * lisp/gnus/gnus-group.el: * lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-srvr.el: * lisp/gnus/gnus-sum.el: * lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el: * lisp/gnus/gnus.el: * lisp/gnus/message.el: * lisp/gnus/mm-util.el: * lisp/gnus/mml.el: * lisp/gnus/nnheader.el: * lisp/gnus/nnimap.el: * lisp/gnus/nnmairix.el: * lisp/gnus/spam.el: * lisp/hexl.el: * lisp/hi-lock.el: * lisp/ibuf-ext.el: * lisp/ibuffer.el: * lisp/ido.el: * lisp/info.el: * lisp/international/mule-cmds.el: * lisp/international/mule-util.el: * lisp/json.el: * lisp/jsonrpc.el: * lisp/language/cyrillic.el: * lisp/language/european.el: * lisp/language/georgian.el: * lisp/language/tibetan.el: * lisp/language/utf-8-lang.el: * lisp/language/vietnamese.el: * lisp/ldefs-boot.el: * lisp/mail/mail-extr.el: * lisp/man.el: * lisp/menu-bar.el: * lisp/mh-e/mh-acros.el: * lisp/mh-e/mh-folder.el: * lisp/mh-e/mh-mime.el: * lisp/mh-e/mh-show.el: * lisp/mh-e/mh-speed.el: * lisp/minibuffer.el: * lisp/mpc.el: * lisp/net/ange-ftp.el: * lisp/net/hmac-def.el: * lisp/net/newst-backend.el: * lisp/net/quickurl.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-compat.el: * lisp/notifications.el: * lisp/obsolete/pgg-parse.el: * lisp/obsolete/vc-arch.el: * lisp/obsolete/xesam.el: * lisp/org/ob-C.el: * lisp/org/ob-core.el: * lisp/org/ob-exp.el: * lisp/org/ob-groovy.el: * lisp/org/ob-haskell.el: * lisp/org/ob-io.el: * lisp/org/ob-lisp.el: * lisp/org/ob-lob.el: * lisp/org/ob-lua.el: * lisp/org/ob-octave.el: * lisp/org/ob-perl.el: * lisp/org/ob-python.el: * lisp/org/ob-ref.el: * lisp/org/ob-ruby.el: * lisp/org/ob-sql.el: * lisp/org/org-agenda.el: * lisp/org/org-capture.el: * lisp/org/org-clock.el: * lisp/org/org-colview.el: * lisp/org/org-duration.el: * lisp/org/org-element.el: * lisp/org/org-entities.el: * lisp/org/org-gnus.el: * lisp/org/org-indent.el: * lisp/org/org-info.el: * lisp/org/org-inlinetask.el: * lisp/org/org-lint.el: * lisp/org/org-list.el: * lisp/org/org-mouse.el: * lisp/org/org-plot.el: * lisp/org/org-src.el: * lisp/org/org-table.el: * lisp/org/org.el: * lisp/org/ox-ascii.el: * lisp/org/ox-html.el: * lisp/org/ox-latex.el: * lisp/org/ox-man.el: * lisp/org/ox-md.el: * lisp/org/ox-org.el: * lisp/org/ox-publish.el: * lisp/org/ox-texinfo.el: * lisp/org/ox.el: * lisp/play/bubbles.el: * lisp/play/gamegrid.el: * lisp/progmodes/autoconf.el: * lisp/progmodes/cc-defs.el: * lisp/progmodes/cc-engine.el: * lisp/progmodes/cc-fonts.el: * lisp/progmodes/cc-langs.el: * lisp/progmodes/cperl-mode.el: * lisp/progmodes/ebrowse.el: * lisp/progmodes/elisp-mode.el: * lisp/progmodes/flymake-cc.el: * lisp/progmodes/flymake.el: * lisp/progmodes/fortran.el: * lisp/progmodes/grep.el: * lisp/progmodes/gud.el: * lisp/progmodes/idlwave.el: * lisp/progmodes/js.el: * lisp/progmodes/m4-mode.el: * lisp/progmodes/make-mode.el: * lisp/progmodes/mixal-mode.el: * lisp/progmodes/modula2.el: * lisp/progmodes/octave.el: * lisp/progmodes/opascal.el: * lisp/progmodes/prolog.el: * lisp/progmodes/ps-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/sql.el: * lisp/progmodes/verilog-mode.el: * lisp/ps-mule.el: * lisp/rtree.el: * lisp/ruler-mode.el: * lisp/ses.el: * lisp/simple.el: * lisp/startup.el: * lisp/subr.el: * lisp/term/ns-win.el: * lisp/textmodes/bibtex.el: * lisp/textmodes/conf-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/refill.el: * lisp/textmodes/sgml-mode.el: * lisp/textmodes/tex-mode.el: * lisp/tutorial.el: * lisp/url/url-dav.el: * lisp/url/url-gw.el: * lisp/url/url-http.el: * lisp/url/url-methods.el: * lisp/url/url-privacy.el: * lisp/vc/cvs-status.el: * lisp/vc/diff-mode.el: * lisp/vc/ediff-init.el: * lisp/vc/ediff-ptch.el: * lisp/vc/log-edit.el: * lisp/vc/log-view.el: * lisp/vc/pcvs-info.el: * lisp/vc/pcvs.el: * lisp/vc/smerge-mode.el: * lisp/vc/vc-git.el: * lisp/vc/vc-hg.el: * lisp/vc/vc-mtn.el: * lisp/vc/vc-rcs.el: * lisp/whitespace.el: * lisp/window.el: * test/lisp/electric-tests.el: * test/lisp/emacs-lisp/cl-lib-tests.el: * test/lisp/emacs-lisp/ert-tests.el: * test/lisp/epg-tests.el: * test/lisp/jsonrpc-tests.el: * test/src/data-tests.el: * test/src/json-tests.el: Replace most insignificant backquotes.
2018-11-05 01:22:15 +01:00
('Beagle
'("xesam:mimeType" "xesam:url"))
Replace insignificant backquotes Replace most insignificant occurrences of '`' with a straight quote, sharp quote or nothing. This includes backquotes in 'pcase' patterns. * admin/admin.el: * lisp/apropos.el: * lisp/arc-mode.el: * lisp/auth-source.el: * lisp/avoid.el: * lisp/bindings.el: * lisp/bs.el: * lisp/calculator.el: * lisp/calendar/todo-mode.el: * lisp/cedet/semantic.el: * lisp/cedet/semantic/analyze/debug.el: * lisp/cedet/semantic/bovine.el: * lisp/cedet/semantic/dep.el: * lisp/cedet/semantic/grammar.el: * lisp/cedet/semantic/wisent/comp.el: * lisp/cedet/semantic/wisent/grammar.el: * lisp/cedet/srecode/mode.el: * lisp/cus-edit.el: * lisp/doc-view.el: * lisp/elec-pair.el: * lisp/electric.el: * lisp/emacs-lisp/autoload.el: * lisp/emacs-lisp/benchmark.el: * lisp/emacs-lisp/byte-opt.el: * lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/cconv.el: * lisp/emacs-lisp/cl-extra.el: * lisp/emacs-lisp/cl-generic.el: * lisp/emacs-lisp/cl-macs.el: * lisp/emacs-lisp/copyright.el: * lisp/emacs-lisp/debug.el: * lisp/emacs-lisp/eieio-compat.el: * lisp/emacs-lisp/ert.el: * lisp/emacs-lisp/generator.el: * lisp/emacs-lisp/inline.el: * lisp/emacs-lisp/macroexp.el: * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/package-x.el: * lisp/emacs-lisp/package.el: * lisp/emacs-lisp/radix-tree.el: * lisp/emacs-lisp/smie.el: * lisp/epa.el: * lisp/erc/erc-dcc.el: * lisp/erc/erc-track.el: * lisp/erc/erc.el: * lisp/eshell/em-ls.el: * lisp/eshell/esh-cmd.el: * lisp/files.el: * lisp/filesets.el: * lisp/font-lock.el: * lisp/frameset.el: * lisp/gnus/gnus-agent.el: * lisp/gnus/gnus-art.el: * lisp/gnus/gnus-cite.el: * lisp/gnus/gnus-group.el: * lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-srvr.el: * lisp/gnus/gnus-sum.el: * lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el: * lisp/gnus/gnus.el: * lisp/gnus/message.el: * lisp/gnus/mm-util.el: * lisp/gnus/mml.el: * lisp/gnus/nnheader.el: * lisp/gnus/nnimap.el: * lisp/gnus/nnmairix.el: * lisp/gnus/spam.el: * lisp/hexl.el: * lisp/hi-lock.el: * lisp/ibuf-ext.el: * lisp/ibuffer.el: * lisp/ido.el: * lisp/info.el: * lisp/international/mule-cmds.el: * lisp/international/mule-util.el: * lisp/json.el: * lisp/jsonrpc.el: * lisp/language/cyrillic.el: * lisp/language/european.el: * lisp/language/georgian.el: * lisp/language/tibetan.el: * lisp/language/utf-8-lang.el: * lisp/language/vietnamese.el: * lisp/ldefs-boot.el: * lisp/mail/mail-extr.el: * lisp/man.el: * lisp/menu-bar.el: * lisp/mh-e/mh-acros.el: * lisp/mh-e/mh-folder.el: * lisp/mh-e/mh-mime.el: * lisp/mh-e/mh-show.el: * lisp/mh-e/mh-speed.el: * lisp/minibuffer.el: * lisp/mpc.el: * lisp/net/ange-ftp.el: * lisp/net/hmac-def.el: * lisp/net/newst-backend.el: * lisp/net/quickurl.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-compat.el: * lisp/notifications.el: * lisp/obsolete/pgg-parse.el: * lisp/obsolete/vc-arch.el: * lisp/obsolete/xesam.el: * lisp/org/ob-C.el: * lisp/org/ob-core.el: * lisp/org/ob-exp.el: * lisp/org/ob-groovy.el: * lisp/org/ob-haskell.el: * lisp/org/ob-io.el: * lisp/org/ob-lisp.el: * lisp/org/ob-lob.el: * lisp/org/ob-lua.el: * lisp/org/ob-octave.el: * lisp/org/ob-perl.el: * lisp/org/ob-python.el: * lisp/org/ob-ref.el: * lisp/org/ob-ruby.el: * lisp/org/ob-sql.el: * lisp/org/org-agenda.el: * lisp/org/org-capture.el: * lisp/org/org-clock.el: * lisp/org/org-colview.el: * lisp/org/org-duration.el: * lisp/org/org-element.el: * lisp/org/org-entities.el: * lisp/org/org-gnus.el: * lisp/org/org-indent.el: * lisp/org/org-info.el: * lisp/org/org-inlinetask.el: * lisp/org/org-lint.el: * lisp/org/org-list.el: * lisp/org/org-mouse.el: * lisp/org/org-plot.el: * lisp/org/org-src.el: * lisp/org/org-table.el: * lisp/org/org.el: * lisp/org/ox-ascii.el: * lisp/org/ox-html.el: * lisp/org/ox-latex.el: * lisp/org/ox-man.el: * lisp/org/ox-md.el: * lisp/org/ox-org.el: * lisp/org/ox-publish.el: * lisp/org/ox-texinfo.el: * lisp/org/ox.el: * lisp/play/bubbles.el: * lisp/play/gamegrid.el: * lisp/progmodes/autoconf.el: * lisp/progmodes/cc-defs.el: * lisp/progmodes/cc-engine.el: * lisp/progmodes/cc-fonts.el: * lisp/progmodes/cc-langs.el: * lisp/progmodes/cperl-mode.el: * lisp/progmodes/ebrowse.el: * lisp/progmodes/elisp-mode.el: * lisp/progmodes/flymake-cc.el: * lisp/progmodes/flymake.el: * lisp/progmodes/fortran.el: * lisp/progmodes/grep.el: * lisp/progmodes/gud.el: * lisp/progmodes/idlwave.el: * lisp/progmodes/js.el: * lisp/progmodes/m4-mode.el: * lisp/progmodes/make-mode.el: * lisp/progmodes/mixal-mode.el: * lisp/progmodes/modula2.el: * lisp/progmodes/octave.el: * lisp/progmodes/opascal.el: * lisp/progmodes/prolog.el: * lisp/progmodes/ps-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/sql.el: * lisp/progmodes/verilog-mode.el: * lisp/ps-mule.el: * lisp/rtree.el: * lisp/ruler-mode.el: * lisp/ses.el: * lisp/simple.el: * lisp/startup.el: * lisp/subr.el: * lisp/term/ns-win.el: * lisp/textmodes/bibtex.el: * lisp/textmodes/conf-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/refill.el: * lisp/textmodes/sgml-mode.el: * lisp/textmodes/tex-mode.el: * lisp/tutorial.el: * lisp/url/url-dav.el: * lisp/url/url-gw.el: * lisp/url/url-http.el: * lisp/url/url-methods.el: * lisp/url/url-privacy.el: * lisp/vc/cvs-status.el: * lisp/vc/diff-mode.el: * lisp/vc/ediff-init.el: * lisp/vc/ediff-ptch.el: * lisp/vc/log-edit.el: * lisp/vc/log-view.el: * lisp/vc/pcvs-info.el: * lisp/vc/pcvs.el: * lisp/vc/smerge-mode.el: * lisp/vc/vc-git.el: * lisp/vc/vc-hg.el: * lisp/vc/vc-mtn.el: * lisp/vc/vc-rcs.el: * lisp/whitespace.el: * lisp/window.el: * test/lisp/electric-tests.el: * test/lisp/emacs-lisp/cl-lib-tests.el: * test/lisp/emacs-lisp/ert-tests.el: * test/lisp/epg-tests.el: * test/lisp/jsonrpc-tests.el: * test/src/data-tests.el: * test/src/json-tests.el: Replace most insignificant backquotes.
2018-11-05 01:22:15 +01:00
('Strigi
'("xesam:author" "xesam:cc" "xesam:charset"
"xesam:contentType" "xesam:fileExtension"
"xesam:id" "xesam:lineCount" "xesam:links"
"xesam:mimeType" "xesam:name" "xesam:size"
"xesam:sourceModified" "xesam:subject" "xesam:to"
"xesam:url"))
Replace insignificant backquotes Replace most insignificant occurrences of '`' with a straight quote, sharp quote or nothing. This includes backquotes in 'pcase' patterns. * admin/admin.el: * lisp/apropos.el: * lisp/arc-mode.el: * lisp/auth-source.el: * lisp/avoid.el: * lisp/bindings.el: * lisp/bs.el: * lisp/calculator.el: * lisp/calendar/todo-mode.el: * lisp/cedet/semantic.el: * lisp/cedet/semantic/analyze/debug.el: * lisp/cedet/semantic/bovine.el: * lisp/cedet/semantic/dep.el: * lisp/cedet/semantic/grammar.el: * lisp/cedet/semantic/wisent/comp.el: * lisp/cedet/semantic/wisent/grammar.el: * lisp/cedet/srecode/mode.el: * lisp/cus-edit.el: * lisp/doc-view.el: * lisp/elec-pair.el: * lisp/electric.el: * lisp/emacs-lisp/autoload.el: * lisp/emacs-lisp/benchmark.el: * lisp/emacs-lisp/byte-opt.el: * lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/cconv.el: * lisp/emacs-lisp/cl-extra.el: * lisp/emacs-lisp/cl-generic.el: * lisp/emacs-lisp/cl-macs.el: * lisp/emacs-lisp/copyright.el: * lisp/emacs-lisp/debug.el: * lisp/emacs-lisp/eieio-compat.el: * lisp/emacs-lisp/ert.el: * lisp/emacs-lisp/generator.el: * lisp/emacs-lisp/inline.el: * lisp/emacs-lisp/macroexp.el: * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/package-x.el: * lisp/emacs-lisp/package.el: * lisp/emacs-lisp/radix-tree.el: * lisp/emacs-lisp/smie.el: * lisp/epa.el: * lisp/erc/erc-dcc.el: * lisp/erc/erc-track.el: * lisp/erc/erc.el: * lisp/eshell/em-ls.el: * lisp/eshell/esh-cmd.el: * lisp/files.el: * lisp/filesets.el: * lisp/font-lock.el: * lisp/frameset.el: * lisp/gnus/gnus-agent.el: * lisp/gnus/gnus-art.el: * lisp/gnus/gnus-cite.el: * lisp/gnus/gnus-group.el: * lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-srvr.el: * lisp/gnus/gnus-sum.el: * lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el: * lisp/gnus/gnus.el: * lisp/gnus/message.el: * lisp/gnus/mm-util.el: * lisp/gnus/mml.el: * lisp/gnus/nnheader.el: * lisp/gnus/nnimap.el: * lisp/gnus/nnmairix.el: * lisp/gnus/spam.el: * lisp/hexl.el: * lisp/hi-lock.el: * lisp/ibuf-ext.el: * lisp/ibuffer.el: * lisp/ido.el: * lisp/info.el: * lisp/international/mule-cmds.el: * lisp/international/mule-util.el: * lisp/json.el: * lisp/jsonrpc.el: * lisp/language/cyrillic.el: * lisp/language/european.el: * lisp/language/georgian.el: * lisp/language/tibetan.el: * lisp/language/utf-8-lang.el: * lisp/language/vietnamese.el: * lisp/ldefs-boot.el: * lisp/mail/mail-extr.el: * lisp/man.el: * lisp/menu-bar.el: * lisp/mh-e/mh-acros.el: * lisp/mh-e/mh-folder.el: * lisp/mh-e/mh-mime.el: * lisp/mh-e/mh-show.el: * lisp/mh-e/mh-speed.el: * lisp/minibuffer.el: * lisp/mpc.el: * lisp/net/ange-ftp.el: * lisp/net/hmac-def.el: * lisp/net/newst-backend.el: * lisp/net/quickurl.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-compat.el: * lisp/notifications.el: * lisp/obsolete/pgg-parse.el: * lisp/obsolete/vc-arch.el: * lisp/obsolete/xesam.el: * lisp/org/ob-C.el: * lisp/org/ob-core.el: * lisp/org/ob-exp.el: * lisp/org/ob-groovy.el: * lisp/org/ob-haskell.el: * lisp/org/ob-io.el: * lisp/org/ob-lisp.el: * lisp/org/ob-lob.el: * lisp/org/ob-lua.el: * lisp/org/ob-octave.el: * lisp/org/ob-perl.el: * lisp/org/ob-python.el: * lisp/org/ob-ref.el: * lisp/org/ob-ruby.el: * lisp/org/ob-sql.el: * lisp/org/org-agenda.el: * lisp/org/org-capture.el: * lisp/org/org-clock.el: * lisp/org/org-colview.el: * lisp/org/org-duration.el: * lisp/org/org-element.el: * lisp/org/org-entities.el: * lisp/org/org-gnus.el: * lisp/org/org-indent.el: * lisp/org/org-info.el: * lisp/org/org-inlinetask.el: * lisp/org/org-lint.el: * lisp/org/org-list.el: * lisp/org/org-mouse.el: * lisp/org/org-plot.el: * lisp/org/org-src.el: * lisp/org/org-table.el: * lisp/org/org.el: * lisp/org/ox-ascii.el: * lisp/org/ox-html.el: * lisp/org/ox-latex.el: * lisp/org/ox-man.el: * lisp/org/ox-md.el: * lisp/org/ox-org.el: * lisp/org/ox-publish.el: * lisp/org/ox-texinfo.el: * lisp/org/ox.el: * lisp/play/bubbles.el: * lisp/play/gamegrid.el: * lisp/progmodes/autoconf.el: * lisp/progmodes/cc-defs.el: * lisp/progmodes/cc-engine.el: * lisp/progmodes/cc-fonts.el: * lisp/progmodes/cc-langs.el: * lisp/progmodes/cperl-mode.el: * lisp/progmodes/ebrowse.el: * lisp/progmodes/elisp-mode.el: * lisp/progmodes/flymake-cc.el: * lisp/progmodes/flymake.el: * lisp/progmodes/fortran.el: * lisp/progmodes/grep.el: * lisp/progmodes/gud.el: * lisp/progmodes/idlwave.el: * lisp/progmodes/js.el: * lisp/progmodes/m4-mode.el: * lisp/progmodes/make-mode.el: * lisp/progmodes/mixal-mode.el: * lisp/progmodes/modula2.el: * lisp/progmodes/octave.el: * lisp/progmodes/opascal.el: * lisp/progmodes/prolog.el: * lisp/progmodes/ps-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/sql.el: * lisp/progmodes/verilog-mode.el: * lisp/ps-mule.el: * lisp/rtree.el: * lisp/ruler-mode.el: * lisp/ses.el: * lisp/simple.el: * lisp/startup.el: * lisp/subr.el: * lisp/term/ns-win.el: * lisp/textmodes/bibtex.el: * lisp/textmodes/conf-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/refill.el: * lisp/textmodes/sgml-mode.el: * lisp/textmodes/tex-mode.el: * lisp/tutorial.el: * lisp/url/url-dav.el: * lisp/url/url-gw.el: * lisp/url/url-http.el: * lisp/url/url-methods.el: * lisp/url/url-privacy.el: * lisp/vc/cvs-status.el: * lisp/vc/diff-mode.el: * lisp/vc/ediff-init.el: * lisp/vc/ediff-ptch.el: * lisp/vc/log-edit.el: * lisp/vc/log-view.el: * lisp/vc/pcvs-info.el: * lisp/vc/pcvs.el: * lisp/vc/smerge-mode.el: * lisp/vc/vc-git.el: * lisp/vc/vc-hg.el: * lisp/vc/vc-mtn.el: * lisp/vc/vc-rcs.el: * lisp/whitespace.el: * lisp/window.el: * test/lisp/electric-tests.el: * test/lisp/emacs-lisp/cl-lib-tests.el: * test/lisp/emacs-lisp/ert-tests.el: * test/lisp/epg-tests.el: * test/lisp/jsonrpc-tests.el: * test/src/data-tests.el: * test/src/json-tests.el: Replace most insignificant backquotes.
2018-11-05 01:22:15 +01:00
('TrackerXesamSession
'("xesam:relevancyRating" "xesam:url"))
Replace insignificant backquotes Replace most insignificant occurrences of '`' with a straight quote, sharp quote or nothing. This includes backquotes in 'pcase' patterns. * admin/admin.el: * lisp/apropos.el: * lisp/arc-mode.el: * lisp/auth-source.el: * lisp/avoid.el: * lisp/bindings.el: * lisp/bs.el: * lisp/calculator.el: * lisp/calendar/todo-mode.el: * lisp/cedet/semantic.el: * lisp/cedet/semantic/analyze/debug.el: * lisp/cedet/semantic/bovine.el: * lisp/cedet/semantic/dep.el: * lisp/cedet/semantic/grammar.el: * lisp/cedet/semantic/wisent/comp.el: * lisp/cedet/semantic/wisent/grammar.el: * lisp/cedet/srecode/mode.el: * lisp/cus-edit.el: * lisp/doc-view.el: * lisp/elec-pair.el: * lisp/electric.el: * lisp/emacs-lisp/autoload.el: * lisp/emacs-lisp/benchmark.el: * lisp/emacs-lisp/byte-opt.el: * lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/cconv.el: * lisp/emacs-lisp/cl-extra.el: * lisp/emacs-lisp/cl-generic.el: * lisp/emacs-lisp/cl-macs.el: * lisp/emacs-lisp/copyright.el: * lisp/emacs-lisp/debug.el: * lisp/emacs-lisp/eieio-compat.el: * lisp/emacs-lisp/ert.el: * lisp/emacs-lisp/generator.el: * lisp/emacs-lisp/inline.el: * lisp/emacs-lisp/macroexp.el: * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/package-x.el: * lisp/emacs-lisp/package.el: * lisp/emacs-lisp/radix-tree.el: * lisp/emacs-lisp/smie.el: * lisp/epa.el: * lisp/erc/erc-dcc.el: * lisp/erc/erc-track.el: * lisp/erc/erc.el: * lisp/eshell/em-ls.el: * lisp/eshell/esh-cmd.el: * lisp/files.el: * lisp/filesets.el: * lisp/font-lock.el: * lisp/frameset.el: * lisp/gnus/gnus-agent.el: * lisp/gnus/gnus-art.el: * lisp/gnus/gnus-cite.el: * lisp/gnus/gnus-group.el: * lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-srvr.el: * lisp/gnus/gnus-sum.el: * lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el: * lisp/gnus/gnus.el: * lisp/gnus/message.el: * lisp/gnus/mm-util.el: * lisp/gnus/mml.el: * lisp/gnus/nnheader.el: * lisp/gnus/nnimap.el: * lisp/gnus/nnmairix.el: * lisp/gnus/spam.el: * lisp/hexl.el: * lisp/hi-lock.el: * lisp/ibuf-ext.el: * lisp/ibuffer.el: * lisp/ido.el: * lisp/info.el: * lisp/international/mule-cmds.el: * lisp/international/mule-util.el: * lisp/json.el: * lisp/jsonrpc.el: * lisp/language/cyrillic.el: * lisp/language/european.el: * lisp/language/georgian.el: * lisp/language/tibetan.el: * lisp/language/utf-8-lang.el: * lisp/language/vietnamese.el: * lisp/ldefs-boot.el: * lisp/mail/mail-extr.el: * lisp/man.el: * lisp/menu-bar.el: * lisp/mh-e/mh-acros.el: * lisp/mh-e/mh-folder.el: * lisp/mh-e/mh-mime.el: * lisp/mh-e/mh-show.el: * lisp/mh-e/mh-speed.el: * lisp/minibuffer.el: * lisp/mpc.el: * lisp/net/ange-ftp.el: * lisp/net/hmac-def.el: * lisp/net/newst-backend.el: * lisp/net/quickurl.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-compat.el: * lisp/notifications.el: * lisp/obsolete/pgg-parse.el: * lisp/obsolete/vc-arch.el: * lisp/obsolete/xesam.el: * lisp/org/ob-C.el: * lisp/org/ob-core.el: * lisp/org/ob-exp.el: * lisp/org/ob-groovy.el: * lisp/org/ob-haskell.el: * lisp/org/ob-io.el: * lisp/org/ob-lisp.el: * lisp/org/ob-lob.el: * lisp/org/ob-lua.el: * lisp/org/ob-octave.el: * lisp/org/ob-perl.el: * lisp/org/ob-python.el: * lisp/org/ob-ref.el: * lisp/org/ob-ruby.el: * lisp/org/ob-sql.el: * lisp/org/org-agenda.el: * lisp/org/org-capture.el: * lisp/org/org-clock.el: * lisp/org/org-colview.el: * lisp/org/org-duration.el: * lisp/org/org-element.el: * lisp/org/org-entities.el: * lisp/org/org-gnus.el: * lisp/org/org-indent.el: * lisp/org/org-info.el: * lisp/org/org-inlinetask.el: * lisp/org/org-lint.el: * lisp/org/org-list.el: * lisp/org/org-mouse.el: * lisp/org/org-plot.el: * lisp/org/org-src.el: * lisp/org/org-table.el: * lisp/org/org.el: * lisp/org/ox-ascii.el: * lisp/org/ox-html.el: * lisp/org/ox-latex.el: * lisp/org/ox-man.el: * lisp/org/ox-md.el: * lisp/org/ox-org.el: * lisp/org/ox-publish.el: * lisp/org/ox-texinfo.el: * lisp/org/ox.el: * lisp/play/bubbles.el: * lisp/play/gamegrid.el: * lisp/progmodes/autoconf.el: * lisp/progmodes/cc-defs.el: * lisp/progmodes/cc-engine.el: * lisp/progmodes/cc-fonts.el: * lisp/progmodes/cc-langs.el: * lisp/progmodes/cperl-mode.el: * lisp/progmodes/ebrowse.el: * lisp/progmodes/elisp-mode.el: * lisp/progmodes/flymake-cc.el: * lisp/progmodes/flymake.el: * lisp/progmodes/fortran.el: * lisp/progmodes/grep.el: * lisp/progmodes/gud.el: * lisp/progmodes/idlwave.el: * lisp/progmodes/js.el: * lisp/progmodes/m4-mode.el: * lisp/progmodes/make-mode.el: * lisp/progmodes/mixal-mode.el: * lisp/progmodes/modula2.el: * lisp/progmodes/octave.el: * lisp/progmodes/opascal.el: * lisp/progmodes/prolog.el: * lisp/progmodes/ps-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/sql.el: * lisp/progmodes/verilog-mode.el: * lisp/ps-mule.el: * lisp/rtree.el: * lisp/ruler-mode.el: * lisp/ses.el: * lisp/simple.el: * lisp/startup.el: * lisp/subr.el: * lisp/term/ns-win.el: * lisp/textmodes/bibtex.el: * lisp/textmodes/conf-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/refill.el: * lisp/textmodes/sgml-mode.el: * lisp/textmodes/tex-mode.el: * lisp/tutorial.el: * lisp/url/url-dav.el: * lisp/url/url-gw.el: * lisp/url/url-http.el: * lisp/url/url-methods.el: * lisp/url/url-privacy.el: * lisp/vc/cvs-status.el: * lisp/vc/diff-mode.el: * lisp/vc/ediff-init.el: * lisp/vc/ediff-ptch.el: * lisp/vc/log-edit.el: * lisp/vc/log-view.el: * lisp/vc/pcvs-info.el: * lisp/vc/pcvs.el: * lisp/vc/smerge-mode.el: * lisp/vc/vc-git.el: * lisp/vc/vc-hg.el: * lisp/vc/vc-mtn.el: * lisp/vc/vc-rcs.el: * lisp/whitespace.el: * lisp/window.el: * test/lisp/electric-tests.el: * test/lisp/emacs-lisp/cl-lib-tests.el: * test/lisp/emacs-lisp/ert-tests.el: * test/lisp/epg-tests.el: * test/lisp/jsonrpc-tests.el: * test/src/data-tests.el: * test/src/json-tests.el: Replace most insignificant backquotes.
2018-11-05 01:22:15 +01:00
('Debbugs
'("xesam:keyword" "xesam:owner" "xesam:title"
"xesam:url" "xesam:sourceModified" "xesam:mimeType"
"debbugs:key"))
;; xesam-tools yahoo service.
More CL cleanups and reduction of use of cl.el. * woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el: * vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el: * textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el: * strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el: * progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el: * play/tetris.el, play/snake.el, play/pong.el, play/landmark.el: * play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el: * net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el: * image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el: * eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el: * eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el: * eshell/em-cmpl.el, eshell/em-banner.el: * url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el: * url/url-future.el, url/url-dav.el, url/url-cookie.el: * calendar/parse-time.el, test/eshell.el: Use cl-lib. * wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el: * vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el: * textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el: * term/ns-win.el, term.el, shell.el, ps-samp.el: * progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el: * progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el: * play/gamegrid.el, play/bubbles.el, novice.el, notifications.el: * net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el: * net/ldap.el, net/eudc.el, net/browse-url.el, man.el: * mail/mailheader.el, mail/feedmail.el: * url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el: * url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el: Dont use CL. * ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time. * eshell/esh-opt.el (eshell-eval-using-options): Quote code with `lambda' rather than with `quote'. (eshell-do-opt): Adjust accordingly. (eshell-process-option): Simplify. * eshell/esh-var.el: * eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options. * emacs-pcase.el (pcase--dontcare-upats, pcase--let*) (pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern to `pcase--dontcare'. * emacs-cl.el (labels): Mark obsolete. (cl--letf, letf): Move to cl-lib. (cl--letf*, letf*): Remove. * emacs-cl-lib.el (cl-nth-value): Use defalias. * emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule. (cl-progv): Rewrite. (cl--letf, cl-letf): Move from cl.el. (cl-letf*): New macro. * emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 19:13:41 -04:00
(_ '("xesam:contentModified" "xesam:mimeType" "xesam:summary"
"xesam:title" "xesam:url" "yahoo:displayUrl"))))
2008-07-24 21:45:01 +00:00
(xesam-set-property engine "hit.fields" hit-fields)
(xesam-set-property engine "hit.fields.extended" '("xesam:snippet"))
;; Let us notify, when the search engine disappears.
(dbus-register-signal
:session dbus-service-dbus dbus-path-dbus
dbus-interface-dbus "NameOwnerChanged"
'xesam-delete-search-engine service))))
xesam-search-engines)
;;; Search buffers.
* lisp/simple.el (special-mode-map): Bind "h" to `describe-mode'; bind "z" to `kill-this-buffer'. (completion-list-mode-map): Bind "z" to `kill-this-buffer'. * lisp/apropos.el (apropos-mode-map): Inherit from `special-mode-map'. (apropos-mode): Inherit from `special-mode'. * lisp/arc-mode.el (archive-mode-map): Inherit from `special-mode-map'. * lisp/bookmark.el (bookmark-bmenu-mode): Define using `define-derived-mode' inheriting from `special-mode'. * lisp/dired.el (dired-mode-map): Inherit from `special-mode-map'. * lisp/image-mode.el (image-mode-map): Ditto. * lisp/replace.el (occur-mode): Define using `define-derived-mode' inheriting from `special-mode'. * lisp/tar-mode.el (tar-mode): Inherit from `special-mode'. * lisp/calendar/diary-lib.el (diary-fancy-display-mode): Inherit from `special-mode-map'. * lisp/emacs-lisp/ert.el (ert-simple-view-mode, ert-results-mode): Inherit from `special-mode'. * lisp/emacs-lisp/package.el (package-menu-mode-map): Copy from `special-mode-map'. (package-menu-mode): Define using `define-derived-mode' inheriting from `special-mode'. * erc/erc-list.el (erc-list-menu-mode): Inherit from `special-mode'. * lisp/net/xesam.el (xesam-mode): Inherit from `special-mode'. (xesam-mode-map): Define separately. * lisp/play/solitaire.el (solitaire-mode): Inherit from `special-mode'. * lisp/progmodes/compile.el (compilation-minor-mode-map) (compilation-mode-map): Inherit from `special-mode-map'. * lisp/vc/diff-mode.el (diff-mode-shared-map): Inherit from `special-mode-map'. * lisp/vc/log-view.el (log-view-mode-map): Add a comment.
2011-02-01 16:22:21 -05:00
(defvar xesam-mode-map
(let ((map (copy-keymap special-mode-map)))
(set-keymap-parent map widget-keymap)
* lisp/simple.el (special-mode-map): Bind "h" to `describe-mode'; bind "z" to `kill-this-buffer'. (completion-list-mode-map): Bind "z" to `kill-this-buffer'. * lisp/apropos.el (apropos-mode-map): Inherit from `special-mode-map'. (apropos-mode): Inherit from `special-mode'. * lisp/arc-mode.el (archive-mode-map): Inherit from `special-mode-map'. * lisp/bookmark.el (bookmark-bmenu-mode): Define using `define-derived-mode' inheriting from `special-mode'. * lisp/dired.el (dired-mode-map): Inherit from `special-mode-map'. * lisp/image-mode.el (image-mode-map): Ditto. * lisp/replace.el (occur-mode): Define using `define-derived-mode' inheriting from `special-mode'. * lisp/tar-mode.el (tar-mode): Inherit from `special-mode'. * lisp/calendar/diary-lib.el (diary-fancy-display-mode): Inherit from `special-mode-map'. * lisp/emacs-lisp/ert.el (ert-simple-view-mode, ert-results-mode): Inherit from `special-mode'. * lisp/emacs-lisp/package.el (package-menu-mode-map): Copy from `special-mode-map'. (package-menu-mode): Define using `define-derived-mode' inheriting from `special-mode'. * erc/erc-list.el (erc-list-menu-mode): Inherit from `special-mode'. * lisp/net/xesam.el (xesam-mode): Inherit from `special-mode'. (xesam-mode-map): Define separately. * lisp/play/solitaire.el (solitaire-mode): Inherit from `special-mode'. * lisp/progmodes/compile.el (compilation-minor-mode-map) (compilation-mode-map): Inherit from `special-mode-map'. * lisp/vc/diff-mode.el (diff-mode-shared-map): Inherit from `special-mode-map'. * lisp/vc/log-view.el (log-view-mode-map): Add a comment.
2011-02-01 16:22:21 -05:00
map))
(define-derived-mode xesam-mode special-mode "Xesam"
2008-07-24 21:45:01 +00:00
"Major mode for presenting search results of a Xesam search.
In this mode, widgets represent the search results.
\\{xesam-mode-map}
Turning on Xesam mode runs the normal hook `xesam-mode-hook'. It
can be used to set `xesam-notify-function', which must a search
engine specific, widget :notify function to visualize xesam:url."
(set (make-local-variable 'xesam-notify-function) nil)
;; Maybe we implement something useful, later on.
(set (make-local-variable 'revert-buffer-function) 'ignore)
;; `xesam-engine', `xesam-search', `xesam-type', `xesam-query', and
;; `xesam-xml-string' will be set in `xesam-new-search'.
(set (make-local-variable 'xesam-engine) nil)
(set (make-local-variable 'xesam-search) nil)
(set (make-local-variable 'xesam-type) "")
(set (make-local-variable 'xesam-query) "")
(set (make-local-variable 'xesam-xml-string) "")
(set (make-local-variable 'xesam-objects) nil)
;; `xesam-current' is the last hit put into the search buffer,
(set (make-local-variable 'xesam-current) 0)
;; `xesam-count' is the number of hits reported by the search engine.
(set (make-local-variable 'xesam-count) 0)
;; `xesam-to' is the upper hit number to be presented.
(set (make-local-variable 'xesam-to) xesam-hits-per-page)
;; `xesam-notify-function' can be a search engine specific function
;; to visualize xesam:url. It can be overwritten in `xesam-mode'.
(set (make-local-variable 'xesam-notify-function) nil)
;; `xesam-refreshing' is an indicator, whether the buffer is just
;; being updated. Needed, because `xesam-refresh-search-buffer'
;; can be triggered by an event.
(set (make-local-variable 'xesam-refreshing) nil)
;; Mode line position returns hit counters.
(set (make-local-variable 'mode-line-position)
(list '(-3 "%p%")
'(10 (:eval (format " (%d/%d)" xesam-current xesam-count)))))
;; Header line contains the query string.
(set (make-local-variable 'header-line-format)
(list '(20
(:eval
(list "Type: "
(propertize xesam-type 'face 'xesam-mode-line))))
'(10
(:eval
(list " Query: "
(propertize
xesam-query
'face 'xesam-mode-line
'help-echo (when xesam-debug xesam-xml-string)))))))
(when (not (called-interactively-p 'interactive))
;; Initialize buffer.
(setq buffer-read-only t)
(let ((inhibit-read-only t))
(erase-buffer))))
;; It doesn't make sense to call it interactively.
(put 'xesam-mode 'disabled t)
2008-07-24 21:45:01 +00:00
;; The very first buffer created with `xesam-mode' does not have the
;; keymap etc. So we create a dummy buffer. Stupid.
(with-temp-buffer (xesam-mode))
(define-minor-mode xesam-minor-mode
"Toggle Xesam minor mode.
When Xesam minor mode is enabled, all text which matches a
previous Xesam query in this buffer is highlighted."
:group 'xesam
:init-value nil
:lighter " Xesam"
(when (local-variable-p 'xesam-query)
;; Run only if the buffer is related to a Xesam search.
(save-excursion
(if xesam-minor-mode
;; Highlight hits.
(let ((query-regexp (regexp-opt (split-string xesam-query nil t) t))
(case-fold-search t))
;; I have no idea whether people will like setting
;; `isearch-case-fold-search' and `query-regexp'. Maybe
;; this shall be controlled by a custom option.
(unless isearch-case-fold-search (isearch-toggle-case-fold))
(isearch-update-ring query-regexp t)
;; Create overlays.
(goto-char (point-min))
(while (re-search-forward query-regexp nil t)
(overlay-put
(make-overlay
(match-beginning 0) (match-end 0)) 'face 'xesam-highlight)))
;; Remove overlays.
(dolist (ov (overlays-in (point-min) (point-max)))
(delete-overlay ov))))))
2008-07-24 21:45:01 +00:00
(defun xesam-buffer-name (service search)
"Return the buffer name where to present search results.
SERVICE is the D-Bus unique service name of the Xesam search engine.
SEARCH is the search identification in that engine. Both must be strings."
(format "*%s/%s*" service search))
(defun xesam-highlight-string (string)
"Highlight text enclosed by <b> and </b>.
Return propertized STRING."
(while (string-match "\\(.*\\)\\(<b>\\)\\(.*\\)\\(</b>\\)\\(.*\\)" string)
(setq string
(format
"%s%s%s"
(match-string 1 string)
(propertize (match-string 3 string) 'face 'xesam-highlight)
(match-string 5 string))))
string)
(defun xesam-refresh-entry (engine entry)
2008-07-24 21:45:01 +00:00
"Refreshes one entry in the search buffer."
(let* ((result (nth (1- xesam-current) xesam-objects))
2008-07-24 21:45:01 +00:00
widget)
;; Create widget.
(setq widget (widget-convert 'link))
(when xesam-debug
(widget-put widget :help-echo ""))
2008-07-24 21:45:01 +00:00
;; Take all results.
(dolist (field (xesam-get-cached-property engine "hit.fields"))
(when (cond
((stringp (caar result)) (not (zerop (length (caar result)))))
((numberp (caar result)) (not (zerop (caar result))))
((caar result) t))
2008-07-24 21:45:01 +00:00
(when xesam-debug
(widget-put
widget :help-echo
(format "%s%s: %s\n"
(widget-get widget :help-echo) field (caar result))))
2008-07-24 21:45:01 +00:00
(widget-put widget (intern (concat ":" field)) (caar result)))
(setq result (cdr result)))
;; Strigi doesn't return URLs in xesam:url. We must fix this.
(when
(not (url-type (url-generic-parse-url (widget-get widget :xesam:url))))
(widget-put
widget :xesam:url (concat "file://" (widget-get widget :xesam:url))))
;; Strigi returns xesam:size as string. We must fix this.
(when (and (widget-member widget :xesam:size)
(stringp (widget-get widget :xesam:size)))
(widget-put
widget :xesam:size (string-to-number (widget-get widget :xesam:url))))
2008-07-24 21:45:01 +00:00
;; First line: :tag.
(cond
((widget-member widget :xesam:title)
(widget-put widget :tag (widget-get widget :xesam:title)))
((widget-member widget :xesam:subject)
(widget-put widget :tag (widget-get widget :xesam:subject)))
((widget-member widget :xesam:mimeType)
(widget-put widget :tag (widget-get widget :xesam:mimeType)))
((widget-member widget :xesam:name)
(widget-put widget :tag (widget-get widget :xesam:name))))
;; Highlight the search items.
(when (widget-member widget :tag)
(widget-put
widget :tag (xesam-highlight-string (widget-get widget :tag))))
2008-07-24 21:45:01 +00:00
;; Last Modified.
(when (and (widget-member widget :xesam:sourceModified)
(not
(zerop
(string-to-number (widget-get widget :xesam:sourceModified)))))
2008-07-24 21:45:01 +00:00
(widget-put
widget :tag
(format
"%s\nLast Modified: %s"
(or (widget-get widget :tag) "")
(format-time-string
"%d %B %Y, %T"
Avoid some double-rounding of Lisp timestamps Also, simplify some time-related Lisp timestamp code while we’re in the neighborhood. * lisp/battery.el (battery-linux-proc-acpi) (battery-linux-sysfs, battery-upower, battery-bsd-apm): * lisp/calendar/timeclock.el (timeclock-seconds-to-string) (timeclock-log, timeclock-last-period) (timeclock-entry-length, timeclock-entry-list-span) (timeclock-find-discrep, timeclock-generate-report): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/completion.el (cmpl-hours-since-origin): * lisp/ecomplete.el (ecomplete-decay-1): * lisp/emacs-lisp/ert.el (ert--results-update-stats-display) (ert--results-update-stats-display-maybe): * lisp/emacs-lisp/timer-list.el (list-timers): * lisp/emacs-lisp/timer.el (timer-until) (timer-event-handler): * lisp/erc/erc-backend.el (erc-server-send-ping) (erc-server-send-queue, erc-handle-parsed-server-response) (erc-handle-unknown-server-response): * lisp/erc/erc-track.el (erc-buffer-visible): * lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p) (erc-cmd-PING, erc-send-current-line): * lisp/eshell/em-pred.el (eshell-pred-file-time): * lisp/eshell/em-unix.el (eshell-show-elapsed-time): * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event:org-timestamp): * lisp/gnus/gnus-int.el (gnus-backend-trace): * lisp/gnus/gnus-sum.el (gnus-user-date): * lisp/gnus/mail-source.el (mail-source-delete-crash-box): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/ibuf-ext.el (ibuffer-mark-old-buffers): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/mouse.el (mouse--down-1-maybe-follows-link) (mouse--click-1-maybe-follows-link): * lisp/mpc.el (mpc--faster-toggle): * lisp/net/rcirc.el (rcirc-handler-ctcp-KEEPALIVE) (rcirc-sentinel): * lisp/net/tramp-cache.el (tramp-get-file-property): * lisp/net/tramp-sh.el (tramp-sh-handle-file-newer-than-file-p) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): * lisp/org/org-clock.el (org-clock-resolve): (org-resolve-clocks, org-clock-in, org-clock-out, org-clock-sum): * lisp/org/org-timer.el (org-timer-start) (org-timer-pause-or-continue, org-timer-seconds): * lisp/org/org.el (org-evaluate-time-range): * lisp/org/ox-publish.el (org-publish-cache-ctime-of-src): * lisp/pixel-scroll.el (pixel-scroll-in-rush-p): * lisp/play/hanoi.el (hanoi-move-ring): * lisp/proced.el (proced-format-time): * lisp/progmodes/cpp.el (cpp-progress-message): * lisp/progmodes/flymake.el (flymake--handle-report): * lisp/progmodes/js.el (js--wait-for-matching-output): * lisp/subr.el (progress-reporter-do-update): * lisp/term/xterm.el (xterm--read-event-for-query): * lisp/time.el (display-time-update, emacs-uptime): * lisp/tooltip.el (tooltip-delay): * lisp/url/url-cookie.el (url-cookie-parse-file-netscape): * lisp/url/url-queue.el (url-queue-prune-old-entries): * lisp/url/url.el (url-retrieve-synchronously): * lisp/xt-mouse.el (xterm-mouse-event): Avoid double-rounding of time-related values. Simplify. * lisp/calendar/icalendar.el (icalendar--decode-isodatetime): When hoping for the best (unlikely), use a better decoded time. (icalendar--convert-sexp-to-ical): Avoid unnecessary encode-time. * lisp/calendar/timeclock.el (timeclock-when-to-leave): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/desktop.el (desktop-create-buffer): * lisp/emacs-lisp/benchmark.el (benchmark-elapse): * lisp/gnus/gnus-art.el (article-lapsed-string): * lisp/gnus/gnus-group.el (gnus-group-timestamp-delta): * lisp/gnus/nnmail.el (nnmail-expired-article-p): * lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles): * lisp/nxml/rng-maint.el (rng-time-function): * lisp/org/org-clock.el (org-clock-get-clocked-time) (org-clock-resolve, org-resolve-clocks, org-resolve-clocks-if-idle): * lisp/org/org-habit.el (org-habit-insert-consistency-graphs): * lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info) (vhdl-fix-case-region-1): Use time-since instead of open-coding most of it. * lisp/erc/erc-dcc.el (erc-dcc-get-sentinel): * lisp/erc/erc.el (erc-string-to-emacs-time, erc-time-gt): Now obsolete. All uses changed. (erc-time-diff): Accept all Lisp time values. All uses changed. * lisp/gnus/gnus-demon.el (gnus-demon-idle-since): * lisp/gnus/gnus-score.el (gnus-score-headers): * lisp/gnus/nneething.el (nneething-make-head): * lisp/gnus/nnheader.el (nnheader-message-maybe): * lisp/gnus/nnimap.el (nnimap-keepalive): * lisp/image.el (image-animate-timeout): * lisp/mail/feedmail.el (feedmail-rfc822-date): * lisp/net/imap.el (imap-wait-for-tag): * lisp/net/newst-backend.el (newsticker--image-get): * lisp/net/rcirc.el (rcirc-handler-317, rcirc-handler-333): * lisp/obsolete/xesam.el (xesam-refresh-entry): * lisp/org/org-agenda.el (org-agenda-show-clocking-issues) (org-agenda-check-clock-gap, org-agenda-to-appt): * lisp/org/org-capture.el (org-capture-set-target-location): * lisp/org/org-clock.el (org-clock-resolve-clock) (org-clocktable-steps): * lisp/org/org-colview.el (org-columns-edit-value) (org-columns, org-agenda-columns): * lisp/org/org-duration.el (org-duration-from-minutes): * lisp/org/org-element.el (org-element-cache-sync-duration) (org-element-cache-sync-break) (org-element--cache-interrupt-p, org-element--cache-sync): * lisp/org/org-habit.el (org-habit-get-faces) * lisp/org/org-indent.el (org-indent-add-properties): * lisp/org/org-table.el (org-table-sum): * lisp/org/org-timer.el (org-timer-show-remaining-time) (org-timer-set-timer): * lisp/org/org.el (org-babel-load-file, org-today) (org-auto-repeat-maybe, org-2ft, org-time-stamp) (org-read-date-analyze, org-time-stamp-to-now) (org-small-year-to-year, org-goto-calendar): * lisp/org/ox.el (org-export-insert-default-template): * lisp/ses.el (ses--time-check): * lisp/type-break.el (type-break-time-warning) (type-break-statistics, type-break-demo-boring): * lisp/url/url-cache.el (url-cache-expired) (url-cache-prune-cache): * lisp/vc/vc-git.el (vc-git-stash-snapshot): * lisp/erc/erc-match.el (erc-log-matches-come-back): Simplify.
2019-02-22 18:32:31 -08:00
(string-to-number (widget-get widget :xesam:sourceModified))))))
2008-07-24 21:45:01 +00:00
;; Second line: :value.
(widget-put widget :value (widget-get widget :xesam:url))
(cond
;; A search engine can set `xesam-notify-function' via
;; `xesam-mode-hooks'.
(xesam-notify-function
(widget-put widget :notify xesam-notify-function))
2008-07-24 21:45:01 +00:00
;; In case of HTML, we use a URL link.
((and (widget-member widget :xesam:mimeType)
(string-equal "text/html" (widget-get widget :xesam:mimeType)))
(setcar widget 'url-link))
;; For local files, we will open the file as default action.
((string-match "file"
(url-type (url-generic-parse-url
(widget-get widget :xesam:url))))
(widget-put
widget :notify
(lambda (widget &rest ignore)
(let ((query xesam-query))
(find-file
(url-filename (url-generic-parse-url (widget-value widget))))
(set (make-local-variable 'xesam-query) query)
(xesam-minor-mode 1))))
2008-07-24 21:45:01 +00:00
(widget-put
widget :value
(url-filename (url-generic-parse-url (widget-get widget :xesam:url))))))
;; Third line: :doc.
(cond
((widget-member widget :xesam:summary)
(widget-put widget :doc (widget-get widget :xesam:summary)))
((widget-member widget :xesam:snippet)
(widget-put widget :doc (widget-get widget :xesam:snippet))))
(when (widget-member widget :doc)
(with-temp-buffer
(insert
(xesam-highlight-string (widget-get widget :doc)))
2008-07-24 21:45:01 +00:00
(fill-region-as-paragraph (point-min) (point-max))
(widget-put widget :doc (buffer-string)))
(widget-put widget :help-echo (widget-get widget :doc)))
2008-07-24 21:45:01 +00:00
;; Format the widget.
(widget-put
widget :format
(format "%d. %s%%[%%v%%]\n%s\n" xesam-current
2008-07-24 21:45:01 +00:00
(if (widget-member widget :tag) "%{%t%}\n" "")
(if (widget-member widget :doc) "%h" "")))
;; Write widget.
(goto-char (point-max))
(widget-default-create widget)
(set-buffer-modified-p nil)
(force-mode-line-update)
2008-07-24 21:45:01 +00:00
(redisplay)))
(defun xesam-get-hits (engine search hits)
"Retrieve hits from ENGINE."
(with-current-buffer (xesam-buffer-name (car engine) search)
(setq xesam-objects
(append xesam-objects
(xesam-dbus-call-method
:session (car engine) xesam-path-search
xesam-interface-search "GetHits" search hits)))))
2008-07-24 21:45:01 +00:00
(defun xesam-refresh-search-buffer (engine search)
"Refreshes the buffer, presenting results of SEARCH."
(with-current-buffer (xesam-buffer-name (car engine) search)
;; Work only if nobody else is here.
(unless (or xesam-refreshing (>= xesam-current xesam-to))
2008-07-24 21:45:01 +00:00
(setq xesam-refreshing t)
(unwind-protect
(let (widget)
;; Retrieve needed hits for visualization.
(while (> (min xesam-to xesam-count) (length xesam-objects))
(xesam-get-hits
engine search
(min xesam-hits-per-page
(- (min xesam-to xesam-count) (length xesam-objects)))))
;; Add all result widgets.
(while (< xesam-current (min xesam-to xesam-count))
(setq xesam-current (1+ xesam-current))
(xesam-refresh-entry engine search))
2008-07-24 21:45:01 +00:00
;; Add "NEXT" widget.
(when (> xesam-count xesam-to)
2008-07-24 21:45:01 +00:00
(goto-char (point-max))
(widget-create
'link
:notify
(lambda (widget &rest ignore)
(setq xesam-to (+ xesam-to xesam-hits-per-page))
(widget-delete widget)
(xesam-refresh-search-buffer xesam-engine xesam-search))
2008-07-24 21:45:01 +00:00
"NEXT")
(widget-beginning-of-line))
;; Prefetch next hits.
(when (> (min (+ xesam-hits-per-page xesam-to) xesam-count)
(length xesam-objects))
(xesam-get-hits
engine search
(min xesam-hits-per-page
(- (min (+ xesam-hits-per-page xesam-to) xesam-count)
(length xesam-objects)))))
2008-07-24 21:45:01 +00:00
;; Add "DONE" widget.
(when (= xesam-current xesam-count)
(goto-char (point-max))
(widget-create 'link :notify 'ignore "DONE")
(widget-beginning-of-line)))
2008-07-24 21:45:01 +00:00
;; Return with save settings.
(setq xesam-refreshing nil)))))
;;; Search functions.
(defun xesam-signal-handler (&rest args)
"Handles the different D-Bus signals of a Xesam search."
(let* ((service (dbus-event-service-name last-input-event))
(member (dbus-event-member-name last-input-event))
(search (nth 0 args))
(buffer (xesam-buffer-name service search)))
(when (get-buffer buffer)
(with-current-buffer buffer
(cond
((string-equal member "HitsAdded")
(setq xesam-count (+ xesam-count (nth 1 args)))
2008-07-24 21:45:01 +00:00
;; We use `run-at-time' in order to not block the event queue.
(run-at-time
0 nil
'xesam-refresh-search-buffer
(assoc service xesam-search-engines) search))
((string-equal member "SearchDone")
(setq mode-line-process
(propertize " Done" 'face 'xesam-mode-line))
2008-07-24 21:45:01 +00:00
(force-mode-line-update)))))))
(defun xesam-kill-buffer-function ()
"Send the CloseSearch indication."
(when (and (eq major-mode 'xesam-mode) (stringp xesam-search))
(ignore-errors ;; The D-Bus service could have disappeared.
(xesam-dbus-call-method
:session (car xesam-engine) xesam-path-search
xesam-interface-search "CloseSearch" xesam-search))))
(defun xesam-new-search (engine type query)
2008-07-24 21:45:01 +00:00
"Create a new search session.
ENGINE identifies the search engine. TYPE is the query type, it
can be either `fulltext-query', or `user-query'. QUERY is a
string in the Xesam query language. A string, identifying the
search, is returned."
2008-07-24 21:45:01 +00:00
(let* ((service (car engine))
(session (xesam-get-cached-property engine "session"))
(xml-string
(format
(if (eq type 'user-query) xesam-user-query xesam-fulltext-query)
(url-insert-entities-in-string query)))
(search (xesam-dbus-call-method
2008-07-24 21:45:01 +00:00
:session service xesam-path-search
xesam-interface-search "NewSearch" session xml-string)))
2008-07-24 21:45:01 +00:00
;; Let us notify for relevant signals. We ignore "HitsRemoved",
;; "HitsModified" and "StateChanged"; there is nothing to do for
;; us.
(dbus-register-signal
:session service xesam-path-search
xesam-interface-search "HitsAdded"
'xesam-signal-handler search)
(dbus-register-signal
:session service xesam-path-search
xesam-interface-search "SearchDone"
'xesam-signal-handler search)
2008-07-24 21:45:01 +00:00
;; Create the search buffer.
(with-current-buffer
(generate-new-buffer (xesam-buffer-name service search))
(switch-to-buffer-other-window (current-buffer))
2011-11-24 23:14:48 -08:00
;; Initialize buffer with `xesam-mode'. `xesam-vendor' must be
;; set before calling `xesam-mode', because we want to give the
;; hook functions a chance to identify their search engine.
(setq xesam-vendor (xesam-get-cached-property engine "vendor.id"))
2008-07-24 21:45:01 +00:00
(xesam-mode)
(setq xesam-engine engine
xesam-search search
;; `xesam-type', `xesam-query' and `xesam-xml-string'
;; are displayed in the header line.
xesam-type (symbol-name type)
xesam-query query
xesam-xml-string xml-string
xesam-objects nil
;; The buffer identification shall indicate the search
;; engine. The `help-echo' property is used for debug
;; information, when applicable.
2008-07-24 21:45:01 +00:00
mode-line-buffer-identification
(if (not xesam-debug)
(list 12 (propertized-buffer-identification xesam-vendor))
(propertize
xesam-vendor
'help-echo
(mapconcat
(lambda (x)
(format "%s: %s" x (xesam-get-cached-property engine x)))
'("vendor.id" "vendor.version" "vendor.display" "vendor.xesam"
"vendor.ontology.fields" "vendor.ontology.contents"
"vendor.ontology.sources" "vendor.extensions"
"vendor.ontologies" "vendor.maxhits")
"\n"))))
(add-hook 'kill-buffer-hook 'xesam-kill-buffer-function)
(force-mode-line-update))
;; Start the search.
(xesam-dbus-call-method
:session (car engine) xesam-path-search
xesam-interface-search "StartSearch" search)
2008-07-24 21:45:01 +00:00
;; Return search id.
search))
;;;###autoload
2008-07-24 21:45:01 +00:00
(defun xesam-search (engine query)
"Perform an interactive search.
ENGINE is the Xesam search engine to be applied, it must be one of the
entries of `xesam-search-engines'. QUERY is the search string in the
Xesam user query language. If the search engine does not support
the Xesam user query language, a Xesam fulltext search is applied.
The default search engine is the first entry in `xesam-search-engines'.
Example:
(xesam-search (car (xesam-search-engines)) \"emacs\")"
(interactive
(let* ((vendors (mapcar
(lambda (x) (xesam-get-cached-property x "vendor.display"))
2008-07-24 21:45:01 +00:00
(xesam-search-engines)))
(vendor
(if (> (length vendors) 1)
(completing-read
"Enter search engine: " vendors nil t
(try-completion "" vendors) 'xesam-minibuffer-vendor-history)
(car vendors))))
(list
;; ENGINE.
(when vendor
(dolist (elt (xesam-search-engines) engine)
(when (string-equal
(xesam-get-cached-property elt "vendor.display") vendor)
2008-07-24 21:45:01 +00:00
(setq engine elt))))
;; QUERY.
(when vendor
(read-from-minibuffer
"Enter search string: " nil nil nil
'xesam-minibuffer-query-history)))))
(if (null engine)
(message "No search engine running")
(if (zerop (length query))
(message "No query applied")
(xesam-new-search engine xesam-query-type query))))
2008-07-24 21:45:01 +00:00
(provide 'xesam)
;;; TODO:
;; * Buffer highlighting needs better analysis of query string.
;; * Accept input while retrieving prefetched hits. `run-at-time'?
;; * With prefix, let's choose search engine.
2008-07-24 21:45:01 +00:00
;; * Minibuffer completion for user queries.
;; * `revert-buffer-function' implementation.
;;
2008-07-24 21:45:01 +00:00
;; * Mid term
;; - If available, use ontologies for field selection.
;; - Search engines for Emacs bugs database, wikipedia, google,
;; yahoo, ebay, ...
;; - Construct complex queries via widgets, like in mairix.el.
2008-07-24 21:45:01 +00:00
;;; xesam.el ends here