Skip to content

Latest commit

 

History

History
68 lines (65 loc) · 2.29 KB

README.org

File metadata and controls

68 lines (65 loc) · 2.29 KB

Setup

Set up the super-user password first:

sudo mysqladmin -u root password some-password

Add emacs user account:

create database emacs_user;
grant all on emacs_user.* to emacs@localhost identified by 'emacs';
use emacs_user;
create table documents (id int not null auto_increment primary key,
       document varchar(256) not null unique);
create table org_kinds (id int not null auto_increment primary key,
       kind varchar(32) not null unique);
insert into org_kinds (kind)
       values ('babel-call'),
              ('center-block'),
              ('clock'),
              ('comment'),
              ('comment-block'),
              ('diary-sexp'),
              ('drawer'),
              ('dynamic-block'),
              ('example-block'),
              ('export-block'),
              ('fixed-width'),
              ('footnote-definition'),
              ('headline'),
              ('horizontal-rule'),
              ('inlinetask'),
              ('item'),
              ('keyword'),
              ('latex-environment'),
              ('node-property'),
              ('paragraph'),
              ('plain-list'),
              ('planning'),
              ('property-drawer'),
              ('quote-block'),
              ('section'),
              ('special-block'),
              ('src-block'),
              ('table'),
              ('table-row'),
              ('verse-block');
create table org (id int not null auto_increment primary key,
           file varchar(256) not null,
           kind int not null,
           pos int not null,
           parent int,
           contents text,
           foreign key (kind) references org_kinds(id),
           foreign key (parent) references org(id));

Create necessary Sphinx directories and start the daemon:

mkdir -p ~/.emacs.d/sphinx/var/{log,data}
mkdir -p ~/.emacs.d/sphinx/etc
indexer -c ~/.emacs.d/sphinx/etc/sphinx.conf --all --rotate
searchd -c ~/.emacs.d/sphinx/etc/sphinx.conf

Connect to Sphinx

mysql -P9306 --protocol=tcp -u emacs -p