Merge pull request #307 from AndreaCrotti/reporting

Reporting
This commit is contained in:
Andrea Crotti 2019-03-09 09:45:29 +00:00 committed by GitHub
commit 827908d7cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
366 changed files with 973 additions and 875 deletions

10
report/project.clj Normal file
View File

@ -0,0 +1,10 @@
(defproject report "0.1.0-SNAPSHOT"
:description "Give a report of the yas snippets"
:dependencies [[org.clojure/clojure "1.10.0"]
[hiccup "1.0.5"]]
:uberjar-name "report.jar"
:min-lein-version "2.8.1"
:source-paths ["src"]
:test-paths ["test"]
:resource-paths ["resources"])

88
report/src/core.clj Normal file
View File

@ -0,0 +1,88 @@
(ns core
"Parse files and generate some html reports"
(:require [clojure.string :as str]
[hiccup.core :as hiccup]
[clojure.java.io :as io]))
;; TODO: do something whenever the mode has just `.yas-parents` and nothing else?
(def bulma-url "https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.css")
(defn kw-pattern
[kw]
(re-pattern (format "# %s: (.*)" kw)))
(defn extract-keyword
[filename keyword]
(let [lines (-> filename
slurp
str/split-lines)]
(first
(remove nil?
(map #(last (re-find (kw-pattern keyword) %)) lines)))))
(defn mode-files
[mode-dir]
(filter #(.isFile %)
(file-seq (io/file mode-dir))))
(defn parse-mode
[mode-dir]
(for [f (mode-files mode-dir)]
{:filename (.getName (io/file mode-dir f))
:name (extract-keyword f "name")
:key (or (extract-keyword f "key")
(extract-keyword f "name"))
:group (extract-keyword f "group")
:desc (extract-keyword f "desc")}))
(defn parse-everything
[snippets-dir]
(into {}
(remove nil?)
(for [d (file-seq (io/file snippets-dir))]
(when (.isDirectory d)
{(.getName d) (parse-mode d)}))))
(defn store-to-edn
[snippets-dir output-file]
(spit output-file (parse-everything snippets-dir)))
(def header [:name :key :filename :group :desc])
(defn table
"Generate a table"
[header rows]
[:table.table.is-striped
[:thead (into [:tr.tr]
(for [h header]
[:td.td (name h)]))]
(into [:tbody.tbody]
(for [r rows]
(into [:tr.tr]
(for [h header]
[:td.td (r h)]))))])
(defn structure
[body]
[:html
[:head
[:link {:rel "stylesheet"
:href bulma-url
:crossorigin "anonymous"}]]
(into [:body] body)])
(defn gen-html
[snips-dir]
(let [all-modes (parse-everything snips-dir)
tables (for [[m snips] (sort all-modes)]
[:div.section
[:h2.subtitle m]
(table header snips)])]
(spit
"hello.html"
(hiccup/html
(structure tables)))))
(comment
(gen-html "../snippets"))

View File

@ -1,5 +1,5 @@
# -*- mode: snippet -*-
# name : v.begin(), v.end()
# name: v.begin(), v.end()
# key: beginend
# --
${1:v}.begin(), $1.end

View File

@ -1,4 +1,4 @@
#name : namespace ...
# name: namespace ...
# key: ns
# --
namespace

View File

@ -1,4 +1,4 @@
#name : using namespace ...
# name: using namespace ...
# key: using
# --
using namespace ${std};

View File

@ -1,5 +1,5 @@
# -*- mode: snippet -*-
# name : #include <...>
# name: #include <...>
# key : incs
# --
#include <$1>

View File

@ -1,5 +1,5 @@
# -*- mode: snippet -*-
# name : #include "..."
# name: #include "..."
# key : incl
# --
#include "$1"

View File

@ -1,4 +1,4 @@
#name : #ifndef XXX; #define XXX; #endif
# name: #ifndef XXX; #define XXX; #endif
# key: once
# --
#ifndef ${1:`(upcase (file-name-nondirectory (file-name-sans-extension (or (buffer-file-name) ""))))`_H}

View File

@ -1,5 +1,5 @@
# -*- mode: snippet -*-
# name : case : {...}
# name: case : {...}
# key: case
# expand-env: ((yas-also-auto-indent-first-line t))
# --

View File

@ -1,4 +1,4 @@
#name : do { ... } while (...)
# name: do { ... } while (...)
# key: do
# --
do

View File

@ -1,5 +1,5 @@
# -*- mode: snippet -*-
# name : else { ... }
# name: else { ... }
# key: else
# --
else${1: {

View File

@ -1,8 +1,8 @@
# -*- mode: snippet -*-
#cotributor: Henrique Jung <henriquenj@gmail.com>
#name: File description
#key: \file
#group: doxygen
# name: File description
# key: \file
# group: doxygen
# --
/**
* \file ${1:`(file-name-nondirectory(buffer-file-name))`}

View File

@ -1,8 +1,8 @@
# -*- mode: snippet -*-
#cotributor: Henrique Jung <henriquenj@gmail.com>
#name: Function description
#key: \brief
#group: doxygen
# name: Function description
# key: \brief
# group: doxygen
# --
/**
* \brief ${1:function description}

View File

@ -1,5 +1,5 @@
# -*- mode: snippet -*-
# name : if (...) { ... }
# name: if (...) { ... }
# key: if
# --
if (${1:condition}) ${2:{

View File

@ -1,7 +1,7 @@
# -*- mode: snippet -*-
#cotributor: Henrique Jung <henriquenj@gmail.com>
#name: Member description
#key: !<
#group: doxygen
# name: Member description
# key: !<
# group: doxygen
# --
/*!< ${1:Detailed description after the member} */

View File

@ -1,4 +1,4 @@
#name : struct ... { ... }
# name: struct ... { ... }
# key: struct
# --
struct ${1:name}

View File

@ -1,5 +1,5 @@
# -*- mode: snippet -*-
# name : switch (...) { case : ... default: ...}
# name: switch (...) { case : ... default: ...}
# key: switch
# --
switch (${1:expr}) {

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private attribute ....;
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: private attribute ....;
# key: attrib
# --
/// <summary>

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private attribute ....; public property ... ... { ... }
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: private attribute ....; public property ... ... { ... }
# key: attrib
# --
/// <summary>
@ -19,4 +19,4 @@ public $1 $2
set {
this.$2 = value;
}
}
}

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : private _attribute ....; public Property ... ... { ... }
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: private _attribute ....; public Property ... ... { ... }
# key: attrib
# --
/// <summary>
@ -19,4 +19,4 @@ public ${1:Type} ${2:Name}
set {
this.${2:$(if (> (length yas-text) 0) (format "_%s%s" (downcase (substring yas-text 0 1)) (substring yas-text 1 (length yas-text))) "")} = value;
}
}
}

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : class ... { ... }
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: class ... { ... }
# key: class
# --
${5:public} class ${1:Name}

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <summary> ... </summary>
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <summary> ... </summary>
# key: comment
# --
/// <summary>

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <param name="..."> ... </param>
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <param name="..."> ... </param>
# key: comment
# --
/// <param name="$1">$2</param>
/// <param name="$1">$2</param>

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <param name="..."> ... </param>
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <param name="..."> ... </param>
# key: comment
# --
/// <returns>$1</returns>
/// <returns>$1</returns>

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : /// <exception cref="..."> ... </exception>
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: /// <exception cref="..."> ... </exception>
# key: comment
# --
/// <exception cref="$1">$2</exception>
/// <exception cref="$1">$2</exception>

View File

@ -1,5 +1,5 @@
#contributor : Jostein Kjønigsen <jostein@kjonigsen.net>
#name : foreach { ... }
# contributor : Jostein Kjønigsen <jostein@kjonigsen.net>
# name: foreach { ... }
# key: fore
# --
foreach (${1:var} ${2:item} in ${3:list})

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : public void Method { ... }
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: public void Method { ... }
# key: method
# --
/// <summary>

View File

@ -1,8 +1,8 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : namespace .. { ... }
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: namespace .. { ... }
# key: namespace
# --
namespace $1
{
$0
}
}

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : property ... ... { ... }
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: property ... ... { ... }
# key: prop
# --
/// <summary>

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : #region ... #endregion
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: #region ... #endregion
# key: region
# --
#region $1

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using ...;
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: using ...;
# key: using
# --
using $1;

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using System;
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: using System;
# key: using
# --
using System;
using System;

View File

@ -1,5 +1,5 @@
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
#name : using System....;
# contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
# name: using System....;
# key: using
# --
using System.$1;
using System.$1;

View File

@ -1,3 +1,3 @@
#name : background-color: ...
# name: background-color: ...
# --
background-color: #${1:DDD};

View File

@ -1,3 +1,3 @@
#name : background-image: ...
# name: background-image: ...
# --
background-image: url($1);
background-image: url($1);

View File

@ -1,3 +1,3 @@
#name : border size style color
# name: border size style color
# --
border: ${1:1px} ${2:solid} #${3:999};

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : clear: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: clear: ...
# --
clear: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: block
# contributor : rejeep <johan.rejeep@gmail.com>
# name: display: block
# --
display: block;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: inline
# contributor : rejeep <johan.rejeep@gmail.com>
# name: display: inline
# --
display: inline;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : display: none
# contributor : rejeep <johan.rejeep@gmail.com>
# name: display: none
# --
display: none;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : font-family: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: font-family: ...
# --
font-family: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : font-size: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: font-size: ...
# --
font-size: ${12px};

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-bottom: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: margin-bottom: ...
# --
margin-bottom: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-left: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: margin-left: ...
# --
margin-left: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: margin: ...
# --
margin: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin top right bottom left
# contributor : rejeep <johan.rejeep@gmail.com>
# name: margin top right bottom left
# --
margin: ${top} ${right} ${bottom} ${left};

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-right: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: margin-right: ...
# --
margin-right: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : margin-top: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: margin-top: ...
# --
margin-top: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-bottom: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: padding-bottom: ...
# --
padding-bottom: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-left: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: padding-left: ...
# --
padding-left: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: padding: ...
# --
padding: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding: top right bottom left
# contributor : rejeep <johan.rejeep@gmail.com>
# name: padding: top right bottom left
# --
padding: ${top} ${right} ${bottom} ${left};

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-right: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: padding-right: ...
# --
padding-right: $1;

View File

@ -1,4 +1,4 @@
#contributor : rejeep <johan.rejeep@gmail.com>
#name : padding-top: ...
# contributor : rejeep <johan.rejeep@gmail.com>
# name: padding-top: ...
# --
padding-top: $1;

View File

@ -1,5 +1,5 @@
## -*- mode: snippet -*-
# name : after
# name: after
# key: after
# --
after ${1:500} ->

View File

@ -1,5 +1,5 @@
## -*- mode: snippet -*-
# name : defmodule XXX end
# name: defmodule XXX end
# key: dm
# --
defmodule ${1:`(concat (capitalize (file-name-nondirectory (directory-file-name (file-name-directory buffer-file-name)))) ".")`}${2:`(mapconcat 'capitalize (split-string (file-name-base) "_") "")`} do

View File

@ -1,5 +1,5 @@
## -*- mode: snippet -*-
# name : function
# name: function
# key: dfun
# --
def $1($2)${3:$$(when (and yas-moving-away-p yas-modified-p) (concat " when " yas-text))} do

View File

@ -1,5 +1,5 @@
## -*- mode: snippet -*-
# name : function-one-line
# name: function-one-line
# key: df
# --
def $1($2)${3:$$(when (and yas-moving-away-p yas-modified-p) (concat " when " yas-text))}, do: $0

View File

@ -1,5 +1,5 @@
## -*- mode: snippet -*-
# name : receive
# name: receive
# key: rcv
# --
receive do

View File

@ -1,7 +1,7 @@
# -*- mode: snippet; -*-
#contributor: Xah Lee (XahLee.org)
#name: add-hook
#key: add-hook
#key: ah
# contributor: Xah Lee (XahLee.org)
# name: add-hook
# key: add-hook
# key: ah
# --
(add-hook '${1:name}-hook ${2:'${3:function}})$0

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: and
#key: and
#key: a
# contributor: Xah Lee (XahLee.org)
# name: and
# key: and
# key: a
# --
(and $0)

View File

@ -1,5 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: aref
#key: aref
# contributor: Xah Lee (XahLee.org)
# name: aref
# key: aref
# --
(aref ${1:array} {2:index})

View File

@ -1,5 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: aset
#key: aset
# contributor: Xah Lee (XahLee.org)
# name: aset
# key: aset
# --
(aset ${1:array} ${2:index} ${3:element})

View File

@ -1,5 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: assq
#key: assq
# contributor: Xah Lee (XahLee.org)
# name: assq
# key: assq
# --
(assq ${1:key} ${2:list})

View File

@ -1,5 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: autoload
#key: autoload
# contributor: Xah Lee (XahLee.org)
# name: autoload
# key: autoload
# --
(autoload ${1:function} "${2:filename}"${3: "docstring"}${4: interactive}${5: type})

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: backward-char
#key: backward-char
#key: bc
# contributor: Xah Lee (XahLee.org)
# name: backward-char
# key: backward-char
# key: bc
# --
(backward-char $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: beginning-of-line
#key: beginning-of-line
#key: bol
# contributor: Xah Lee (XahLee.org)
# name: beginning-of-line
# key: beginning-of-line
# key: bol
# --
(beginning-of-line)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: bounds-of-thing-at-point
#key: bounds-of-thing-at-point
#key: botap
# contributor: Xah Lee (XahLee.org)
# name: bounds-of-thing-at-point
# key: bounds-of-thing-at-point
# key: botap
# --
(bounds-of-thing-at-point $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: buffer-file-name
#key: buffer-file-name
#key: bfn
# contributor: Xah Lee (XahLee.org)
# name: buffer-file-name
# key: buffer-file-name
# key: bfn
# --
(buffer-file-name)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: buffer-modified-p
#key: buffer-modified-p
#key: bmp
# contributor: Xah Lee (XahLee.org)
# name: buffer-modified-p
# key: buffer-modified-p
# key: bmp
# --
(buffer-modified-p $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: buffer-substring
#key: buffer-substring
#key: bs
# contributor: Xah Lee (XahLee.org)
# name: buffer-substring
# key: buffer-substring
# key: bs
# --
(buffer-substring ${1:start} ${2:end})

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: buffer-substring-no-properties
#key: buffer-substring-no-properties
#key: bsnp
# contributor: Xah Lee (XahLee.org)
# name: buffer-substring-no-properties
# key: buffer-substring-no-properties
# key: bsnp
# --
(buffer-substring-no-properties ${1:start} ${2:end})

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: cond
#key: cond
# contributor: Xah Lee (XahLee.org)
# name: cond
# key: cond
# --
(cond
(${1:condition} ${2:body})$0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: condition-case
#key: condition-case
#key: cc
# contributor: Xah Lee (XahLee.org)
# name: condition-case
# key: condition-case
# key: cc
# --
(condition-case $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: copy-directory
#key: copy-directory
#key: cd
# contributor: Xah Lee (XahLee.org)
# name: copy-directory
# key: copy-directory
# key: cd
# --
(copy-directory ${1:directory} {2:target}${3: keep-time}${4: parents})

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: copy-file
#key: copy-file
#key: cf
# contributor: Xah Lee (XahLee.org)
# name: copy-file
# key: copy-file
# key: cf
# --
(copy-file ${1:filename} ${2:newname}${3: ok-if-already-exists}${4: keep-time}{5: preserve-uid-gid})

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: current-buffer
#key: current-buffer
#key: cb
# contributor: Xah Lee (XahLee.org)
# name: current-buffer
# key: current-buffer
# key: cb
# --
(current-buffer)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: custom-autoload
#key: custom-autoload
#key: ca
# contributor: Xah Lee (XahLee.org)
# name: custom-autoload
# key: custom-autoload
# key: ca
# --
(custom-autoload ${1:symbol} ${2:load}${3: noset})

View File

@ -1,5 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: defalias
#key: defalias
# contributor: Xah Lee (XahLee.org)
# name: defalias
# key: defalias
# --
(defalias '${1:symbol} '${2:alias}${3: "docstring"})

View File

@ -1,5 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: defcustom
#key: defcustom
# contributor: Xah Lee (XahLee.org)
# name: defcustom
# key: defcustom
# --
(defcustom ${1:symbol} ${2:standard} "${3:docstring}"${4: args})

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: define-key
#key: define-key
#key: dk
# contributor: Xah Lee (XahLee.org)
# name: define-key
# key: define-key
# key: dk
# --
(define-key ${1:mode}-map (kbd "${2:key}") $0)

View File

@ -1,4 +1,4 @@
#name: defvar
#key: defvar
# name: defvar
# key: defvar
# --
(defvar ${1:symbol} ${2:initvalue} "${3:docstring}")

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: delete-char
#key: delete-char
#key: dc
# contributor: Xah Lee (XahLee.org)
# name: delete-char
# key: delete-char
# key: dc
# --
(delete-char $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: delete-directory
#key: delete-directory
#key: dd
# contributor: Xah Lee (XahLee.org)
# name: delete-directory
# key: delete-directory
# key: dd
# --
(delete-directory ${1:dicretory}${2: recursive})

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: delete-file
#key: delete-file
#key: df
# contributor: Xah Lee (XahLee.org)
# name: delete-file
# key: delete-file
# key: df
# --
(delete-file $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: delete-region
#key: delete-region
#key: dr
# contributor: Xah Lee (XahLee.org)
# name: delete-region
# key: delete-region
# key: dr
# --
(delete-region $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: directory-files
#key: directory-files
#key: df
# contributor: Xah Lee (XahLee.org)
# name: directory-files
# key: directory-files
# key: df
# --
(directory-files ${1:directory}${2: full}${3: match}${4: nosort})

View File

@ -1,5 +1,5 @@
#name : process marked files in dired
#contributor : Xah Lee
# name: process marked files in dired
# contributor : Xah Lee
# --
;; idiom for processing a list of files in dired's marked files

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: end-of-line
#key: end-of-line
#key: eol
# contributor: Xah Lee (XahLee.org)
# name: end-of-line
# key: end-of-line
# key: eol
# --
(end-of-line)

View File

@ -1,5 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: error
#key: error
# contributor: Xah Lee (XahLee.org)
# name: error
# key: error
# --
(error "${1:message}"${2: format-args})

View File

@ -1,7 +1,7 @@
# -*- mode: snippet -*-
#contributor: Raghav Kumar Gautam
#name: ert-deftest
#key: edt
# contributor: Raghav Kumar Gautam
# name: ert-deftest
# key: edt
# --
(ert-deftest ${1:test-name} ()
$0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: expand-file-name
#key: expand-file-name
#key: efn
# contributor: Xah Lee (XahLee.org)
# name: expand-file-name
# key: expand-file-name
# key: efn
# --
(expand-file-name $0)

View File

@ -1,5 +1,5 @@
#contributor: Xah Lee (XahLee.org)
#name: fboundp
#key: fboundp
# contributor: Xah Lee (XahLee.org)
# name: fboundp
# key: fboundp
# --
(fboundp '$0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: file-name-directory
#key: file-name-directory
#key: fnd
# contributor: Xah Lee (XahLee.org)
# name: file-name-directory
# key: file-name-directory
# key: fnd
# --
(file-name-directory $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: file-name-extension
#key: file-name-extension
#key: fne
# contributor: Xah Lee (XahLee.org)
# name: file-name-extension
# key: file-name-extension
# key: fne
# --
(file-name-extension ${1:filename}${2: period})

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: file-name-nondirectory
#key: file-name-nondirectory
#key: fnn
# contributor: Xah Lee (XahLee.org)
# name: file-name-nondirectory
# key: file-name-nondirectory
# key: fnn
# --
(file-name-nondirectory $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: file-name-sans-extension
#key: file-name-sans-extension
#key: fnse
# contributor: Xah Lee (XahLee.org)
# name: file-name-sans-extension
# key: file-name-sans-extension
# key: fnse
# --
(file-name-sans-extension $0)

View File

@ -1,6 +1,6 @@
#contributor: Xah Lee (XahLee.org)
#name: file-relative-name
#key: file-relative-name
#key: frn
# contributor: Xah Lee (XahLee.org)
# name: file-relative-name
# key: file-relative-name
# key: frn
# --
(file-relative-name $0)

View File

@ -1,5 +1,5 @@
#name : a function that process a file
#contributor : Xah Lee
# name: a function that process a file
# contributor : Xah Lee
# --
(defun doThisFile (fpath)
"Process the file at path FPATH ..."

View File

@ -1,5 +1,5 @@
#name : read lines of a file
#contributor : Xah Lee
# name: read lines of a file
# contributor : Xah Lee
# --
(defun read-lines (filePath)
"Return a list of lines in FILEPATH."

Some files were not shown because too many files have changed in this diff Show More