Skip to content

Instantly share code, notes, and snippets.

View Fuco1's full-sized avatar
🕶️
Configuring Emacs

Matus Goljer Fuco1

🕶️
Configuring Emacs
View GitHub Profile
@Fuco1
Fuco1 / Cask
Last active March 14, 2023 16:42
eask test
(package "eask-test"
"1.0.0"
"")
(package-file "eask-test.el")
(source gnu)
(source melpa)
(depends-on "emacs" "26.1")
@Fuco1
Fuco1 / magit-filter.el
Created June 10, 2019 14:24
ANSI-aware magit-process-filter
(defun magit-process-filter (proc string)
"Default filter used by `magit-start-process'."
(with-current-buffer (process-buffer proc)
(let ((inhibit-read-only t))
(magit-process-yes-or-no-prompt proc string)
(magit-process-username-prompt proc string)
(magit-process-password-prompt proc string)
(goto-char (process-mark proc))
(setq string (propertize string 'magit-section
(process-get proc 'section)))
> cask exec elsa pomidor.el
pomidor.el:69:49:error:Argument 1 accepts type String but received Mixed
pomidor.el:74:49:error:Argument 1 accepts type String but received Mixed
pomidor.el:79:53:error:Argument 1 accepts type String but received Mixed
pomidor.el:84:55:error:Argument 1 accepts type String but received Mixed
pomidor.el:90:22:error:Argument 1 accepts type String but received Unbound
pomidor.el:113:27:error:Reference to free variable `pomidor-default-alert'.
pomidor.el:125:22:error:Argument 1 accepts type (Cons Mixed Mixed)? but received Unbound
pomidor.el:131:37:error:Reference to free variable `pomidor-play-sound-file-emacs'.
pomidor.el:141:9:error:Reference to free variable `pomidor-time-face'.

Motions

  • forward
  • backward
  • next
  • previous
  • down
    • forward
    • backward
  • up
@Fuco1
Fuco1 / test.md
Created September 1, 2018 11:56
python -c 'import os; os.execvp(\'emacs\', [\'emacs\', \'-batch\', \'-eval\', \'(progn (print "start") (princ "foo") (sit-for 5) (princ "\n"))\'])'

print method puts newline at the end automatically, princ does not. The above prints "start" then foo which I can't see only after 5 seconds when the newline is printed.

stdbuf -o0 python -c 'import os; os.execvp(\'emacs\', [\'emacs\', \'-batch\', \'-eval\', \'(progn (print "start") (princ "foo") (sit-for 5) (princ "\
n"))\'])'
@Fuco1
Fuco1 / smartparens-elsa-analysis-1
Created August 11, 2018 13:31
Elsa on Smartparens
[15:22:15]matus@herakleitos:~/.emacs.d/projects/smartparens
> time cask exec elsa smartparens.el
86:9:error:Argument 1 accepts type Symbol but received Mixed
93:18:error:Argument 2 accepts type Mixed but received Unbound
93:18:error:Argument 3 accepts type Mixed but received Unbound
93:18:error:Argument 4 accepts type Mixed but received Unbound
94:45:error:Argument 2 accepts type Mixed but received Unbound
131:37:error:Argument 1 accepts type Cons Mixed Mixed? but received Mixed
132:36:error:Argument 1 accepts type Mixed but received Unbound
@Fuco1
Fuco1 / trinary.el
Created June 26, 2018 15:16
Trinary logic
(defconst trinary--true 1)
(defconst trinary--maybe 0)
(defconst trinary--false -1)
(defun trinary-print (value)
(let ((x (trinary-value-value value)))
(cond
((= x trinary--false) "F")
((= x trinary--maybe) "?")
((= x trinary--true) "T")))

The columns mean: date, amount, cost per share, cost total, running sum of all shares, running cost of the position, the rest is in english :)

DatumPocetNakupCenaΣ PocetΣ CenaAvgEPSP/EDivYieldYOCIncome
[2016-01-27 Wed]995.00855.0009.000855.00095.0009.47010.0322.082.1892.18918.720
[2016-04-29 Fri]1193.001023.00020.0001878.00093.9008.9910.3452.282.4522.42845.600
[2016-09-16 Fri]-20116.00-2320.0000.000-442.000-inf8.9912.9032.281.966-0.0000.000
$configurator->createRobotLoader()
->addDirectory($appDir)
->addDirectory(__DIR__ . '/Utils')
->register();
// zmenit na => (pridat .phpt scan)
$robotLoader = $configurator->createRobotLoader();
$robotLoader->acceptFiles = '*.php, *.phpt';
$robotLoader->addDirectory($appDir)
@Fuco1
Fuco1 / README.md
Last active November 9, 2017 12:04
org-graph

Relations

Relations are maintained through the outline hierarchy and special properties on the entries so we can model arbitrary graphs instead of only DAGs. This means you can define parents or children completely outside the hierarchy or even in different files.

Relations are kept in sync bidirectionally so please only use the API to maintain them otherwise things might get lost. Because the relations are bidirectional the graph traversal and querying is extremly fast.

Parents

Parents are defined by the GRAPH_PARENTS property as list of IDs and implicitly through the org outline hierarchy: all headlines above this one are this entry's parents.