Compare commits
913 Commits
literate
...
production
Author | SHA1 | Date |
---|---|---|
contrapunctus | babf615646 | |
contrapunctus | 76d472b0e0 | |
contrapunctus | ce435b0993 | |
contrapunctus | 3e04ea14bc | |
contrapunctus | e71ce0b7e9 | |
contrapunctus | 058fe309b1 | |
contrapunctus | 1d2ad549a7 | |
contrapunctus | 144f5ec579 | |
contrapunctus | e456bec299 | |
contrapunctus | 331d8e9297 | |
contrapunctus | fb9da3127e | |
contrapunctus | bc396c2457 | |
contrapunctus | e88aa9065a | |
contrapunctus | 4558eff538 | |
contrapunctus | e276088bdd | |
contrapunctus | c07b75be77 | |
contrapunctus | 3dd83b56bd | |
contrapunctus | d4dd016038 | |
contrapunctus | bd2cef2768 | |
contrapunctus | 8e71ce4132 | |
contrapunctus | e8e6d30973 | |
contrapunctus | 0b2c730329 | |
contrapunctus | e0e48a0f6d | |
contrapunctus | a04e8cbeeb | |
contrapunctus | 602f0cb5f3 | |
contrapunctus | d9a464fbb3 | |
contrapunctus | 67dec47813 | |
contrapunctus | 8493fa51a3 | |
contrapunctus | 8742f36642 | |
contrapunctus | a6aa231074 | |
contrapunctus | 1cc5f314c6 | |
contrapunctus | ee9d074d06 | |
contrapunctus | 5a811e25c0 | |
contrapunctus | 8a24fef78c | |
contrapunctus | 88702cd3b9 | |
contrapunctus | 3763330305 | |
contrapunctus | bd5c2c6681 | |
contrapunctus | 56ffef857f | |
contrapunctus | 063e5561bf | |
contrapunctus | c18c1ad5e5 | |
contrapunctus | 154294c5f2 | |
contrapunctus | d3416185e2 | |
contrapunctus | 6da9e69eb0 | |
contrapunctus | ec78217480 | |
contrapunctus | 3f73f871e6 | |
contrapunctus | 542e859b8a | |
contrapunctus | 5d8562e43d | |
contrapunctus | 3faf36b9e3 | |
contrapunctus | 3d19def8f7 | |
contrapunctus | 965dea65c0 | |
contrapunctus | 716f2f0373 | |
contrapunctus | d8dd88abf6 | |
contrapunctus | 9a6a5af1ce | |
contrapunctus | e2b77f733c | |
contrapunctus | bfa14d2bff | |
contrapunctus | c5ea259ee7 | |
contrapunctus | fedd63991a | |
contrapunctus | 93555e80de | |
contrapunctus | 165d57ce1b | |
contrapunctus | 36a81c2797 | |
contrapunctus | 821d1bf726 | |
contrapunctus | 5fe8404c96 | |
contrapunctus | 2a62bc002a | |
contrapunctus | 4e4f5007e9 | |
contrapunctus | 98803acc44 | |
contrapunctus | b3ba6fa0b7 | |
contrapunctus | efda63da09 | |
contrapunctus | bc60d3a17d | |
contrapunctus | e12093d610 | |
contrapunctus | d14d465446 | |
contrapunctus | ffafda8b4e | |
contrapunctus | d9d2a773b3 | |
contrapunctus | 36e750c5ba | |
contrapunctus | 300bb816c8 | |
contrapunctus | 805ad94865 | |
contrapunctus | 0cc6325f12 | |
contrapunctus | 3fb9362383 | |
contrapunctus | 82252dbb27 | |
contrapunctus | 82fb4d6cca | |
contrapunctus | 62dd826b39 | |
contrapunctus | 1905951cab | |
contrapunctus | d4fafb46e7 | |
contrapunctus | 4587bada07 | |
contrapunctus | aa5e499843 | |
contrapunctus | e6e47744b5 | |
contrapunctus | d2a7518b5d | |
contrapunctus | 92a9640f27 | |
contrapunctus | 255983c9fe | |
contrapunctus | a4e02eda2f | |
contrapunctus | c4b8caf520 | |
contrapunctus | ce729a0187 | |
contrapunctus | f6b5a225de | |
contrapunctus | a63c2ff7dc | |
contrapunctus | 8644811ecb | |
contrapunctus | d404225e88 | |
contrapunctus | bbfa909491 | |
contrapunctus | 5917720e6b | |
contrapunctus | bcde1f070c | |
contrapunctus | bf08e6d5b2 | |
contrapunctus | 49acc72827 | |
contrapunctus | 8552780d80 | |
contrapunctus | 5a4afe9579 | |
contrapunctus | 2a929c87c7 | |
contrapunctus | 32d7a5eafd | |
contrapunctus | f7f91a2275 | |
contrapunctus | 5a0afc2c8f | |
contrapunctus | daf0a270af | |
contrapunctus | 1a94e00712 | |
contrapunctus | d966e0868f | |
contrapunctus | a16736ee43 | |
contrapunctus | e55008c430 | |
contrapunctus | 9871aace1a | |
contrapunctus | 13edd13ba5 | |
contrapunctus | 49ac8e1e5d | |
contrapunctus | 9d0d04cee4 | |
contrapunctus | 80a0460fc3 | |
contrapunctus | 940d829bc6 | |
contrapunctus | 4c68fd40fc | |
contrapunctus | 24a37e6e59 | |
contrapunctus | d6940b2da9 | |
contrapunctus | 500b983242 | |
contrapunctus | 84d468e7bc | |
contrapunctus | 6cedc1c67d | |
contrapunctus | b737a0b543 | |
contrapunctus | a3622b1f99 | |
contrapunctus | 29bc996efa | |
contrapunctus | ec4bf47843 | |
contrapunctus | 0056d41153 | |
contrapunctus | fd992f16ce | |
contrapunctus | 4256ae0e8c | |
contrapunctus | 5f5e201ec2 | |
contrapunctus | 9f583f7616 | |
contrapunctus | f1931a7768 | |
contrapunctus | 3b97dbdcb0 | |
contrapunctus | e95ff9421e | |
contrapunctus | 0bba0c8aa3 | |
contrapunctus | c61fce7b3d | |
contrapunctus | 7ff58a141a | |
contrapunctus | 9db245093d | |
contrapunctus | 9a2675f6fb | |
contrapunctus | 1f349676eb | |
contrapunctus | 922fd20f3b | |
contrapunctus | b60870fd37 | |
contrapunctus | 4d434a54f8 | |
contrapunctus | ce55d120d9 | |
contrapunctus | 825613f6c6 | |
contrapunctus | 1ee8c8adb7 | |
contrapunctus | 8e59fc7d5a | |
contrapunctus | e7aa11ea10 | |
contrapunctus | 060c6a91f8 | |
contrapunctus | 9013637999 | |
contrapunctus | 171bd11cef | |
contrapunctus | 2962f8b669 | |
contrapunctus | e49fe07fc6 | |
contrapunctus | 06704bee4e | |
contrapunctus | fa3c501408 | |
contrapunctus | b302052dbb | |
contrapunctus | 8a267574ab | |
contrapunctus | 7e4fdaf93d | |
contrapunctus | 3e6eaa7524 | |
contrapunctus | 095460670c | |
contrapunctus | 3bd9335a76 | |
contrapunctus | 4da3d07eb4 | |
contrapunctus | fb06810c66 | |
contrapunctus | b461d1e41a | |
contrapunctus | 3d74494a5d | |
contrapunctus | 6c154cda40 | |
contrapunctus | 51ec6352a1 | |
contrapunctus | 9e85e600b6 | |
contrapunctus | 261184be43 | |
contrapunctus | a92e786331 | |
contrapunctus | 0a047c8d7a | |
contrapunctus | db13c38f17 | |
contrapunctus | 182c0f01a3 | |
contrapunctus | a60aeaa915 | |
contrapunctus | 8d141c9867 | |
contrapunctus | 4f36d525d5 | |
contrapunctus | eef145c3cb | |
contrapunctus | 98b054e240 | |
contrapunctus | c17c35cbaf | |
contrapunctus | aedcc4600f | |
contrapunctus | f7a6c1e30a | |
contrapunctus | d419b9a901 | |
contrapunctus | 36759d7dfe | |
contrapunctus | 2eef05cb80 | |
contrapunctus | a3577588bb | |
contrapunctus | 9cfc2a433c | |
contrapunctus | 68d7aee35c | |
contrapunctus | 5fd4be9f85 | |
contrapunctus | 3021215afa | |
contrapunctus | 2b26a782b7 | |
contrapunctus | 6af600db1b | |
contrapunctus | bd57f0d03e | |
contrapunctus | 93d75f0b2a | |
contrapunctus | 5b5b2fd41b | |
contrapunctus | f9ae684967 | |
contrapunctus | 05ea748538 | |
contrapunctus | 5b1c670b1b | |
contrapunctus | d348a2b4cc | |
contrapunctus | e5827408e1 | |
contrapunctus | 6d82212760 | |
contrapunctus | 15080c1372 | |
contrapunctus | 6bfebe5b51 | |
contrapunctus | ea55857cd3 | |
contrapunctus | edf7b828d5 | |
contrapunctus | 24d837f6ca | |
contrapunctus | 5c8989bfe2 | |
contrapunctus | 64a18add12 | |
contrapunctus | 2876f4ed0f | |
contrapunctus | dc6a05440e | |
contrapunctus | dc4095c505 | |
contrapunctus | fad24f9910 | |
contrapunctus | 5c02744cc0 | |
contrapunctus | b79ef3edaa | |
contrapunctus | 22e297ba0f | |
contrapunctus | 7aedd2b6fd | |
contrapunctus | 081f338b50 | |
contrapunctus | b713fe1efa | |
contrapunctus | e7f90c1b0d | |
contrapunctus | 96f033220f | |
contrapunctus | a64cbe5310 | |
contrapunctus | 2662ba9489 | |
contrapunctus | 4d83ee32c2 | |
contrapunctus | 7e5f058fae | |
contrapunctus | a95a7ec521 | |
contrapunctus | 60b79410fe | |
contrapunctus | 065a89234a | |
contrapunctus | 61668fbe8b | |
contrapunctus | ad8ee289c4 | |
contrapunctus | c2de0faffc | |
contrapunctus | 74995b3a7e | |
contrapunctus | 1dce14455f | |
contrapunctus | 02315b1b8b | |
contrapunctus | 0cbfa4c24c | |
contrapunctus | 6d85a1d42e | |
contrapunctus | d65bd41cac | |
contrapunctus | b9fd71965c | |
contrapunctus | 92fca31eca | |
contrapunctus | ca34e0c509 | |
contrapunctus | 9054ce9071 | |
contrapunctus | 59fbab31e2 | |
contrapunctus | df7ee7d684 | |
contrapunctus | 38077b5313 | |
contrapunctus | 952012182c | |
contrapunctus | bfeeef02ce | |
contrapunctus | 2bd9910080 | |
contrapunctus | e855eeca3d | |
contrapunctus | 2244f39f51 | |
contrapunctus | 210aa37df8 | |
contrapunctus | 2f19538913 | |
contrapunctus | 73d9959a52 | |
contrapunctus | dc738b849b | |
contrapunctus | f011b31c56 | |
contrapunctus | 15a2d0a475 | |
contrapunctus | 21e42234b0 | |
contrapunctus | c436539446 | |
contrapunctus | 22ce684297 | |
contrapunctus | 7651d2f592 | |
contrapunctus | 13acd66c78 | |
contrapunctus | 7481a65db1 | |
contrapunctus | 065469efdb | |
contrapunctus | 6959d557b3 | |
contrapunctus | bf3ea9abc1 | |
contrapunctus | 11865af0b7 | |
contrapunctus | ee7347c516 | |
contrapunctus | f5121d50dd | |
contrapunctus | 381b74304b | |
contrapunctus | ee19410056 | |
contrapunctus | 13aca6aea8 | |
contrapunctus | 364753b025 | |
contrapunctus | 663a5cf76a | |
contrapunctus | d0a85f8b88 | |
contrapunctus | bfc5ca2b5a | |
contrapunctus | 0564bde343 | |
contrapunctus | 671b7c2ab6 | |
contrapunctus | 67e5bbda66 | |
contrapunctus | c51ecd08b8 | |
contrapunctus | 57bbbdb701 | |
contrapunctus | c0adf42577 | |
contrapunctus | f56f8fe182 | |
contrapunctus | 2956ec4f27 | |
contrapunctus | cf98d4e53f | |
contrapunctus | f00012df16 | |
contrapunctus | b3d08694d0 | |
contrapunctus | ffce737819 | |
contrapunctus | ba2db8d6c8 | |
contrapunctus | 6a707d8468 | |
contrapunctus | e3584f2712 | |
contrapunctus | 6760668c4c | |
contrapunctus | 6beef200ff | |
contrapunctus | 4fff1af7ad | |
contrapunctus | 61906a14a8 | |
contrapunctus | 31e185f669 | |
contrapunctus | 9438bf2d25 | |
contrapunctus | 81a4ff624e | |
contrapunctus | c95e364c30 | |
contrapunctus | 257da23a01 | |
contrapunctus | 752c0e41a6 | |
contrapunctus | f11a55851f | |
contrapunctus | d78ef06fb3 | |
contrapunctus | 7320598352 | |
contrapunctus | 3b33079d42 | |
contrapunctus | 7f183de07d | |
contrapunctus | aee17834e2 | |
contrapunctus | d906a78c02 | |
contrapunctus | 4178488f64 | |
contrapunctus | 8e83db5b58 | |
contrapunctus | 62689ca339 | |
contrapunctus | 18d307d0dd | |
contrapunctus | 053a818622 | |
contrapunctus | 60297d870a | |
contrapunctus | 64f1755755 | |
contrapunctus | d9f31b9e0b | |
contrapunctus | 8a42f22b59 | |
contrapunctus | b3bd77ae53 | |
contrapunctus | a2d25a60ed | |
contrapunctus | ce4ade6e25 | |
contrapunctus | be8753ce8a | |
contrapunctus | 11dd43bcd5 | |
contrapunctus | f257c5921d | |
contrapunctus | a92c571a40 | |
contrapunctus | 507452d412 | |
contrapunctus | 79a23641b7 | |
contrapunctus | 3e3392fda6 | |
contrapunctus | ebd40d8d8f | |
contrapunctus | ad47f5df1f | |
contrapunctus | 62201a5579 | |
contrapunctus | b129daa1d5 | |
contrapunctus | 26d06fec15 | |
contrapunctus | d7858cc50a | |
contrapunctus | 9b9c28b542 | |
contrapunctus | 3ae8385c70 | |
contrapunctus | b4429a1e69 | |
contrapunctus | 9ee8302a6b | |
contrapunctus | 24f1812ec5 | |
contrapunctus | cf789f9113 | |
contrapunctus | 6a98469ee5 | |
contrapunctus | 6e08bacd71 | |
contrapunctus | 092cd73eaf | |
contrapunctus | 441f415a66 | |
contrapunctus | 2d9b6b8557 | |
contrapunctus | 1fd76b849a | |
contrapunctus | 605ce6f748 | |
contrapunctus | c3ba59fc83 | |
contrapunctus | 8f55255e40 | |
contrapunctus | c960da5d18 | |
contrapunctus | 1edfe873b2 | |
contrapunctus | 766557dbde | |
contrapunctus | 1c1c5fcc80 | |
contrapunctus | ea59097345 | |
contrapunctus | 7002441fcb | |
contrapunctus | 80e05d4aea | |
contrapunctus | b352e0c54a | |
contrapunctus | 903bfa4691 | |
contrapunctus | 6ab8685c3e | |
contrapunctus | c90545730c | |
contrapunctus | 469eeda81f | |
contrapunctus | 83f7432f83 | |
contrapunctus | 01fa2dacc9 | |
contrapunctus | 03da080201 | |
contrapunctus | 0f31a600ea | |
contrapunctus | e8d86308d8 | |
contrapunctus | eba98d6df5 | |
contrapunctus | 1ad9b02f1a | |
contrapunctus | 2e0af9dd83 | |
contrapunctus | fafec65119 | |
contrapunctus | 213553dbdd | |
contrapunctus | 52e647f539 | |
contrapunctus | 42172ec5c0 | |
contrapunctus | 2c64fdfba8 | |
contrapunctus | 6505e37717 | |
contrapunctus | 870c97e17d | |
contrapunctus | d0ffc43e5a | |
contrapunctus | 490d7545ff | |
contrapunctus | dfbf09b7d7 | |
contrapunctus | cc3a391f3f | |
contrapunctus | eaafa81426 | |
contrapunctus | 5297415cf3 | |
contrapunctus | 30fbaa5462 | |
contrapunctus | 76bd0ef616 | |
contrapunctus | bc4830cf1b | |
contrapunctus | 3e89589acb | |
contrapunctus | 0de25c5ffc | |
contrapunctus | 3780b60625 | |
contrapunctus | 859ddf7674 | |
contrapunctus | 6517f3ebe4 | |
contrapunctus | f0ddf36db9 | |
contrapunctus | 0c4d1a0361 | |
contrapunctus | 0e749bdb1d | |
contrapunctus | 0a8e1d8268 | |
contrapunctus | f6b2bacffd | |
contrapunctus | b90f9f0216 | |
contrapunctus | 81fb144e60 | |
contrapunctus | 38145abee7 | |
contrapunctus | c438daa190 | |
contrapunctus | ca96cde0d1 | |
contrapunctus | fbe7926ce0 | |
contrapunctus | 0ceb8e43bc | |
contrapunctus | 019c53b08e | |
contrapunctus | 123cc7c422 | |
contrapunctus | 50014f4b99 | |
contrapunctus | 19129eae62 | |
contrapunctus | b29c6054cd | |
contrapunctus | b365aac259 | |
contrapunctus | 6623a59e04 | |
contrapunctus | 31da5dcf03 | |
contrapunctus | 073d7ce234 | |
contrapunctus | 8b0249e95c | |
contrapunctus | 32e1292e1e | |
contrapunctus | 3f43f65198 | |
contrapunctus | d10eef4840 | |
contrapunctus | b98c362e22 | |
contrapunctus | 1f7dfe2c94 | |
contrapunctus | 728476fbe8 | |
contrapunctus | 85e401f4ed | |
contrapunctus | 5a19d3bc36 | |
contrapunctus | 5c3a7419a9 | |
contrapunctus | 4085bf94da | |
contrapunctus | 7b8e87efcb | |
contrapunctus | b3734d4455 | |
contrapunctus | a6ec0aed9a | |
contrapunctus | 52a116fa05 | |
contrapunctus | f06c37d8c6 | |
contrapunctus | 23b3a33d17 | |
contrapunctus | d2ae421a7a | |
contrapunctus | e65c0837c6 | |
contrapunctus | 38f29f9d47 | |
contrapunctus | b015f19942 | |
contrapunctus | 32bf0ea458 | |
contrapunctus | 334b422dc6 | |
contrapunctus | 0c9aaffd9f | |
contrapunctus | 96aa0f86ea | |
contrapunctus | 07c83847a0 | |
contrapunctus | 585ca01285 | |
contrapunctus | e18f66752d | |
contrapunctus | 4196d515b1 | |
contrapunctus | 712a604544 | |
contrapunctus | 83f52f3c84 | |
contrapunctus | b8e9db537c | |
contrapunctus | 35f8b1bc05 | |
contrapunctus | b2055090d2 | |
contrapunctus | 902268f913 | |
contrapunctus | 9680150f28 | |
contrapunctus | 16a5f70e6c | |
contrapunctus | e2feccc902 | |
contrapunctus | 92a5c08279 | |
contrapunctus | 5ed54066db | |
contrapunctus | d67dae2918 | |
contrapunctus | 6e9f1c60ab | |
contrapunctus | 36be73cacd | |
contrapunctus | 20c5e08fd0 | |
contrapunctus | 188d365629 | |
contrapunctus | f1eb05270f | |
contrapunctus | 036a7388b6 | |
contrapunctus | 4370fa6a10 | |
contrapunctus | 55a667bca8 | |
contrapunctus | a746b5c29a | |
contrapunctus | e484313852 | |
contrapunctus | 033937f5d6 | |
contrapunctus | 468b3cd56f | |
contrapunctus | 5eec48b77c | |
contrapunctus | 87060061cb | |
contrapunctus | 102bb66bba | |
contrapunctus | 93d1433333 | |
contrapunctus | 191eb0e5f5 | |
contrapunctus | 910f40b242 | |
contrapunctus | 6b28298ac8 | |
contrapunctus | 42df0371b2 | |
contrapunctus | f33cc7cf80 | |
contrapunctus | 35c841e668 | |
contrapunctus | 65d8e8e954 | |
contrapunctus | e1309d59b9 | |
contrapunctus | 7bf9df4c83 | |
contrapunctus | 68386ab2c4 | |
contrapunctus | 418a6a3bc8 | |
contrapunctus | 26cd72b160 | |
contrapunctus | a36d9a221f | |
contrapunctus | 0d8c5ce893 | |
contrapunctus | 451a7ed012 | |
contrapunctus | 8c6bbdf518 | |
contrapunctus | ee5f90dcca | |
contrapunctus | fb8bc8fc7a | |
contrapunctus | 7b394c2192 | |
contrapunctus | 2e50afd431 | |
contrapunctus | e20ed27cab | |
contrapunctus | 1aa15a842c | |
contrapunctus | 64a4cdef7a | |
contrapunctus | a4bff2032a | |
contrapunctus | ef2b9950ac | |
contrapunctus | 13a31da9a0 | |
contrapunctus | 5c546104cf | |
contrapunctus | 66979d8104 | |
contrapunctus | fb7a1319c9 | |
contrapunctus | 5d8cdfbc51 | |
contrapunctus | 5f601c504c | |
contrapunctus | c730d2e1fa | |
contrapunctus | 418596c895 | |
contrapunctus | 2427f2b4d1 | |
contrapunctus | 7211ff438e | |
contrapunctus | 67ac9dba5d | |
contrapunctus | c43933b6cf | |
contrapunctus | d9bc25796d | |
contrapunctus | edbedbf907 | |
contrapunctus | ffff738225 | |
contrapunctus | c5fcac33a9 | |
contrapunctus | 13e884b870 | |
contrapunctus | 9cd08478ed | |
contrapunctus | c016ef5021 | |
contrapunctus | 795527eff7 | |
contrapunctus | b829d95293 | |
contrapunctus | 2e4814eb25 | |
contrapunctus | cd07480db8 | |
contrapunctus | 1a4313f02c | |
contrapunctus | 679d5d7c83 | |
contrapunctus | fb234ed7ee | |
contrapunctus | f09426d0db | |
contrapunctus | 80b9874d49 | |
contrapunctus | 4dc09324b3 | |
contrapunctus | 1e6660d73a | |
contrapunctus | c50a1fcccc | |
contrapunctus | 8b618e5f61 | |
contrapunctus | f238a03085 | |
contrapunctus | 3e406a715a | |
contrapunctus | fc5eca36a3 | |
contrapunctus | e635a5fa31 | |
contrapunctus | 58efa3da8b | |
contrapunctus | c7c54cafd0 | |
contrapunctus | 15829f5459 | |
contrapunctus | 321517a863 | |
contrapunctus | 38324e0cdd | |
contrapunctus | ff6207dcef | |
contrapunctus | b90362e312 | |
contrapunctus | f028e9cc60 | |
contrapunctus | 37d6149fb8 | |
contrapunctus | ea71f9a905 | |
contrapunctus | e7f8c4aea9 | |
contrapunctus | 6bcafade0e | |
contrapunctus | dfacd9ded4 | |
contrapunctus | 9322272b54 | |
contrapunctus | f705206452 | |
contrapunctus | 5a844c00ce | |
contrapunctus | 1a120e251e | |
contrapunctus | 5271489cab | |
contrapunctus | 5171cc2d9a | |
contrapunctus | b593eb323b | |
contrapunctus | 53c99c9667 | |
contrapunctus | d50fd5722a | |
contrapunctus | 83c2e854d5 | |
contrapunctus | a35e24bae3 | |
contrapunctus | 8f61851548 | |
contrapunctus | ac68b41bfd | |
contrapunctus | 73a2ce45f4 | |
contrapunctus | 0e1897c6f7 | |
contrapunctus | 2f3992fdc1 | |
contrapunctus | bfbb95eaa2 | |
contrapunctus | 7d25c64eb0 | |
contrapunctus | f25acf3abb | |
contrapunctus | a7e48011c7 | |
contrapunctus | ffd5d265b6 | |
contrapunctus | 2300f0b948 | |
contrapunctus | e256fd115d | |
contrapunctus | b9ed987fd4 | |
contrapunctus | 150764aa2e | |
contrapunctus | a4517fdd58 | |
contrapunctus | 498f17049a | |
contrapunctus | 87b3acb009 | |
contrapunctus | 023c883031 | |
contrapunctus | b99b0d2221 | |
contrapunctus | c2d8c4cd9e | |
contrapunctus | d7e5a0988b | |
contrapunctus | f06ddeb7a1 | |
contrapunctus | 0bc111a4f1 | |
contrapunctus | 8e6ced554b | |
contrapunctus | 14ae91ab21 | |
contrapunctus | 8484fff8b3 | |
contrapunctus | 8f5ef93023 | |
contrapunctus | 7d6e7d823a | |
contrapunctus | f507db8d66 | |
contrapunctus | 648f871f4e | |
contrapunctus | 137c525f43 | |
contrapunctus | 7f49e83a9b | |
contrapunctus | d753be5599 | |
contrapunctus | 5257568556 | |
contrapunctus | d9abd04b0d | |
contrapunctus | 6e78eaf6a9 | |
contrapunctus | 2297bb7393 | |
contrapunctus | 30f5ea3952 | |
contrapunctus | bef33c417a | |
contrapunctus | bbd6926886 | |
contrapunctus | 9600a81e7e | |
contrapunctus | 26cc83d2da | |
contrapunctus | 5d9119f3bf | |
contrapunctus | 3c3cd1fccd | |
contrapunctus | e1ff63a8ef | |
contrapunctus | f83ba1891e | |
contrapunctus | 02694968ee | |
contrapunctus | 1534d70644 | |
contrapunctus | cf70eed1aa | |
contrapunctus | 2ec4f7cadf | |
contrapunctus | a5feb7de11 | |
contrapunctus | 9555eb2e90 | |
contrapunctus | f25d825d5f | |
contrapunctus | a28b8e74c8 | |
contrapunctus | 38e615eee8 | |
contrapunctus | 4ace157e96 | |
contrapunctus | 457ba0b886 | |
contrapunctus | c909deb9cb | |
contrapunctus | 776a737c04 | |
contrapunctus | efdd14695a | |
contrapunctus | 306dd277ea | |
contrapunctus | f56e420101 | |
contrapunctus | 346a9b3802 | |
contrapunctus | 3e7522f6d6 | |
contrapunctus | aeb78321b1 | |
contrapunctus | 544063a8a5 | |
contrapunctus | c48015832e | |
contrapunctus | a7bec1d10d | |
contrapunctus | 18769a28b2 | |
contrapunctus | 9372fb7bb0 | |
contrapunctus | 446d5e3f28 | |
contrapunctus | a3fa9602c0 | |
contrapunctus | c3010ec944 | |
contrapunctus | ad0ab58af9 | |
contrapunctus | dcd47d5490 | |
contrapunctus | ceca6912a7 | |
contrapunctus | 89e2ac50ff | |
contrapunctus | 5474584bdf | |
contrapunctus | a9509793ab | |
contrapunctus | d67741ce09 | |
contrapunctus | bde5e8076f | |
contrapunctus | bf7c67e711 | |
contrapunctus | c88521ed6c | |
contrapunctus | 6f8150cc7d | |
contrapunctus | 3e165ce115 | |
contrapunctus | 51ee3842a3 | |
contrapunctus | b64cfeef64 | |
contrapunctus | 463db6d685 | |
contrapunctus | 56ea4d2d29 | |
contrapunctus | cc65c02dc5 | |
contrapunctus | c5df847dc5 | |
contrapunctus | 85eb74a0a2 | |
contrapunctus | 2b2bf26a2f | |
contrapunctus | b76049d21c | |
contrapunctus | 631d7e0fa6 | |
contrapunctus | 7807d4a133 | |
contrapunctus | 57a74fb6c4 | |
contrapunctus | 60b60f73a7 | |
contrapunctus | 2a4ee6ec71 | |
contrapunctus | 8a5158a3b8 | |
contrapunctus | 101d74779a | |
contrapunctus | 94cf603750 | |
contrapunctus | 5ff5547327 | |
contrapunctus | 3faa88bc40 | |
contrapunctus | b8ff880ee1 | |
contrapunctus | ca88612ee0 | |
contrapunctus | 7f58526967 | |
contrapunctus | 64563bef4f | |
contrapunctus | 8c443fc44d | |
contrapunctus | 3de833ab8c | |
contrapunctus | 2f9ddc4e04 | |
contrapunctus | 58a17a6bab | |
contrapunctus | 33ac5cb6d0 | |
contrapunctus | f76e5ed1c7 | |
contrapunctus | d2d03adaff | |
contrapunctus | 0adf1e26bc | |
contrapunctus | 613253aff0 | |
contrapunctus | 05611814d2 | |
contrapunctus | 0a3472c885 | |
contrapunctus | d7b2f88c54 | |
contrapunctus | 707454dd0b | |
contrapunctus | f78c66cc71 | |
contrapunctus | b2d431d17e | |
contrapunctus | 4f314d8e2b | |
contrapunctus | 6e2e5ad0b9 | |
contrapunctus | 08dc18aef0 | |
contrapunctus | 0ee81a4b78 | |
contrapunctus | dd17e95b00 | |
contrapunctus | bfe8eda872 | |
contrapunctus | f11e94eada | |
contrapunctus | 36a3a0e2b7 | |
contrapunctus | b44e750e19 | |
contrapunctus | 71dea8ca97 | |
contrapunctus | 3d96157b72 | |
contrapunctus | 275ac0d6db | |
contrapunctus | 56e1920b72 | |
contrapunctus | 71482262f9 | |
contrapunctus | 2ef56ee0d1 | |
contrapunctus | f017b173a6 | |
contrapunctus | c60c0a544a | |
contrapunctus | 3f25c80773 | |
contrapunctus | 74a95a8207 | |
contrapunctus | 9e9d07e7a0 | |
contrapunctus | 08fad863e1 | |
contrapunctus | b3989c495f | |
contrapunctus | 1d37f1e853 | |
contrapunctus | dad20b4938 | |
contrapunctus | 359b524228 | |
contrapunctus | 9179e7e765 | |
contrapunctus | 2c2d9a4dc0 | |
contrapunctus | 35afcc1320 | |
contrapunctus | 48cc0bc0fe | |
contrapunctus | 487c829e89 | |
contrapunctus | 4e8150ac87 | |
contrapunctus | 5a8b148716 | |
contrapunctus | 5caab2fd5e | |
contrapunctus | 8b7f07a993 | |
contrapunctus | 71e989bd82 | |
contrapunctus | 5c7d2ee9c9 | |
contrapunctus | 3835a3e300 | |
contrapunctus | f1a22bc836 | |
contrapunctus | 5f23271b6e | |
contrapunctus | 3ab054b204 | |
contrapunctus | 140216084a | |
contrapunctus | f9c258960a | |
contrapunctus | 59479e0ec7 | |
contrapunctus | 626968a27a | |
contrapunctus | b133ed1f74 | |
contrapunctus | c6fcec9b81 | |
contrapunctus | bcd8d2aabe | |
contrapunctus | 59746777a0 | |
contrapunctus | 8cdd40e47a | |
contrapunctus | 1987c26155 | |
contrapunctus | 0f038b4d41 | |
contrapunctus | a8f1ec8f1b | |
contrapunctus | fe3f531fdf | |
contrapunctus | b6ec8c3cfe | |
contrapunctus | cdc5a65cc8 | |
contrapunctus | 0f112d8b70 | |
contrapunctus | 382b5afb62 | |
contrapunctus | c8fe4b5880 | |
contrapunctus | 498af2eec4 | |
contrapunctus | 1399161e20 | |
contrapunctus | 27673a62e5 | |
contrapunctus | 38973d6892 | |
contrapunctus | 65d9b22cf6 | |
contrapunctus | 5119a791f4 | |
contrapunctus | 3b10f4c876 | |
contrapunctus | bc7ceca83e | |
contrapunctus | 78c6df891c | |
contrapunctus | e145d26111 | |
contrapunctus | 1d734204de | |
contrapunctus | 20fb4ce44a | |
contrapunctus | c1e368f6de | |
contrapunctus | fe110460f4 | |
contrapunctus | 82accd9f24 | |
contrapunctus | 239b0863f9 | |
contrapunctus | 25f09793fb | |
contrapunctus | c492cce26a | |
contrapunctus | b5b1611432 | |
contrapunctus | 7ce3f523df | |
contrapunctus | d532f3fede | |
contrapunctus | 4c3e6bc989 | |
contrapunctus | dc8a0b8a01 | |
contrapunctus | a5b2eec153 | |
contrapunctus | 2a692004e5 | |
contrapunctus | bf736679f7 | |
contrapunctus | 2bca55b1f0 | |
contrapunctus | 4038acb2b1 | |
contrapunctus | c8016a52ea | |
contrapunctus | 9d8adbe095 | |
contrapunctus | ba046e7ef1 | |
contrapunctus | 7619322ee5 | |
contrapunctus | e835da7679 | |
contrapunctus | c8bb07edbc | |
contrapunctus | 5caadc7c32 | |
contrapunctus | 09bf8e10c3 | |
contrapunctus | b56e602b44 | |
contrapunctus | 73524d6add | |
contrapunctus | 5106026cb3 | |
contrapunctus | bcc08a6009 | |
contrapunctus | b132f37560 | |
contrapunctus | 746f3808e3 | |
contrapunctus | 36efbe1c32 | |
contrapunctus | 945f95484a | |
contrapunctus | ce5cac93f4 | |
contrapunctus | d029095c17 | |
contrapunctus | c33d015718 | |
contrapunctus | 257ac0ce19 | |
contrapunctus | fece1e2c02 | |
contrapunctus | 3c5ac34924 | |
contrapunctus | 310e932257 | |
contrapunctus | 0012d63282 | |
contrapunctus | 29ca170aaf | |
contrapunctus | 5c2e2939db | |
contrapunctus | 364bdb91c6 | |
contrapunctus | 471c800444 | |
contrapunctus | 3e05a12a93 | |
contrapunctus | 263ca28214 | |
contrapunctus | 3b0a2fda2e | |
contrapunctus | d810ee8829 | |
contrapunctus | c40e595963 | |
contrapunctus | f8f91e898f | |
contrapunctus | 2e5b35bb18 | |
contrapunctus | eec465bd9c | |
contrapunctus | 76a001d5c4 | |
contrapunctus | 9048840ba5 | |
contrapunctus | e23b388a86 | |
contrapunctus | eea6f28dfc | |
contrapunctus | deb636fdbc | |
contrapunctus | 496d4c9f95 | |
contrapunctus | 88ed14e903 | |
contrapunctus | 8e141e7d50 | |
contrapunctus | 1c3a20d981 | |
contrapunctus | 35ec536ab9 | |
contrapunctus | 3a3b055ba1 | |
contrapunctus | 500f662e6a | |
contrapunctus | 862a35eeb1 | |
contrapunctus | 6d86dba673 | |
contrapunctus | 55c5972a56 | |
contrapunctus | 28364bcaf5 | |
contrapunctus | 45ba38a017 | |
contrapunctus | 4f19cf5418 | |
contrapunctus | 08c9857489 | |
contrapunctus | 0315397647 | |
contrapunctus | 44bae71c91 | |
contrapunctus | de9e0a1951 | |
contrapunctus | fe10739658 | |
contrapunctus | a2f353e6bc | |
contrapunctus | 6feaf2b212 | |
contrapunctus | 29ced6d946 | |
contrapunctus | 726c8f7644 | |
contrapunctus | 3575fce0bf | |
contrapunctus | 1473eb35c0 | |
contrapunctus | 6f9477fee9 | |
contrapunctus | 1c7ccce6ee | |
contrapunctus | 8148a6cfe0 | |
contrapunctus | e5c044b132 | |
contrapunctus | 8c2667ff9c | |
contrapunctus | 541a5ed49a | |
contrapunctus | 6581adfb5b | |
contrapunctus | af875d35c3 | |
contrapunctus | 7eb1db6a00 | |
contrapunctus | c306008d8b | |
contrapunctus | bb6aa9c5f1 | |
contrapunctus | 924701987d | |
contrapunctus | 104a072b5e | |
contrapunctus | 0f403744a1 | |
contrapunctus | 99d0040b7a | |
contrapunctus | 80f285fab3 | |
contrapunctus | b6bd3fb53a | |
contrapunctus | e15cf7722b | |
contrapunctus | 712629e882 | |
contrapunctus | 8b21495d01 | |
contrapunctus | ce2d8d64d7 | |
contrapunctus | e8166212b9 | |
contrapunctus | c9c4b438e8 | |
contrapunctus | 11ec549da5 | |
contrapunctus | aea3cee8c1 | |
contrapunctus | 3372af7b34 | |
contrapunctus | 99a336c44b | |
contrapunctus | 42c51fde54 | |
contrapunctus | 831f5645df | |
contrapunctus | b3c642f12d | |
contrapunctus | 5db52d78ab | |
contrapunctus | 445a51a38f | |
contrapunctus | d446a65b4e | |
contrapunctus | bbf989c594 | |
contrapunctus | bdb603cddd | |
contrapunctus | 3c7f1ffbcd | |
contrapunctus | 33c93db6ef | |
contrapunctus | 3710274303 | |
contrapunctus | 3d4fb66c6d | |
contrapunctus | 178adb4087 | |
contrapunctus | 04305ef006 | |
contrapunctus | 92a7a0f37f | |
contrapunctus | f4d34f9120 | |
contrapunctus | c3031c69af | |
contrapunctus | 5ef600fa17 | |
contrapunctus | 0d3f4f6d5b | |
contrapunctus | 39ee037abd | |
contrapunctus | 52e922ac86 | |
contrapunctus | 83c6ca2362 | |
contrapunctus | 9b0aba7dc3 | |
contrapunctus | 30436e3e53 | |
contrapunctus | 843d250189 | |
contrapunctus | 36d24dfc56 | |
contrapunctus | 71c2e55cb2 | |
contrapunctus | 41d383eaa8 | |
contrapunctus | a84d005c10 | |
contrapunctus | da7496cfdc | |
contrapunctus | 53b02a7ad4 | |
contrapunctus | 8878cf5555 | |
contrapunctus | dc29614d36 | |
contrapunctus | fbceb51e55 | |
contrapunctus | 6f61909e84 | |
contrapunctus | 79aa35b052 | |
contrapunctus | e3bfabd743 | |
contrapunctus | 0a99b92bbd | |
contrapunctus | 95761f034c | |
contrapunctus | b48197aaf8 | |
contrapunctus | 42a0383049 | |
contrapunctus | 4ea48dff71 | |
contrapunctus | bd7483a3b1 | |
contrapunctus | 1199f32145 | |
contrapunctus | 05f7c2e6d1 | |
contrapunctus | d86bbd1a58 | |
contrapunctus | cb36d638a1 | |
contrapunctus | 1fa7d1b617 | |
contrapunctus | 28bebfff06 | |
contrapunctus | c8e2173150 | |
contrapunctus | e70e1e6d5f | |
contrapunctus | 25bbd4bd45 | |
contrapunctus | dfa375b2a1 | |
contrapunctus | 17c3cc12d8 | |
contrapunctus | c22116d92d | |
contrapunctus | e99193846d | |
contrapunctus | 1d5c976e48 | |
contrapunctus | 0ba21c76aa | |
contrapunctus | 8bdf9d242b | |
contrapunctus | 9d039c4eb9 | |
contrapunctus | 98d9a350ed | |
contrapunctus | ed49fbff4d | |
contrapunctus | b85eb33b42 |
|
@ -1,4 +1,8 @@
|
|||
*
|
||||
!*.org
|
||||
!*.el
|
||||
!contrapunctus
|
||||
!snippets
|
||||
!snippets/*
|
||||
!snippets/*/*
|
||||
.*
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
.phony: all setup tangle lint clean
|
||||
|
||||
all: setup tangle lint
|
||||
|
||||
setup:
|
||||
emacs --batch --eval="(package-initialize)" \
|
||||
--eval="(mapcar #'package-install '(indent-lint package-lint relint))"
|
||||
|
||||
# No -q or -Q, in case the user has a newer version of Org.
|
||||
init-org.el:
|
||||
emacs --batch \
|
||||
--eval="(require 'ob-tangle)" \
|
||||
--eval='(org-babel-tangle-file "init.org")'
|
||||
|
||||
tangle: init-org.el
|
||||
|
||||
lint-check-declare: tangle
|
||||
emacs -q -Q --batch --eval='(check-declare-file "init.el")'
|
||||
|
||||
lint-checkdoc: tangle
|
||||
emacs -q -Q --batch --eval='(checkdoc-file "init.el")'
|
||||
|
||||
lint-package-lint: setup tangle
|
||||
emacs -Q --batch --eval='(package-initialize)' \
|
||||
--eval="(require 'package-lint)" \
|
||||
-f 'package-lint-batch-and-exit' "init.el"
|
||||
|
||||
lint-relint: setup tangle
|
||||
emacs -q -Q --batch --eval='(relint-file "init.el")'
|
||||
|
||||
lint: lint-check-declare lint-checkdoc lint-package-lint lint-relint
|
||||
|
||||
clean-tangle:
|
||||
-rm init.el
|
|
@ -0,0 +1,24 @@
|
|||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <https://unlicense.org>
|
|
@ -0,0 +1,15 @@
|
|||
;;;; Emacs Bookmark Format Version 1 ;;;; -*- coding: utf-8-emacs -*-
|
||||
;;; This format is meant to be slightly human-readable;
|
||||
;;; nevertheless, you probably don't want to edit it.
|
||||
;;; -*- End Of Bookmark File Format Version Stamp -*-
|
||||
(("rec"
|
||||
(filename . "/media/data/phone/contrapunctus/Nokia 6.1/Android/data/net.osmand.plus/files/tracks/rec/")
|
||||
(front-context-string . " /media/data/ph")
|
||||
(rear-context-string)
|
||||
(position . 1))
|
||||
("screenshots"
|
||||
(filename . "/media/data/contrapunctus/Pictures/screenshots/")
|
||||
(front-context-string . " /media/data/co")
|
||||
(rear-context-string)
|
||||
(position . 1))
|
||||
)
|
|
@ -1,195 +0,0 @@
|
|||
|
||||
(use-package chronometrist
|
||||
:ensure t
|
||||
:load-path "~/.emacs.d/contrapunctus/chronometrist"
|
||||
:hook
|
||||
(chronometrist-kv-read-mode . visual-line-mode)
|
||||
(kill-emacs-query-functions . chronometrist-query-stop)
|
||||
:bind ("<f9>" . #'chronometrist)
|
||||
;; (:map chronometrist-mode-map
|
||||
;; ("RET" . #'chronometrist-toggle-project-no-reason)
|
||||
;; ("M-RET" . #'chronometrist-toggle-project)
|
||||
;; ([mouse-1] . #'chronometrist-toggle-project-no-reason)
|
||||
;; ([mouse-3] . #'chronometrist-toggle-project))
|
||||
:config
|
||||
(require 'chronometrist-goals)
|
||||
(setq chronometrist-goals-list
|
||||
'((15 "Arrangement/new edition")
|
||||
(15 "Aural exercises")
|
||||
(15 "Transcription"
|
||||
"Music theory")
|
||||
(30 "Composing"
|
||||
"Writing"
|
||||
"Recording")
|
||||
(15 "Data organization"
|
||||
"Physical organization"
|
||||
"Khilona archiving")
|
||||
(60 "Exercise")
|
||||
(120 "Guitar")
|
||||
(90 "Reading")
|
||||
(60 "Singing")
|
||||
(20 "Subtitles")
|
||||
(15 "Acting")
|
||||
(30 "Keyboard")
|
||||
(15 "Wikisource"))
|
||||
alert-default-style 'libnotify
|
||||
chronometrist-before-in-functions '()
|
||||
chronometrist-after-in-functions '(;; chronometrist-tags-add
|
||||
;; chronometrist-kv-add
|
||||
contrapunctus-start-project
|
||||
chronometrist-goals-run-alert-timers)
|
||||
chronometrist-before-out-functions '(contrapunctus-before-project-stop
|
||||
chronometrist-tags-add
|
||||
chronometrist-kv-add)
|
||||
chronometrist-after-out-functions '(contrapunctus-after-project-stop
|
||||
chronometrist-goals-stop-alert-timers)
|
||||
chronometrist-activity-indicator
|
||||
(lambda ()
|
||||
(thread-first (chronometrist-last-expr)
|
||||
(plist-put :stop (chronometrist-format-time-iso8601))
|
||||
chronometrist-interval
|
||||
cadr
|
||||
chronometrist-seconds-to-hms
|
||||
(chronometrist-format-time "")))))
|
||||
|
||||
(defun contrapunctus-find-two-files-other-window (file-1 file-2)
|
||||
"Open FILE-1 and FILE-2 in new windows.
|
||||
FILE-1 will appear above FILE-2."
|
||||
(find-file-other-window file-2)
|
||||
(split-window-below)
|
||||
(find-file file-1))
|
||||
|
||||
(defun cp-outline-open-heading (n)
|
||||
(goto-char (point-min))
|
||||
(outline-next-visible-heading n)
|
||||
(outline-show-subtree))
|
||||
|
||||
(defun contrapunctus-start-project (project)
|
||||
(delete-other-windows)
|
||||
(pcase project
|
||||
("Arrangement/new edition"
|
||||
(find-file-other-window "~/Documents/Text Files/music_stuff/arrange.org"))
|
||||
("Composing"
|
||||
(find-file-other-window "~/1-music-notation/2-my-compositions/2019/2019-03 Kahe Natak Karte Ho Ji/Kahe Natak Karte Ho Ji?.org")
|
||||
(cp-outline-open-heading 1))
|
||||
("Data organization"
|
||||
(find-dired "~/" "-name \'dl\' -size +0c"))
|
||||
("Exercise"
|
||||
(let* ((path-1 "~/Documents/Text Files/ma/practice.org")
|
||||
(path-2 "~/Documents/Text Files/ma/0shoto-syllabus.org")
|
||||
(file-1 (file-name-nondirectory path-1))
|
||||
(file-2 (file-name-nondirectory path-2)))
|
||||
(contrapunctus-find-two-files-other-window path-1 path-2)
|
||||
(select-window (get-buffer-window file-1))))
|
||||
("Guitar"
|
||||
(let* ((path-1 "~/Sync/Scores/guitar-solo/repertoire.org")
|
||||
(path-2 "~/Sync/Scores/guitar-duo/repertoire.org")
|
||||
(weekday (elt (decode-time) 6))
|
||||
(week (string-to-number (format-time-string "%U"))))
|
||||
(contrapunctus-find-two-files-other-window path-1 path-2)
|
||||
(select-window (get-buffer-window (get-file-buffer path-1)))
|
||||
(org-match-sparse-tree nil "perform")))
|
||||
("Keyboard"
|
||||
(find-file-other-window "~/Documents/Text Files/music_stuff/piano.org")
|
||||
(outline-show-subtree))
|
||||
("Khilona archiving"
|
||||
(find-file-other-window "/home/anon/Documents/sync/Khilona/")
|
||||
(split-window-below)
|
||||
(other-window 1)
|
||||
(find-file "/home/anon/Khilona/Videos/Me?/")
|
||||
(other-window 1)
|
||||
(find-file "/home/anon/Documents/Text Files/khilona/2011 Me?/script/script.tex"))
|
||||
("OSM"
|
||||
;; (async-shell-command "java -jar ~/josm-tested.jar" " *JOSM*" " *JOSM errors*")
|
||||
;; (delete-window (get-buffer-window " *JOSM*"))
|
||||
(contrapunctus-find-two-files-other-window "~/phone/Nokia 6.1/Android/data/net.osmand.plus/files/"
|
||||
;; "~/phone/Nokia 6.1/external/DCIM/OpenCamera/osm/"
|
||||
"~/phone/Nokia 6.1/Documents/Markor/OSM/TODO.md"))
|
||||
;; https://github.com/bbatsov/emacs-lisp-style-guide#comment-annotations
|
||||
("Programming"
|
||||
(grep (->> '("grep" "--color" "-EnHiIR" "-e '(TODO|FIXME|OPTIMIZE|HACK|REVIEW)'"
|
||||
"--exclude=\"*.html\""
|
||||
"--exclude-dir=\".git\""
|
||||
"~/.emacs.d/contrapunctus/"
|
||||
"~/Documents/Text\\ Files/programming/")
|
||||
(-interpose " ")
|
||||
(apply #'concat)))
|
||||
(switch-to-buffer "*grep*")
|
||||
(split-window-below)
|
||||
(other-window 1)
|
||||
(find-file "~/phone/Nokia 6.1/Documents/Markor/Computers/todo.md")
|
||||
(delete-other-windows))
|
||||
("Singing"
|
||||
(find-file-other-window "~/Sync/Scores/voice/repertoire.org"))
|
||||
("Subtitles"
|
||||
(find-file-other-window "~/Music/0-classical/vocal/musical/Company/"))
|
||||
("Theatre rehearsal"
|
||||
(contrapunctus-find-two-files-other-window
|
||||
"~/Documents/Text Files/khilona/voices.org"
|
||||
"~/1-music-notation/2-my-compositions/2019/2019-03 Kahe Natak Karte Ho Ji/Kahe Natak Karte Ho Ji.org"))
|
||||
("Transcription"
|
||||
(find-file-other-window "~/phone/Nokia 6.1/Documents/Markor/Music/transcriptions.md"))
|
||||
("Wiktionary"
|
||||
(find-file-other-window "~/phone/Nokia 6.1/Documents/Markor/Languages/hindi.md"))
|
||||
("Writing"
|
||||
(find-file-other-window "/home/anon/phone/Nokia 6.1/Documents/Markor/Songs or Poems/"))))
|
||||
|
||||
(autoload 'magit-anything-modified-p "magit")
|
||||
|
||||
(defun contrapunctus-commit-prompt ()
|
||||
(if (magit-anything-modified-p)
|
||||
(if (yes-or-no-p
|
||||
(concat "You have uncommitted changes in "
|
||||
default-directory
|
||||
". Really clock out? "))
|
||||
t
|
||||
(magit-status)
|
||||
nil)
|
||||
t))
|
||||
|
||||
(defun contrapunctus-before-project-stop (project)
|
||||
(if (member project '("Composing"
|
||||
"Khilona archiving"
|
||||
"Programming"))
|
||||
(contrapunctus-commit-prompt)
|
||||
;; all functions in `chronometrist-before-project-stop-functions'
|
||||
;; must return t for successful clock-out
|
||||
t))
|
||||
|
||||
(require 'request)
|
||||
(require 'esxml-query)
|
||||
(defun contrapunctus-after-project-stop (project)
|
||||
(pcase project
|
||||
("OSM"
|
||||
(delete-other-windows)
|
||||
;; What should we do when there's no network connectivity?
|
||||
;; Ideally - note the clock-out time, and retry every five
|
||||
;; minutes. When connected, request the changesets, look for the
|
||||
;; first changeset with a "created_at" which is less than the
|
||||
;; clock-out time.
|
||||
(request
|
||||
"https://api.openstreetmap.org/api/0.6/changesets"
|
||||
:params '(("display_name" . "contrapunctus"))
|
||||
:parser (lambda () (libxml-parse-xml-region (point) (point-max)))
|
||||
:success
|
||||
(cl-function
|
||||
(lambda (&key data &allow-other-keys)
|
||||
(let* ((latest-changeset (-> data
|
||||
(esxml-node-children)
|
||||
(car)))
|
||||
(comment (->> latest-changeset
|
||||
(esxml-query "[k=comment]")
|
||||
(esxml-node-attributes)
|
||||
(cdr)
|
||||
(car)
|
||||
(cdr)))
|
||||
(id (-> latest-changeset
|
||||
(esxml-node-attributes)
|
||||
(car)
|
||||
(cdr))))
|
||||
(chronometrist-append-to-last-expr nil
|
||||
`(:osm-url ,(concat "https://www.openstreetmap.org/changeset/" id)
|
||||
:osm-comment ,comment)))))))
|
||||
(_ (delete-other-windows))))
|
||||
|
||||
(provide 'cp-chronometrist)
|
|
@ -1,47 +0,0 @@
|
|||
(use-package desktop
|
||||
:init (desktop-save-mode t)
|
||||
:config
|
||||
(setq desktop-dirname "~/.emacs.d/desktop-save/"
|
||||
desktop-save 'ask-if-new)
|
||||
(-map (lambda (element)
|
||||
(add-to-list 'desktop-globals-to-save element))
|
||||
'(grep-history
|
||||
grep-find-history
|
||||
find-args-history
|
||||
extended-command-history
|
||||
read-expression-history
|
||||
default-input-method
|
||||
input-method-history
|
||||
query-replace-history
|
||||
compile-history
|
||||
string-rectangle-history
|
||||
regexp-history
|
||||
dired-shell-command-history
|
||||
dired-regexp-history
|
||||
shell-command-history
|
||||
org-tags-history
|
||||
minibuffer-history
|
||||
erc-server-history-list
|
||||
cp/activity-history
|
||||
LaTeX-environment-history)))
|
||||
(desktop-save-mode t)
|
||||
|
||||
;; (add-to-list 'desktop-locals-to-save 'comint-input-ring)
|
||||
|
||||
(desktop-auto-save-enable)
|
||||
(defun cp/backup-desktop-file ()
|
||||
(let ((new-filename (->> (shell-command-to-string "date -Is")
|
||||
(replace-regexp-in-string "\n" "")
|
||||
(concat "~/.emacs.d/.emacs.desktop."))))
|
||||
(copy-file "~/.emacs.d/.emacs.desktop" new-filename)))
|
||||
(defun cp/cleanup-desktop-backups ()
|
||||
(let ((desktop-file-backups (-> (concat "find ~/.emacs.d/ -maxdepth 1 -type f |"
|
||||
" grep -E \"\.emacs\.desktop\.[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[-+]?[0-9]{2}:?[0-9]{2}\"")
|
||||
(shell-command-to-string )) )))
|
||||
(if (> 10 )))
|
||||
;; ;; this one created loads and loads of backups
|
||||
;; (add-hook 'desktop-save-hook 'cp/backup-desktop-file)
|
||||
;; ;; not enough space for this - wasteful
|
||||
;; (add-hook 'kill-emacs-hook 'cp/backup-desktop-file)
|
||||
|
||||
(provide 'cp-desktop)
|
|
@ -1,283 +0,0 @@
|
|||
;;;; Editing improvements
|
||||
|
||||
;; fix Emacs' definition of a sentence
|
||||
(setq sentence-end-double-space nil)
|
||||
|
||||
;; the utter basics
|
||||
(general-define-key
|
||||
"C-h" 'backward-delete-char
|
||||
"C-w" 'backward-kill-word
|
||||
"C-u" 'cp-kill-line-0
|
||||
;; A better solution would be to hack kill-line/kill-visual-line to
|
||||
;; kill the region if a region is active. The flexibility of those
|
||||
;; functions is very desirable - you can delete from point to line
|
||||
;; end, clear a line to enter some other text on it (C-a C-k/"a k"),
|
||||
;; or delete one or more whole lines (C-1 C-k/"1 k" or C-<num>
|
||||
;; C-k/"<num> k").
|
||||
"C-y" 'whole-line-or-region-yank
|
||||
"C-S-k" 'whole-line-or-region-kill-region
|
||||
"C-," 'backward-paragraph
|
||||
"C-." 'forward-paragraph
|
||||
"C-<" 'beginning-of-buffer
|
||||
"C->" 'end-of-buffer)
|
||||
|
||||
(define-key isearch-mode-map (kbd "C-h") 'isearch-delete-char)
|
||||
(defun cp-kill-line-0 ()
|
||||
(interactive)
|
||||
(kill-line 0))
|
||||
|
||||
(global-unset-key (kbd "C-x C-r"))
|
||||
(general-define-key
|
||||
:prefix "C-x C-r"
|
||||
"C-i" 'string-insert-rectangle
|
||||
"C-r" 'replace-rectangle
|
||||
"C-k" 'kill-rectangle)
|
||||
|
||||
(defun cp/downcase-dwim (arg)
|
||||
"Like `downcase-word', but if region is active, run
|
||||
`downcase-region' instead. Unlike `downcase-region', rectangular
|
||||
regions are handled correctly as well.")
|
||||
|
||||
;; open-line should always move to the beginning of the current line
|
||||
;; first, so one can run it anywhere. I also want it to indent it to
|
||||
;; the next or the previous line...
|
||||
|
||||
;; These affect org-meta-return and org-insert-heading-respect-content
|
||||
;;
|
||||
|
||||
;; (defadvice open-line
|
||||
;; (before open-line-bol activate)
|
||||
;; (beginning-of-visual-line))
|
||||
;; (defadvice open-line
|
||||
;; (after open-line-indent activate)
|
||||
;; (if (not (looking-at "\\** "))
|
||||
;; (indent-for-tab-command)))
|
||||
|
||||
;; (global-set-key (kbd "C-o") 'open-line)
|
||||
(defun cp/open-line ()
|
||||
"The opposite of `cp/open-line-before'. Start a new line below
|
||||
the current line, regardless of where point is in the current
|
||||
line. Will not affect the content of the current line. Applies
|
||||
the correct indentation according to the mode."
|
||||
(interactive)
|
||||
(progn
|
||||
(end-of-line)
|
||||
(electric-indent-just-newline t)
|
||||
(indent-according-to-mode)))
|
||||
|
||||
(defun cp/open-line-before (arg)
|
||||
"Like `open-line' but a bit more sane.
|
||||
|
||||
In org-mode, run org-open-line.
|
||||
|
||||
In other modes, insert a newline above the current line,
|
||||
regardless of where point is in current line. Will not affect
|
||||
content of current line. Applies the correct indentation
|
||||
according to the mode."
|
||||
(interactive "p")
|
||||
(if (and (equal major-mode 'org-mode)
|
||||
(org-at-table-p))
|
||||
(org-open-line arg)
|
||||
(progn
|
||||
|
||||
(beginning-of-line)
|
||||
(electric-indent-just-newline t)
|
||||
(forward-char -1)
|
||||
(indent-according-to-mode))))
|
||||
(global-set-key (kbd "C-o") 'cp/open-line-before)
|
||||
|
||||
;; I wish you could press e.g. S-o in god-mode to get C-S-o.
|
||||
;; 10/10 would make life better.
|
||||
(global-set-key (kbd "C-S-o") 'cp/open-line)
|
||||
|
||||
(setq dired-bind-jump nil)
|
||||
(global-set-key (kbd "C-x C-j") 'join-line)
|
||||
|
||||
;; C-z (suspend-frame) is utterly useless and disruptive - good place to put universal-argument
|
||||
(global-unset-key (kbd "C-z"))
|
||||
(global-set-key (kbd "C-z") 'universal-argument)
|
||||
(global-set-key (kbd "C-x C-z") 'repeat)
|
||||
(global-set-key (kbd "C-x C-;") 'repeat-complex-command)
|
||||
|
||||
;; (defun cp-kill-line (&optional arg)
|
||||
;; (interactive)
|
||||
;; (if arg
|
||||
;; (if mark-active
|
||||
;; (kill-region arg)
|
||||
;; (kill-line arg))
|
||||
;; (if mark-active
|
||||
;; (kill-region)
|
||||
;; (kill-line))))
|
||||
;; (global-set-key (kbd "C-k") 'cp-kill-line)
|
||||
;; Chris Done (god-mode) recommends this, but Emacs' repeat command is almost useless...
|
||||
;; (global-set-key (kbd "C-.") 'repeat)
|
||||
|
||||
;;;; I like the transpose commands
|
||||
(global-unset-key (kbd "C-t"))
|
||||
(general-define-key
|
||||
:prefix "C-t"
|
||||
"C-t C-c" 'transpose-chars
|
||||
"C-t C-w" 'transpose-words
|
||||
"C-t C-l" 'transpose-lines
|
||||
"C-t C-s" 'transpose-sentences
|
||||
"C-t C-e" 'transpose-sexps
|
||||
"C-t C-p" 'transpose-paragraphs)
|
||||
|
||||
(global-set-key (kbd "C-M-h") 'er/expand-region)
|
||||
|
||||
(use-package dot-mode
|
||||
:disabled
|
||||
:hook (text-mode prog-mode LilyPond-mode)
|
||||
:bind (:map dot-mode-map
|
||||
("C-." . nil)
|
||||
("M-." . dot-mode-execute)
|
||||
("C-M-." . nil)))
|
||||
|
||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||
|
||||
(require 'flex-isearch)
|
||||
(flex-isearch-mode 1)
|
||||
|
||||
(general-define-key
|
||||
"C-M-s" 'flex-isearch-forward
|
||||
"C-M-r" 'flex-isearch-backward)
|
||||
|
||||
(with-eval-after-load 'iedit
|
||||
(define-key iedit-mode-keymap (kbd "C-h") 'backward-delete-char))
|
||||
|
||||
(with-eval-after-load 'markdown-mode
|
||||
(defun cp/copy-md-link (prefix-arg)
|
||||
"Copy address of Markdown link after point in the current line.
|
||||
|
||||
If there is no link in the current line, or if the region is
|
||||
active, or with a prefix arg - call
|
||||
whole-line-or-region-kill-ring-save instead."
|
||||
(interactive "P")
|
||||
(save-excursion
|
||||
(if (or (use-region-p)
|
||||
prefix-arg
|
||||
(not (re-search-line
|
||||
;; 2018-03-21T22:47:55+0530 - fix bug where a line with parenthesized text would not be copied
|
||||
;; "\("
|
||||
;; 2018-07-22T10:20:03+0530
|
||||
;; "\\[.*?\\](.*?)"
|
||||
"\\[.*?\\]("
|
||||
)))
|
||||
(whole-line-or-region-kill-ring-save prefix-arg)
|
||||
(let ((point-a (point)))
|
||||
(forward-char -1)
|
||||
(forward-sexp)
|
||||
(copy-region-as-kill point-a (- (point) 1))))))
|
||||
(cp-set-keys
|
||||
:keymap markdown-mode-map
|
||||
:bindings
|
||||
`((,(kbd "M-w") cp/copy-md-link)
|
||||
(,(kbd "TAB") markdown-cycle)
|
||||
(,(kbd "C-c C-.") markdown-demote)
|
||||
(,(kbd "C-c C-,") markdown-promote)
|
||||
(,(kbd "C-c C-l") markdown-insert-link))))
|
||||
|
||||
(defun cp/copy-bus-entry ()
|
||||
"For personal use, when working between Markdown and the OSM wiki."
|
||||
(interactive)
|
||||
(let ((point-a (region-beginning))
|
||||
(point-b (region-end))
|
||||
(point-b-line (line-number-at-pos)))
|
||||
(query-replace "[ ]" "☐" nil point-a point-b)
|
||||
(query-replace "[x]" "☑" nil point-a point-b)
|
||||
(query-replace-regexp "^- " "" nil point-a point-b)
|
||||
(goto-char (point-min))
|
||||
(forward-line (- point-b-line 1))
|
||||
(copy-region-as-kill point-a (point-at-bol))))
|
||||
|
||||
;; 2018-08-21T03:41:47+0530
|
||||
(defun cp/copy-md-link (prefix-arg)
|
||||
"Copy address of Markdown link after point in the current line.
|
||||
|
||||
If there is no link in the current line, or if the region is
|
||||
active, or with a prefix arg - call
|
||||
whole-line-or-region-kill-ring-save instead."
|
||||
(interactive "P")
|
||||
(save-excursion
|
||||
(cond
|
||||
((or (use-region-p) prefix-arg)
|
||||
(whole-line-or-region-kill-ring-save prefix-arg))
|
||||
((re-search-line "\\[.*?\\](")
|
||||
(let ((point-a (point)))
|
||||
(forward-char -1)
|
||||
(forward-sexp)
|
||||
(copy-region-as-kill point-a (- (point) 1))))
|
||||
((re-search-line "http")
|
||||
(kill-new (thing-at-point 'url)))
|
||||
(t (whole-line-or-region-kill-ring-save prefix-arg)))))
|
||||
|
||||
;; 2018-08-28T22:50:43+0530
|
||||
(defun cp/copy-buffer ()
|
||||
(interactive)
|
||||
(copy-region-as-kill (point-min) (point-max)))
|
||||
|
||||
(use-package multiple-cursors
|
||||
:bind (("C-M-l" . #'mc/mark-previous-like-this-symbol)
|
||||
("C-M-;" . #'mc/mark-next-like-this-symbol)
|
||||
("C-M-'" . #'mc/mark-all-symbols-like-this)
|
||||
|
||||
("C-M-," . #'mc/mark-previous-word-like-this)
|
||||
("C-M-." . #'mc/mark-next-word-like-this)
|
||||
("C-M-/" . #'mc/mark-all-words-like-this)
|
||||
("C-M-<" . #'mc/unmark-previous-like-this)
|
||||
("C-M->" . #'mc/unmark-next-like-this)
|
||||
|
||||
("C-M-]" . #'mc-hide-unmatched-lines-mode)))
|
||||
|
||||
(defun cp/marked-files->markup-links-org (filenames)
|
||||
(mapcar (lambda (filename)
|
||||
(let ((link-pre "[[file:")
|
||||
(link-post "][]]\n"))
|
||||
(concat link-pre filename link-post)))
|
||||
filenames))
|
||||
|
||||
(defun cp/marked-files->markup-links-md (filenames)
|
||||
(mapcar (lambda (filename)
|
||||
(if (member (downcase
|
||||
(file-name-extension filename))
|
||||
image-file-name-extensions)
|
||||
(let ((link-pre "![](")
|
||||
(link-post ")\n"))
|
||||
(concat link-pre filename link-post))
|
||||
(let ((link-pre "[](")
|
||||
(link-post ")\n"))
|
||||
(concat link-pre filename link-post))))
|
||||
filenames))
|
||||
|
||||
;; BUG - (dired-get-marked-files) returns file name at point if none are marked
|
||||
;; BUG - (dired-get-marked-files) always returns an alphabetically-sorted list, even when the Dired buffer is sorted by date
|
||||
(defun cp/marked-files->markup-links ()
|
||||
"From a Dired buffer, insert the file at point or marked files
|
||||
as links into an Org or Markdown document."
|
||||
(interactive)
|
||||
(if (derived-mode-p 'dired-mode)
|
||||
(let* ((filenames (dired-get-marked-files 'no-dir))
|
||||
(other-buffer (->> (window-list)
|
||||
(cadr)
|
||||
(window-buffer)))
|
||||
(other-buffer-mode (with-current-buffer other-buffer major-mode))
|
||||
(two-window-op (and (= (length (window-list)) 2)
|
||||
(member other-buffer-mode
|
||||
'(org-mode markdown-mode))))
|
||||
(output-buffer (if two-window-op
|
||||
other-buffer
|
||||
(read-buffer "Insert links in buffer: ")))
|
||||
(output-mode (with-current-buffer output-buffer major-mode))
|
||||
(output-text (case output-mode
|
||||
('org-mode
|
||||
(cp/marked-files->markup-links-org filenames))
|
||||
('markdown-mode
|
||||
(cp/marked-files->markup-links-md filenames))
|
||||
(t (error "Only Markdown and Org are currently supported.")))))
|
||||
(if two-window-op
|
||||
(other-window 1)
|
||||
(switch-to-buffer output-buffer))
|
||||
(mapc #'insert output-text))
|
||||
(user-error "Run this command from a Dired buffer with some marked files."))
|
||||
(when markdown-inline-image-overlays
|
||||
(markdown-display-inline-images)))
|
|
@ -1,79 +0,0 @@
|
|||
|
||||
;; TODO - make toggle command for emms-start/emms-stop
|
||||
;; TODO - change mode line display - don't show the whole file path, just the name
|
||||
(use-package emms
|
||||
:ensure t
|
||||
:bind
|
||||
("<f2> e" . #'hydra-emms/body)
|
||||
("<f2> E" . #'emms)
|
||||
(:map emms-playlist-mode-map
|
||||
("0" . #'emms-volume-raise)
|
||||
("9" . #'emms-volume-lower)
|
||||
("<up>" . #'emms-volume-raise)
|
||||
("<down>" . #'emms-volume-lower)
|
||||
("<left>" . #'emms-seek-backward)
|
||||
("<right>" . #'emms-seek-forward)
|
||||
("n" . #'next-line)
|
||||
("p" . #'previous-line)
|
||||
("N" . #'emms-next)
|
||||
("P" . #'emms-previous)
|
||||
("R" . #'emms-toggle-random-playlist)
|
||||
("M-n" . #'emms-cue-next)
|
||||
("M-p" . #'emms-cue-previous)
|
||||
("SPC" . #'emms-pause))
|
||||
(:map dired-mode-map
|
||||
("E" . #'hydra-emms/body))
|
||||
:commands (emms-all
|
||||
emms
|
||||
emms-play-dired
|
||||
emms-add-dired)
|
||||
:config (emms-all)
|
||||
(emms-default-players)
|
||||
(setq emms-player-mpv-parameters
|
||||
(lambda ()
|
||||
(append
|
||||
'("--fs"
|
||||
"--quiet"
|
||||
"--really-quiet"
|
||||
"--force-window=yes"
|
||||
"-ao=jack,alsa"
|
||||
;; "--loop-file=inf"
|
||||
)
|
||||
(let* ((dir (->> (emms-playlist-current-selected-track)
|
||||
(alist-get 'name)
|
||||
(file-name-directory)))
|
||||
(subs-in-dir (f-glob "*.srt" dir))
|
||||
(subs-in-subdir (f-glob "*/*.srt" dir)))
|
||||
(->> (append subs-in-dir subs-in-subdir)
|
||||
(-interpose ":")
|
||||
(append '("--sub-files="))
|
||||
(apply #'concat)
|
||||
(list))))))
|
||||
;; This won't work for `emms-random', because it runs in a `save-excursion'
|
||||
;; (add-to-list 'emms-playlist-selection-changed-hook 'emms-playlist-mode-center-current)
|
||||
;; (--map (add-to-list 'emms-player-mpv-parameters it)
|
||||
;; '("--fs"))
|
||||
(defun contrapunctus-emms-toggle-player ()
|
||||
(interactive)
|
||||
(if emms-player-stopped-p
|
||||
(emms-start)
|
||||
(emms-stop)))
|
||||
(setq emms-playlist-buffer-name "EMMS Playlist")
|
||||
:init (defhydra hydra-emms ()
|
||||
("e" #'emms "EMMS")
|
||||
("n" #'emms-next "Next")
|
||||
("p" #'emms-previous "Previous")
|
||||
("SPC" #'emms-pause "Pause")
|
||||
("s" #'contrapunctus-emms-toggle-player "Start/Stop")
|
||||
("0" #'emms-volume-raise)
|
||||
("9" #'emms-volume-lower)
|
||||
("<up>" #'emms-volume-raise)
|
||||
("<down>" #'emms-volume-lower)
|
||||
("<left>" #'emms-seek-backward)
|
||||
("<right>" #'emms-seek-forward)
|
||||
("l" #'emms-play-dired "Play file (dired)")
|
||||
("a" #'emms-add-dired "Add file (dired)")
|
||||
("A" #'emms-add-directory-tree "Add directory")
|
||||
("u" #'emms-play-url)))
|
||||
|
||||
(provide 'cp-emms)
|
|
@ -1,87 +0,0 @@
|
|||
(use-package evil
|
||||
:disabled
|
||||
:init (evil-mode 1)
|
||||
;; Want something to switch between evil and god-mode, instead of this.
|
||||
;; They say there's a plugin for it...
|
||||
:bind
|
||||
(("C-x e" evil-mode)
|
||||
;;(global-set-key (kbd "g C-g") 'count-words-region)
|
||||
(:map evil-normal-state-map
|
||||
&allow-other-keys(;; ("<tab>" forward-button)
|
||||
("zR" . 'yafolding-show-all)
|
||||
("zM" . 'yafolding-hide-all)
|
||||
("zo" . 'yafolding-show-element)
|
||||
("zc" . 'yafolding-hide-element)
|
||||
|
||||
;; The story so far - in evil-normal-state-map, I set 'i' to
|
||||
;; evil-previous-visual-line, 'k' to evil-next-visual-line,
|
||||
;; 'j' to evil-backward-char. Note that I forgot to set 'h'
|
||||
;; to insert at first...but that's not all - later I realized
|
||||
;; this didn't affect Visual mode :p 4 more lines for that.
|
||||
;; Next...d/c didn't work with ijkl. 4 more lines for
|
||||
;; evil-operator-state-map. After that - you usually want
|
||||
;; visual-line up/down movement, but _not_ when you hit d-j/k
|
||||
;; (or d-i/k)! So, in evil-operator-state-map, i and k are
|
||||
;; now vanilla evil-previous/next-line. Set gi/gk to
|
||||
;; evil-previous/next-line in normal and visual states, and
|
||||
;; to evil-previous/next-visual-line in operator state - 2
|
||||
;; new lines to each group of 4.
|
||||
("gi" . evil-previous-visual-line)
|
||||
("gk" . evil-next-visual-line)
|
||||
( "i" . evil-previous-line)
|
||||
( "k" . evil-next-line)
|
||||
( "j" . evil-backward-char)
|
||||
( "h" . evil-insert)))
|
||||
:map evil-visual-state-map
|
||||
("gi" evil-previous-visual-line)
|
||||
("gk" evil-next-visual-line)
|
||||
("i" evil-previous-line)
|
||||
("k" evil-next-line)
|
||||
("j" evil-backward-char)
|
||||
("h" evil-insert)
|
||||
|
||||
:map evil-operator-state-map
|
||||
("gi" evil-previous-visual-line)
|
||||
("gk" evil-next-visual-line)
|
||||
("i" evil-previous-line)
|
||||
("k" evil-next-line)
|
||||
("j" evil-backward-char)
|
||||
("h" evil-insert)
|
||||
;; evil-inner-tag ?
|
||||
("hW" evil-inner-WORD)
|
||||
("hw" evil-inner-word)
|
||||
("h\(" evil-inner-paren)
|
||||
("h\)" evil-inner-paren)
|
||||
("h\{" evil-inner-curly)
|
||||
("h\}" evil-inner-curly)
|
||||
("h<" evil-inner-angle)
|
||||
("h>" evil-inner-angle)
|
||||
("h\[" evil-inner-bracket)
|
||||
("h\]" evil-inner-bracket)
|
||||
("hs" evil-inner-sentence)
|
||||
("hp" evil-inner-paragraph)
|
||||
("h`" evil-inner-back-quote)
|
||||
("h\"" evil-inner-double-quote)
|
||||
("h'" evil-inner-single-quote)
|
||||
|
||||
:map evil-motion-state-map
|
||||
("gi" evil-previous-visual-line)
|
||||
("gk" evil-next-visual-line)))
|
||||
|
||||
;;;; set C-h to backspace when editing commands and searching
|
||||
(defun kill-start-of-line ()
|
||||
"Kill from point to start of line."
|
||||
(interactive)
|
||||
(kill-line 0))
|
||||
(define-key evil-insert-state-map (kbd "C-u") 'kill-start-of-line))
|
||||
|
||||
;;;; evil-snipe
|
||||
(with-eval-after-load 'evil-snipe
|
||||
(setq evil-snipe-count-scope 'letters)
|
||||
;; This doesn't take two chars by default, which combined with
|
||||
;; unimplemented evil-snipe-count-scope 'vertical makes it nearly
|
||||
;; useless as a replacement for fFtT;
|
||||
(evil-snipe-replace-evil)
|
||||
(global-evil-snipe-mode 1))
|
||||
|
||||
(evil-mode)
|
|
@ -1,423 +0,0 @@
|
|||
;; -*- lexical-bindiing: t; -*-
|
||||
|
||||
;; TODO - function which deletes buffers (esp. files and dired buffers) above a certain size. Then, set that to a timer.
|
||||
|
||||
;;;; File management
|
||||
|
||||
(add-to-list 'load-path "~/.emacs.d/elisp-git/dired-toggle-sudo/")
|
||||
(add-to-list 'load-path "~/.emacs.d/elisp-git/project-explorer/")
|
||||
|
||||
(use-package dired
|
||||
:init (add-hook 'dired-mode-hook 'turn-on-launch-mode)
|
||||
:config
|
||||
(setq dired-listing-switches
|
||||
;; by date
|
||||
;; "-cgGhlt --group-directories-first --time-style=long-iso"
|
||||
;; by name
|
||||
"-cgGhl --group-directories-first --time-style=long-iso"
|
||||
;; no -h
|
||||
;; "-cgGl --group-directories-first --time-style=long-iso"
|
||||
|
||||
;; by date, no --group-directories-first
|
||||
;; "-cgGhlt --time-style=long-iso"
|
||||
)
|
||||
:bind (("<f2> s" . sxiv)
|
||||
:map dired-mode-map
|
||||
("W" . wdired-change-to-wdired-mode)
|
||||
("e" . #'cp/dired-do-ediff)
|
||||
;; after learning that this copies whole paths with null
|
||||
;; argument, this became a whole lot more useful
|
||||
("C-w" . dired-copy-filename-as-kill)
|
||||
("C-c C-f" . cp/corresponding-text-file)
|
||||
("h" . cp/dired-toggle-hidden)
|
||||
([mouse-2] . cp/dired-launch-or-open)
|
||||
("C-j" . launch-files-dired)
|
||||
("j" . launch-files-dired)
|
||||
("M-s r" . dired-do-query-replace-regexp)
|
||||
("M-s s" . dired-do-isearch-regexp)
|
||||
("P" . emms-play-dired)
|
||||
("I" . 'sxiv)
|
||||
("X" . 'dired-do-flagged-delete))
|
||||
:hook (dired-mode . (lambda () (dired-hide-details-mode t))))
|
||||
|
||||
(use-package dired-async
|
||||
:init (dired-async-mode 1))
|
||||
|
||||
(use-package dired-x
|
||||
:commands dired-jump
|
||||
:bind ("C-x C-d" . dired-jump))
|
||||
|
||||
;; TODO - make launch-file suggest the path at point by default
|
||||
(use-package launch
|
||||
:commands turn-on-launch-mode launch-files-dired
|
||||
:bind ("s-l" . launch-file))
|
||||
|
||||
(defun cp/open-random-file (&optional find-args dir cmd)
|
||||
"Open a random file in DIR, prompting the user for it if not supplied."
|
||||
(interactive)
|
||||
(let* ((find-args (if find-args find-args " -type f "))
|
||||
(dir (if dir dir
|
||||
(read-directory-name "Directory: "
|
||||
(if file-name-history
|
||||
(car file-name-history)
|
||||
default-directory)
|
||||
nil t)))
|
||||
(file-name (--> (expand-file-name dir)
|
||||
(concat "find " "\"" it "\" "
|
||||
find-args " | shuf | sed 1q")
|
||||
(shell-command-to-string it)
|
||||
(replace-regexp-in-string "\n" "" it))))
|
||||
(if cmd
|
||||
(async-shell-command (concat cmd " \"" file-name "\""))
|
||||
(find-file file-name))))
|
||||
|
||||
(with-eval-after-load 'project-explorer
|
||||
(global-set-key (kbd "<f5> e") 'project-explorer-toggle))
|
||||
|
||||
;; (require 'sudo-edit)
|
||||
|
||||
(defun cp/dired-ffmpeg (&optional format)
|
||||
(interactive)
|
||||
(let ((files (-map #'shell-quote-argument (dired-get-marked-files t)))
|
||||
(format (if format format "mp3")))
|
||||
(--map (let* ((fbasename (file-name-base it))
|
||||
(new-name (concat fbasename "." format)))
|
||||
(call-process "ffmpeg" nil "*dired-ffmpeg*" t
|
||||
"-i" it "-ac" "2" "-f" format new-name))
|
||||
files)))
|
||||
|
||||
(defvar cp/ffmpeg-max-processes 1
|
||||
"Maximum number of simultaneous ffmpeg processes run by
|
||||
`cp/dired-do-ffmpeg'. See also
|
||||
`cp/ffmpeg-process-recount-interval'.")
|
||||
|
||||
(defvar cp/ffmpeg-process-recount-interval 10
|
||||
"Time interval to check number of processes after, and maybe
|
||||
start new processes. See TIME argument of `run-at-time' for
|
||||
possible values.")
|
||||
|
||||
(defun cp/ffmpeg-process-count ()
|
||||
(->>
|
||||
(-map 'process-name (process-list))
|
||||
(--count (string-match-p "^dired-ffmpeg" it))))
|
||||
|
||||
(defun cp/maybe-call-ffmpeg (shell-args)
|
||||
(if (< (cp/ffmpeg-process-count) cp/ffmpeg-max-processes)
|
||||
(apply 'start-process "dired-ffmpeg"
|
||||
(generate-new-buffer-name "*dired-ffmpeg*")
|
||||
"ffmpeg"
|
||||
(split-string-and-unquote shell-args))
|
||||
(run-at-time cp/ffmpeg-process-recount-interval
|
||||
nil
|
||||
(cp/maybe-call-ffmpeg shell-args))))
|
||||
|
||||
;; TODO - 1. process buffer does not update like ffmpeg run in the
|
||||
;; terminal.
|
||||
|
||||
;; 2. don't make FORMAT arg compulsory - if omitted, create
|
||||
;; unique file name based on original, with same extension
|
||||
;; (`make-temp-name')
|
||||
|
||||
(defun cp/dired-do-ffmpeg (input-args output-args format)
|
||||
"In Dired buffers, runs `ffmpeg' on each marked file, or, if no
|
||||
marks are present, on the file at point.
|
||||
|
||||
Each input file will result in one output file. The output file
|
||||
will have the same file name but FORMAT as the extension.
|
||||
|
||||
This command thus uses barely a fraction of what ffmpeg can do,
|
||||
but hopefully it covers any and every one-file-in-one-file out
|
||||
usage, which is most common for the author.
|
||||
|
||||
INPUT-ARGS and OUTPUT-ARGS can be left blank (\"\"). FORMAT is
|
||||
presently necessary, and must not be the same as the input file.
|
||||
|
||||
ffmpeg must be installed on your system, of course."
|
||||
(interactive "sInput arguments (optional) : \nsOutput arguments (optional) : \nsOutput format : ")
|
||||
(let ((files (-map #'shell-quote-argument
|
||||
(dired-get-marked-files t))))
|
||||
(--map
|
||||
(let* ((fbasename (file-name-base it))
|
||||
(new-name (concat fbasename "." format))
|
||||
(args (concat input-args " "
|
||||
"-i " it " "
|
||||
output-args " "
|
||||
new-name)))
|
||||
;; (with-output-to-temp-buffer "cp/dired-do-ffmpeg"
|
||||
(cp/maybe-call-ffmpeg args)
|
||||
;; )
|
||||
)
|
||||
files)))
|
||||
|
||||
;; (with-current-buffer "log"
|
||||
;; (goto-char (point-max))
|
||||
;; (insert
|
||||
;; (concat
|
||||
;; (propertize (format-time-string "%FT%T%z") 'face 'bold)
|
||||
;; "\n"))
|
||||
;; (start-file-process-shell-command "ls" "log" "ls -g ~/Urecord*")
|
||||
;; (insert
|
||||
;; (concat
|
||||
;; "\n(cp/ffmpeg-process-count) - "
|
||||
;; (number-to-string (cp/ffmpeg-process-count))
|
||||
;; "\n(process-list) - \n"
|
||||
;; (apply 'concat " " (-interpose "\n " (-map 'process-name (process-list))))
|
||||
;; "\ntimer-list - \n"
|
||||
;; (apply 'concat " " (-interpose "\n " (-map 'prin1-to-string timer-list)))
|
||||
;; "\n\n"))
|
||||
;; (set-window-point
|
||||
;; (get-buffer-window "log")
|
||||
;; (point-max))
|
||||
;; (recenter))
|
||||
|
||||
;; (temp-buffer-window-show "*dired-ffmpeg*")
|
||||
|
||||
(defun cp/dired-do-ediff (&optional format)
|
||||
"Ediff (first two or three) marked files."
|
||||
(interactive)
|
||||
(let* ((files (dired-get-marked-files t))
|
||||
(file-1 (car files))
|
||||
(files-dir default-directory))
|
||||
;; 2018-04-08T11:31:20+0530 TODO - if there is only one marked
|
||||
;; file, check the other window for a marked file and ediff with
|
||||
;; that.
|
||||
(case (length files)
|
||||
(1 (progn
|
||||
(other-window 1)
|
||||
(let ((files2 (dired-get-marked-files t))
|
||||
(files2-dir default-directory))
|
||||
(if files2
|
||||
(ediff (expand-file-name
|
||||
(concat files-dir (car files)))
|
||||
(expand-file-name
|
||||
(concat files2-dir (car files2))))))))
|
||||
(2 (ediff file-1
|
||||
(cadr files)))
|
||||
(t (ediff3 file-1
|
||||
(cadr files)
|
||||
(elt files 2))))))
|
||||
|
||||
;; (defvar count 0)
|
||||
|
||||
;; (defun timer-test (count)
|
||||
;; (if (= count 5)
|
||||
;; (progn
|
||||
;; (message "count %s - finito" count)
|
||||
;; (cancel-timer test-timer))
|
||||
;; (progn
|
||||
;; (message "incrementing count - %s" count)
|
||||
;; (setq count (1+ count)))))
|
||||
|
||||
;; ;; works! -
|
||||
;; (let ((a 1) (b 2))
|
||||
;; (setq test-timer
|
||||
;; (run-at-time 1 nil `(lambda () (message "%d" (+ ,a ,b))))))
|
||||
|
||||
;; ;; works
|
||||
;; (let ((a 1))
|
||||
;; (setq my-timer
|
||||
;; (run-with-timer 5 5 (lambda ()
|
||||
;; (message "I cancelled my-timer")
|
||||
;; (cancel-timer my-timer)))))
|
||||
|
||||
;; ;; works
|
||||
;; (setq my-timer
|
||||
;; (run-with-timer 5 5 (lambda ()
|
||||
;; (message "I cancelled my-timer")
|
||||
;; (cancel-timer my-timer))))
|
||||
|
||||
;; ;; works
|
||||
;; (defvar test t)
|
||||
;; (defun process-queue ()
|
||||
;; (if test
|
||||
;; (progn
|
||||
;; (message "process-queue says hi")
|
||||
;; (run-with-timer 5 nil 'process-queue))
|
||||
;; (message "process-queue says bye")))
|
||||
|
||||
;; (let ((a 1) (b 2) (time 5))
|
||||
;; (setq test-timer
|
||||
;; (run-at-time 5 5
|
||||
;; `(lambda ()
|
||||
;; (message "test-timer - %d" ,a)
|
||||
;; (setq a (1+ ,a))))))
|
||||
|
||||
;; (progn
|
||||
;; (run-at-time "2 sec" nil (lambda () (message "bye!")))
|
||||
;; (message "hi!"))
|
||||
|
||||
(defun cp/nth-filename-this-line (&optional count)
|
||||
(let ((file (buffer-substring-no-properties
|
||||
(progn
|
||||
(beginning-of-line)
|
||||
(search-forward "/" nil t count)
|
||||
(forward-char -1)
|
||||
(point))
|
||||
(or (progn
|
||||
(re-search-forward " und /" (point-at-eol) t)
|
||||
(re-search-backward " " nil t 2))
|
||||
(progn
|
||||
(re-search-forward " sind verschieden." (point-at-eol) t)
|
||||
(re-search-backward " " nil t 2))
|
||||
(- (point-at-eol) 1)))))
|
||||
(if (file-exists-p file)
|
||||
file
|
||||
(replace-regexp-in-string ": " "/" file))))
|
||||
|
||||
(defun cp/copy-to-ehdd ()
|
||||
"Copy files using file names from diff(1) output."
|
||||
(interactive)
|
||||
(re-search-forward "^Nur in /media/alpha/")
|
||||
(let* ((file (cp/nth-filename-this-line))
|
||||
(dest (replace-regexp-in-string "^/media/alpha/"
|
||||
"/media/kashish-wd-1tb/alpha/"
|
||||
file)))
|
||||
(forward-line)
|
||||
(if (file-directory-p file)
|
||||
(copy-directory file dest t t t)
|
||||
(copy-file file dest nil t t t))))
|
||||
|
||||
(defun cp/diff-ediff ()
|
||||
(interactive)
|
||||
(beginning-of-line)
|
||||
(let ((file1 (cp/nth-filename-this-line))
|
||||
(file2 (cp/nth-filename-this-line 2)))))
|
||||
|
||||
(defun cp/diff-show-file ()
|
||||
(interactive)
|
||||
(let ((file (cp/nth-filename-this-line)))
|
||||
(dired-jump t file)
|
||||
(message file)))
|
||||
|
||||
(with-eval-after-load 'diff-mode
|
||||
(define-key diff-mode-map (kbd "C-o") 'cp/diff-show-file))
|
||||
|
||||
(defun cp/dired-update-all ()
|
||||
(mapc (lambda (b)
|
||||
(with-current-buffer b
|
||||
(if (equal major-mode 'dired-mode)
|
||||
(find-alternate-file (dired-current-directory)))))
|
||||
(buffer-list)))
|
||||
|
||||
(defun cp/done-matches (&optional count)
|
||||
(interactive "P")
|
||||
(let ((case-fold-search nil)
|
||||
(count (if count count 1)))
|
||||
(flet ((done-matches-op
|
||||
()
|
||||
(when (re-search-forward "^/media/kashish-wd-1tb/alpha/kashish/new-stuff/7-music/playerdump/")
|
||||
(let* ((para-start (progn
|
||||
(re-search-backward "^[0-9]+ bytes each:$")
|
||||
(point)))
|
||||
(matches (progn (forward-line 1)
|
||||
(count-lines (point)
|
||||
(progn
|
||||
(forward-paragraph)
|
||||
(point))))))
|
||||
(when (= matches 2)
|
||||
(delete-region (point)
|
||||
(progn
|
||||
(forward-paragraph -1)
|
||||
(point))))))))
|
||||
(if (= count 0)
|
||||
(while (not (eobp))
|
||||
(done-matches-op))
|
||||
(dotimes (i count)
|
||||
(done-matches-op))))))
|
||||
|
||||
(defun cp/change-all-units ()
|
||||
"for fdupes output"
|
||||
(interactive)
|
||||
(while (re-search-forward "^[0-9]+" nil t)
|
||||
(shell-command-on-region (point-at-bol) (point) "numfmt --to=iec-i --suffix=B" nil t)
|
||||
(forward-word)
|
||||
(delete-region (point) (progn (forward-word) (point)))))
|
||||
|
||||
(defun cp/launch-file-archive ()
|
||||
(interactive)
|
||||
(launch-file
|
||||
(concat
|
||||
default-directory
|
||||
(aref (archive-get-descr) 0))))
|
||||
|
||||
;; (define-key archive-mode-map (kbd "j") 'cp/launch-file-archive)
|
||||
|
||||
;; 2018-02-28T21:00:57+0530
|
||||
(defun cp/corresponding-text-file ()
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(end-of-line)
|
||||
(if (derived-mode-p 'dired-mode)
|
||||
;; 2018-08-05T02:01:26+0530 - support directories too
|
||||
(let* ((file-or-dir (dired-file-name-at-point))
|
||||
(file (if (file-directory-p file-or-dir)
|
||||
(replace-regexp-in-string "/$" "" file-or-dir)
|
||||
file-or-dir)))
|
||||
(find-file (concat file ".txt"))))))
|
||||
|
||||
;; 2018-06-23T09:57:34+0530
|
||||
;; FIXME - probably very fragile, assumes a lot about dired-actual-switches
|
||||
;; BUG - viewing hidden files is okay, but hiding them again never
|
||||
;; seems to work without a find-alternate-file, which in turn
|
||||
;; never seems to work non-interactively. Parts of dired-revert
|
||||
;; seem relevant to this.
|
||||
(defun cp/dired-toggle-hidden ()
|
||||
"Toggle visibility of hidden files."
|
||||
(interactive)
|
||||
(if (string-match-p "-A" dired-listing-switches)
|
||||
(setq dired-actual-switches
|
||||
(replace-regexp-in-string "\\(-A\\).*\\'"
|
||||
"-"
|
||||
dired-listing-switches
|
||||
nil nil 1))
|
||||
(setq dired-actual-switches
|
||||
(replace-regexp-in-string "\\(-\\).*\\'"
|
||||
"-A"
|
||||
dired-listing-switches
|
||||
nil nil 1)))
|
||||
;; (revert-buffer)
|
||||
(dired-revert)
|
||||
;; (find-alternate-file (dired-current-directory)) ;; no good at all
|
||||
|
||||
;; no good either
|
||||
;; (let ((directory (dired-current-directory)))
|
||||
;; (kill-this-buffer)
|
||||
;; (dired directory))
|
||||
)
|
||||
|
||||
;; 2018-07-09T23:22:17+0530
|
||||
;; a little buggy wrt clicks
|
||||
(defun cp/dired-launch-or-open (event)
|
||||
(interactive "e")
|
||||
;; if point is on a folder, open it with dired
|
||||
;; otherwise, call launch-files-dired
|
||||
(if (directory-name-p (dired-file-name-at-point))
|
||||
(dired-find-file)
|
||||
(launch-files-dired nil (dired-get-marked-files))))
|
||||
|
||||
(defun contrapunctus-delete-file-at-point (&optional prefix)
|
||||
(interactive "P")
|
||||
(let ((file (buffer-substring (point-at-bol)
|
||||
(point-at-eol))))
|
||||
(if (file-exists-p file)
|
||||
(progn
|
||||
(delete-file file)
|
||||
(if prefix
|
||||
;; delete current line
|
||||
(delete-region (point-at-bol)
|
||||
(1+ (point-at-eol)))
|
||||
;; delete current paragraph
|
||||
(mark-paragraph)
|
||||
(delete-active-region)
|
||||
(forward-line 2))
|
||||
(message "Deleted %s" file))
|
||||
(error "File %s does not exist!" file))))
|
||||
|
||||
(defun contrapunctus-file-at-point-exists-p ()
|
||||
(interactive)
|
||||
(let ((file (buffer-substring (point-at-bol)
|
||||
(point-at-eol))))
|
||||
(if (and (not (string-empty-p file))
|
||||
(file-exists-p file))
|
||||
(message "%s" t)
|
||||
(error "File %S does not exist!" file))))
|
|
@ -1,36 +0,0 @@
|
|||
;; TODO - make mode-line indicator prominent by placing it first, like in Evil
|
||||
|
||||
(use-package god-mode
|
||||
:disabled
|
||||
:bind ("<escape>" . god-mode-all)
|
||||
:init (god-mode-all)
|
||||
:config
|
||||
;; from https://github.com/chrisdone/god-mode#change-modeline-color
|
||||
(defun c/god-mode-update-cursor ()
|
||||
(cond (god-local-mode
|
||||
(progn
|
||||
(setq cursor-type 'box)
|
||||
(set-face-background 'mode-line "black")
|
||||
(set-face-background 'mode-line-inactive "black")))
|
||||
(t
|
||||
(progn
|
||||
(setq cursor-type 'bar)
|
||||
(set-face-background 'mode-line "dark red")
|
||||
(set-face-background 'mode-line-inactive "dark red")))))
|
||||
(add-hook 'god-mode-enabled-hook #'c/god-mode-update-cursor)
|
||||
(add-hook 'god-mode-disabled-hook #'c/god-mode-update-cursor)
|
||||
:custom
|
||||
(god-exempt-major-modes nil)
|
||||
(god-exempt-predicates nil))
|
||||
|
||||
;; for helm
|
||||
;; (define-key helm-map (kbd "<escape>") 'god-local-mode)
|
||||
|
||||
(use-package god-mode-isearch
|
||||
:bind
|
||||
((:map isearch-mode-map
|
||||
("<escape>" . god-mode-isearch-activate))
|
||||
(:map god-mode-isearch-map
|
||||
("<escape>" . god-mode-isearch-disable))))
|
||||
|
||||
(provide 'cp-god)
|
|
@ -82,3 +82,5 @@
|
|||
;; (gethash "ऩ्" (car indian-dev-itrans-v5-hash))
|
||||
;; (gethash "न्ह" (car indian-dev-itrans-v5-hash))
|
||||
;; (gethash "nh" (cdr indian-dev-itrans-v5-hash))
|
||||
|
||||
(provide 'cp-hindi)
|
||||
|
|
|
@ -31,13 +31,6 @@
|
|||
:disabled
|
||||
:bind ("M-x" . smex))
|
||||
|
||||
(use-package ido-mini
|
||||
:bind (("C-x C-l" . ido-mini)
|
||||
:map boon-x-map
|
||||
("l" . ido-mini))
|
||||
:config
|
||||
(ivy-mode))
|
||||
|
||||
;; This creates a bug with shell completion if you're using ivy mode.
|
||||
(unless (bound-and-true-p ivy-mode)
|
||||
(setq completion-styles
|
||||
|
|
|
@ -1,165 +0,0 @@
|
|||
;;;; Hacks for Lilypond work
|
||||
(use-package lilypond-mode
|
||||
:bind
|
||||
(("C-c C-i" . LilyPond-info)
|
||||
("M-]" . set-selective-display)
|
||||
:map LilyPond-mode-map
|
||||
("M-p" . cp-backward-def)
|
||||
("M-n" . cp-forward-def)
|
||||
("M-P" . cp-upper-level)
|
||||
("M-N" . cp-lower-level)
|
||||
("C-c C-w" . cp-ly-wrap-para))
|
||||
:commands LilyPond-mode
|
||||
:config
|
||||
(--map (add-hook 'LilyPond-mode-hook it)
|
||||
'(subword-mode
|
||||
(lambda () (turn-on-font-lock))))
|
||||
(defalias 'string-to-int #'string-to-number)
|
||||
:load-path "../user/"
|
||||
:mode (("\\.ly$" . LilyPond-mode)
|
||||
("\\.ily$" . LilyPond-mode)))
|
||||
|
||||
(defvar cp/ly-definition-rx
|
||||
'(and bol
|
||||
(1+ (any "a-z" "A-Z" "\\\\"))
|
||||
(1+ (any "a-z" "A-Z" "\\\\" " "))
|
||||
(any "{" "=" "#")))
|
||||
|
||||
(defun cp-backward-def ()
|
||||
(interactive)
|
||||
(unless (region-active-p)
|
||||
(push-mark))
|
||||
(re-search-backward (rx-to-string cp/ly-definition-rx)
|
||||
nil t)
|
||||
(beginning-of-line)
|
||||
(recenter))
|
||||
|
||||
(defun cp-forward-def ()
|
||||
(interactive)
|
||||
(let* ((regex (rx-to-string cp/ly-definition-rx))
|
||||
(count (if (looking-at-p regex) 2 1)))
|
||||
(unless (region-active-p)
|
||||
(push-mark))
|
||||
;; (forward-char)
|
||||
(if (not (re-search-forward regex nil t count))
|
||||
(re-search-forward "^}" nil t))
|
||||
;; (re-search-forward "^[\\a-zA-Z]" nil t)
|
||||
(beginning-of-line)
|
||||
(recenter)))
|
||||
|
||||
;; (defun cp-backward-def ()
|
||||
;; (interactive)
|
||||
;; (re-search-backward "\(^\\\\?[a-zA-Z]\|^ *\\[a-zA-Z]\)")
|
||||
;; (beginning-of-line))
|
||||
|
||||
;; (defun cp-forward-def ()
|
||||
;; (interactive)
|
||||
;; (forward-char)
|
||||
;; (re-search-forward "\(^\\\\?[a-zA-Z]\|^ *\\[a-zA-Z]\)")
|
||||
;; (beginning-of-line))
|
||||
|
||||
(defun cp-upper-level ()
|
||||
(interactive)
|
||||
(re-search-backward "{"))
|
||||
|
||||
(defun cp-lower-level ()
|
||||
(interactive)
|
||||
(if (equal (string (char-after)) "{")
|
||||
(forward-char))
|
||||
(if (not (re-search-forward "{"))
|
||||
(message "At deepest level."))
|
||||
(backward-char))
|
||||
|
||||
;; (defun cp-lilypond-enclose-<< ()
|
||||
;; (interactive)
|
||||
;; (if (equal (string (char-after)) "\\")
|
||||
;; (progn (insert "<< ")
|
||||
;; (search-forward "{")
|
||||
;; (backward-char)
|
||||
;; (forward-sexp))))
|
||||
|
||||
;; if at a \new ... block - enclose expression
|
||||
;; otherwise, enclose current position and after the first bar check
|
||||
;; found
|
||||
;; if region is active, enclose beginning and end
|
||||
|
||||
;; (defun cp-lilypond-enclose-<< ()
|
||||
;; (interactive)
|
||||
;; (if (equal (thing-at-point 'sexp)
|
||||
;; "\\new")
|
||||
;; (progn ;; (insert "<< ")
|
||||
;; (newline-and-indent)
|
||||
;; (search-forward "{")
|
||||
;; (backward-char)
|
||||
;; (forward-list)
|
||||
;; ;; (forward-sexp))
|
||||
;; )
|
||||
;; ;; (let ((point1 (point)))
|
||||
;; ;; (next-line)
|
||||
;; ;; (goto-char point1))
|
||||
;; ))
|
||||
;; (define-key LilyPond-mode-map (kbd "<<")
|
||||
;; 'cp-lilypond-enclose-<<)
|
||||
|
||||
;; If I change files, it's still main.ly that gets compiled; this is
|
||||
;; good most of the time, but many times I want to compile a part-*
|
||||
;; file instead. If we compile both main.ly and the respective part-*
|
||||
;; file every time, it's wasteful. Having to select means giving up
|
||||
;; the 'effortless-compilation' behaviour.
|
||||
|
||||
;; 2017-03-14T00:52:07+0530 - commented out, see cp/after-save
|
||||
;; (defadvice LilyPond-save-buffer
|
||||
;; (after lysb activate)
|
||||
;; ;; (compile "make")
|
||||
;; (cd (locate-dominating-file (buffer-file-name)
|
||||
;; "main.ly"))
|
||||
;; (compile (car compile-history)))
|
||||
;;
|
||||
;; (defadvice compile
|
||||
;; (before compile activate)
|
||||
;; (if (equal major-mode 'LilyPond-mode)
|
||||
;; (cd (locate-dominating-file (buffer-file-name)
|
||||
;; "main.ly"))))
|
||||
|
||||
;; TODO - refactor into one COND, with one case per operation.
|
||||
;; TODO - operate on region as well.
|
||||
(defun cp-ly-wrap-para (arg)
|
||||
"Wrap current paragraph with -
|
||||
\\relative c { ... } with no args,
|
||||
\\repeat { ... } with universal argument,
|
||||
and only braces - { ... } - with null argument.
|
||||
|
||||
Numeric arg wraps that many paragraphs.
|
||||
|
||||
TODO - wrap region if region active"
|
||||
(interactive "P")
|
||||
(let ((point-a (point)))
|
||||
(beginning-of-line)
|
||||
(unless (looking-at "[[:blank:]]*$")
|
||||
;; go to start of paragraph or block, or previous blank line
|
||||
(re-search-backward (rx (or (and bol (0+ blank) eol)
|
||||
(and "{" eol))))
|
||||
(end-of-line))
|
||||
(newline-and-indent)
|
||||
(insert (pcase arg
|
||||
(`(,x) "\\repeat {")
|
||||
(0 "{")
|
||||
;; nil
|
||||
(_ "\\relative c {")))
|
||||
(let ((indent-start (point)))
|
||||
(forward-paragraph (pcase arg
|
||||
(`(,x) 1)
|
||||
(_ (if (and arg (<= arg 0))
|
||||
1 arg))))
|
||||
(indent-region indent-start (point))
|
||||
(insert "}")
|
||||
(indent-for-tab-command)
|
||||
(newline)
|
||||
;; FIXME
|
||||
(goto-char (pcase arg
|
||||
(0 point-a)
|
||||
(_ (- indent-start 2)))))))
|
||||
|
||||
;; TODO - cp-ly-new-var, bind to M-RET.
|
||||
;; Exits current variable body, if in any, and inserts "| = \relative
|
||||
;; c {\n\n \n}", where | is the cursor
|
|
@ -1,97 +0,0 @@
|
|||
;; (require 'chicken)
|
||||
|
||||
(setq print-length nil
|
||||
eval-expression-print-length nil)
|
||||
|
||||
;; (require 'slime)
|
||||
(require 'slime-autoloads)
|
||||
(global-set-key (kbd "<f5> s") 'slime)
|
||||
(with-eval-after-load 'slime
|
||||
(slime-setup)
|
||||
(setq inferior-lisp-program
|
||||
;; "/usr/bin/sbcl"
|
||||
"/usr/bin/ecl"
|
||||
)
|
||||
(cp-set-keys
|
||||
:keymap slime-mode-map
|
||||
:bindings
|
||||
`((,(kbd "M-n") next-line)
|
||||
(,(kbd "M-p") previous-line)
|
||||
(,(kbd "SPC") self-insert-command))))
|
||||
|
||||
(defun set-cl-repl-keys ()
|
||||
(if (or (cp-buffer-name-match-p "^\*inferior-lisp\*\\(<[0-9]*>\\)?")
|
||||
(eq major-mode 'lisp-mode))
|
||||
(progn
|
||||
(local-set-key (kbd "TAB") 'completion-at-point)
|
||||
(local-set-key (kbd "M-q") 'sp-indent-defun))))
|
||||
|
||||
(add-hook 'slime-connected-hook 'set-cl-repl-keys)
|
||||
(add-hook 'comint-mode-hook 'set-cl-repl-keys)
|
||||
(add-hook 'lisp-mode-hook 'set-cl-repl-keys)
|
||||
|
||||
(setq scheme-program-name "csi -:c")
|
||||
(setq comint-prompt-read-only t)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.scm\\'" . scheme-mode))
|
||||
;; (add-to-list 'auto-mode-alist '("\\.scm\\'" . geiser-mode))
|
||||
;; (require 'geiser)
|
||||
|
||||
(use-package geiser
|
||||
:commands (run-chicken run-guile geiser-mode))
|
||||
;; (with-eval-after-load 'geiser-mode
|
||||
;; (setq geiser-mode-smart-tab-p t)
|
||||
;; (define-key geiser-mode-map (kbd "C-.") nil)
|
||||
;; ;; (cp-set-keys
|
||||
;; ;; :unset t
|
||||
;; ;; :keymap geiser-mode-map
|
||||
;; ;; :bindings
|
||||
;; ;; `((,(kbd "C-."))))
|
||||
;; )
|
||||
|
||||
(use-package scheme-mode
|
||||
:defer t
|
||||
:interpreter "csi")
|
||||
|
||||
(defun contrapunctus-lisp-copy (arg)
|
||||
"Run `whole-line-or-region-copy-region-as-kill' if region is
|
||||
active, else `sp-copy-sexp'."
|
||||
(interactive "P")
|
||||
(if (region-active-p)
|
||||
(whole-line-or-region-copy-region-as-kill arg)
|
||||
(sp-copy-sexp arg)))
|
||||
|
||||
(use-package elisp-mode
|
||||
:diminish
|
||||
:bind (:map emacs-lisp-mode-map
|
||||
("<tab>" . completion-at-point)))
|
||||
|
||||
(use-package eldoc
|
||||
:diminish
|
||||
:if (featurep 'elisp-mode)
|
||||
:init (add-hook 'emacs-lisp-mode-hook 'eldoc-mode)
|
||||
:config (setq eldoc-idle-delay 0))
|
||||
|
||||
(defun colorize-compilation-buffer ()
|
||||
(ansi-color-apply-on-region compilation-filter-start
|
||||
(point)))
|
||||
|
||||
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
|
||||
|
||||
(update-file-autoloads "~/.emacs.d/elisp-git/clojure-mode/clojure-mode.el"
|
||||
t
|
||||
"~/.emacs.d/elisp-git/clojure-mode/clojure-autoloads.el")
|
||||
(load "clojure-autoloads")
|
||||
;; (autoload 'clojure-mode "clojure-mode" nil t)
|
||||
(with-eval-after-load "clojure-mode"
|
||||
(require 'cider))
|
||||
|
||||
(use-package nameless
|
||||
:ensure t
|
||||
:commands nameless-mode
|
||||
:init
|
||||
(add-hook 'emacs-lisp-mode-hook 'nameless-mode)
|
||||
(add-hook 'ert-results-mode-hook 'nameless-mode)
|
||||
:bind (:map emacs-lisp-mode-map
|
||||
("C-c C-n" . nameless-mode)))
|
||||
(provide 'cp-lisp)
|
|
@ -1,52 +0,0 @@
|
|||
;; 2018-05-16T17:22:36+0530
|
||||
(add-hook 'markdown-mode-hook '(lambda () (visual-fill-column-mode t)))
|
||||
(add-hook 'markdown-mode-hook '(lambda () (visual-line-mode t)))
|
||||
;; (add-hook 'markdown-mode-hook '(lambda () (turn-off-smartparens-mode)))
|
||||
|
||||
(use-package markdown-mode
|
||||
:mode "\\.md\\'"
|
||||
:init (add-hook 'markdown-mode-hook 'markdown-display-inline-images)
|
||||
:config (setq markdown-command "cmark"
|
||||
markdown-css-paths '("style.css")
|
||||
markdown-display-remote-images t
|
||||
markdown-max-image-size '(500 . 500)
|
||||
;; reflows text to suit different screens
|
||||
markdown-xhtml-header-content
|
||||
(concat "<meta name=\"viewport\" "
|
||||
"content=\"width=device-width, "
|
||||
"initial-scale=1.0, "
|
||||
"user-scalable=yes\" />"))
|
||||
(when (featurep 'boon)
|
||||
(general-def markdown-mode-map
|
||||
"C-c ," 'markdown-promote
|
||||
"C-c ." 'markdown-demote
|
||||
"C-c C-e" 'markdown-export))
|
||||
(setq-default ;; markdown-hide-markup t ;; has a bug with heading cycling
|
||||
markdown-hide-urls t)
|
||||
:bind
|
||||
(:map markdown-mode-map
|
||||
;; ("M-n" . org-drag-element-forward)
|
||||
;; ("M-p" . org-drag-element-backward)
|
||||
;; ("C-c C-o" . markdown-follow-link-at-point)
|
||||
("M-n" . markdown-move-down)
|
||||
("M-p" . markdown-move-up)
|
||||
("C-c C--" . org-cycle-list-bullet)
|
||||
([mouse-1] . markdown-cycle)
|
||||
("C-c C-c C-n" . markdown-cleanup-list-numbers)
|
||||
("C-c C-x C-n" . markdown-next-link)
|
||||
("C-c C-x C-p" . markdown-previous-link)
|
||||
|
||||
("C-c C-h C-u" . #'markdown-toggle-url-hiding)
|
||||
("C-c C-h C-m" . #'markdown-toggle-markup-hiding)
|
||||
("C-c C-h C-i" . #'markdown-toggle-inline-images)
|
||||
("C-c C-r" . #'reverse-region)))
|
||||
|
||||
(defun cp/copy-line-or-md-link (prefix-arg)
|
||||
(interactive "P")
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(if (looking-at-p ".*http")
|
||||
(progn
|
||||
(re-search-line "http")
|
||||
(forward-char -4)
|
||||
(kill-new (thing-at-point 'url))))))
|
|
@ -1,133 +0,0 @@
|
|||
;; modal editing configurations
|
||||
|
||||
;; normal boon config
|
||||
(use-package boon
|
||||
:ensure t
|
||||
:commands (boon-mode)
|
||||
:bind
|
||||
(:map boon-command-map
|
||||
("C-l" . recenter-top-bottom)
|
||||
("r" . swiper)
|
||||
("/" . undo-tree-undo)
|
||||
("?" . undo-tree-redo)
|
||||
("G" . join-line) ;; mnemonic - Glue (I'd like to bind J and
|
||||
;; : to sentence movement once I extend
|
||||
;; Boon to select by sentence movement)
|
||||
;; ("TAB" . 'company-indent-or-complete-common)
|
||||
("C" . 'boon-toggle-comment)
|
||||
("t" . nil)
|
||||
("t w" . 'transpose-words)
|
||||
("t e" . 'transpose-sexps)
|
||||
("t l" . 'transpose-lines)
|
||||
("t p" . 'transpose-paragraphs)
|
||||
("t c" . 'transpose-chars))
|
||||
(:map boon-x-map
|
||||
("w" . 'write-file)
|
||||
("s" . 'save-buffer)
|
||||
("d" . 'dired-jump)
|
||||
("e" . 'eval-last-sexp)
|
||||
("f" . 'find-file)
|
||||
("l" . 'ido-mini)
|
||||
("c" . 'kill-emacs)
|
||||
("v" . 'find-alternate-file)
|
||||
("b" . 'ibuffer)
|
||||
("=" . text-scale-adjust)
|
||||
("-" . text-scale-adjust))
|
||||
:config
|
||||
(use-package boon-qwerty)
|
||||
(add-to-list 'boon-enclosures `(40 "(" ")")) ;; 40 = (
|
||||
(use-package boon-powerline)
|
||||
(boon-powerline-theme)
|
||||
(mapc (lambda (mode)
|
||||
(add-to-list 'boon-special-mode-list mode))
|
||||
'(emms-playlist-mode
|
||||
emms-browser-mode
|
||||
edebug-mode))
|
||||
(add-to-list 'boon-special-conditions '(bound-and-true-p edebug-mode))
|
||||
;; :hook
|
||||
;; ((text-mode . turn-on-boon-mode)
|
||||
;; (prog-mode . turn-on-boon-mode)
|
||||
;; (shell-mode . turn-on-boon-mode)
|
||||
;; (helpful-mode . turn-on-boon-mode)
|
||||
;; (fundamental-mode . turn-on-boon-mode))
|
||||
:init
|
||||
(boon-mode))
|
||||
|
||||
;; experimental boon+modalka config
|
||||
(use-package boon
|
||||
:ensure t
|
||||
:disabled
|
||||
:bind
|
||||
("C-d" . 'boon-take-region)
|
||||
("C-a" . 'boon-beginning-of-line)
|
||||
("C-e" . 'boon-end-of-line)
|
||||
("M-f" . 'boon-smarter-forward)
|
||||
("M-b" . 'boon-smarter-backward))
|
||||
|
||||
;; experimental Emacs-flavored-Boon config
|
||||
(use-package boon
|
||||
:ensure t
|
||||
:disabled
|
||||
:bind
|
||||
(:map boon-command-map
|
||||
("n" . next-line)
|
||||
("p" . previous-line)
|
||||
("f" . 'forward-char)
|
||||
("b" . 'backward-char)
|
||||
("a" . 'boon-beginning-of-line)
|
||||
("e" . 'boon-end-of-line)
|
||||
("y" . 'boon-splice)
|
||||
("r" . swiper)
|
||||
("x l" . ido-mini)
|
||||
("/" . undo-tree-undo)
|
||||
("?" . undo-tree-redo))
|
||||
(:map boon-x-map
|
||||
("s" . #'save-buffer)
|
||||
("d" . #'dired-jump))
|
||||
:config
|
||||
(use-package boon-qwerty)
|
||||
(boon-mode))
|
||||
|
||||
(use-package modalka
|
||||
:ensure t
|
||||
:disabled
|
||||
:bind
|
||||
(("<escape>" . #'modalka-mode)
|
||||
:map modalka-mode-map
|
||||
("J" . #'join-line)
|
||||
("P" . #'backward-paragraph)
|
||||
("N" . #'forward-paragraph)
|
||||
("M" . mark-sexp))
|
||||
;; (2019-11-03) I'm pretty much using this to emulate `god-mode',
|
||||
;; which was great, but is no longer actively developed and had no
|
||||
;; support for non-Latin input methods.
|
||||
:config
|
||||
(let ((keybind-re (rx-to-string '(group-n 1 (or (and bow (1+ (char graph)) eow)
|
||||
(and (1+ (char graph))))))))
|
||||
(mapc
|
||||
(lambda (actual)
|
||||
(let ((target (replace-regexp-in-string keybind-re "C-\\1" actual)))
|
||||
(modalka-define-kbd actual target)))
|
||||
;; no "t", "x", or "c", because they are prefix keys used later
|
||||
'("`" "1" "2" "3" "4" "5" "6" "7" "8" "9" "0" "-" "="
|
||||
"q" "w" "e" "r" "y" "u" "i" "o" "p" "[" "]" "\\"
|
||||
"a" "s" "d" "f" "h" "j" "k" "l" ";" "'"
|
||||
"z" "v" "b" "n" "m" "," "." "/"
|
||||
"<" ">" "?"
|
||||
"SPC"
|
||||
;; (2019-11-03) It's a little unfortunate that these cannot be
|
||||
;; elided by entering ("x" "C-x") ("t" "C-t") ("c" "C-c") just
|
||||
;; once :\ (I did try)
|
||||
"x =" "x -" "x e" "x s" "x d"
|
||||
"x f" "x l" "x x" "x c" "x v" "x b"
|
||||
"t w" "t e" "t l"
|
||||
"c n" "c ," "c ." "c p"
|
||||
"c c n" "c h u" "c h m")))
|
||||
(modalka-define-kbd "O" "C-S-o")
|
||||
(setq-default cursor-type '(bar . 1))
|
||||
(setq modalka-cursor-type 'box)
|
||||
:hook
|
||||
((text-mode . modalka-mode)
|
||||
(prog-mode . modalka-mode)))
|
||||
|
||||
(provide 'cp-modal)
|
|
@ -1,168 +0,0 @@
|
|||
(require 'cp)
|
||||
|
||||
;;;; Navigation improvements
|
||||
|
||||
(add-to-list 'load-path "~/.emacs.d/elisp-git/window-numbering/")
|
||||
|
||||
;; Vim-style prompt-less tag jumping
|
||||
;; http://stackoverflow.com/questions/12074897/automatically-jump-to-tag-in-emacs
|
||||
(global-unset-key (kbd "M-t"))
|
||||
(defun find-tag-no-prompt-other-window ()
|
||||
"Jump to the tag at point in the other window without prompting."
|
||||
(interactive)
|
||||
(find-tag-other-window (find-tag-default)))
|
||||
(defun find-tag-no-prompt ()
|
||||
"Jump to the tag at point without prompting."
|
||||
(interactive)
|
||||
(find-tag (find-tag-default)))
|
||||
|
||||
(cp-set-keys
|
||||
:bindings
|
||||
`((,(kbd "M-t M-t") find-tag-no-prompt-other-window)
|
||||
(,(kbd "M-t M-g") find-tag-no-prompt)
|
||||
(,(kbd "M-t M-p") pop-tag-mark)
|
||||
(,(kbd "M-t M-f") find-tag)
|
||||
(,(kbd "M-t M-s") tags-search)
|
||||
(,(kbd "M-t M-c") tags-loop-continue)))
|
||||
|
||||
;; (require 'view)
|
||||
;; (cp-set-keys
|
||||
;; :bindings
|
||||
;; `((,(kbd "C-v") View-scroll-half-page-forward)
|
||||
;; (,(kbd "M-v") View-scroll-half-page-backward)))
|
||||
;; ;; (cp-set-keys
|
||||
;; ;; :bindings
|
||||
;; ;; `((,(kbd "C-v") scroll-up)
|
||||
;; ;; (,(kbd "M-v") scroll-down)))
|
||||
|
||||
;;;; Need to make maps for
|
||||
;;;; mark-* commands (-sexp, -page, -word, etc)
|
||||
;;;; mark ring
|
||||
|
||||
;;;; Other custom keys
|
||||
(cp-set-keys
|
||||
:bindings
|
||||
`((,(kbd "C-x C-1") delete-other-windows)
|
||||
(,(kbd "C-x C-2") split-window-below)
|
||||
(,(kbd "C-x C-3") split-window-right)
|
||||
(,(kbd "C-x C-0") delete-window)
|
||||
(,(kbd "C-x C-4 C-f") find-file-other-window)
|
||||
;; (,(kbd "C-`") point-to-register)
|
||||
;; (,(kbd "C-'") jump-to-register)
|
||||
(,(kbd "C-x C-d") dired-jump)
|
||||
;; I usually keep Super for the window manager and global hotkeys...
|
||||
(,(kbd "s-i") imenu)
|
||||
;; keypad
|
||||
|
||||
;; set this to run whatever command is bound to C-c C-c, or maybe just C-c
|
||||
;; see (info "(elisp)Translation Keymaps")
|
||||
(,(kbd "<kp-divide>"))
|
||||
(,(kbd "<kp-multiply>") cp/copy-buffer)
|
||||
(,(kbd "<kp-subtract>") erc-track-switch-buffer)
|
||||
(,(kbd "S-<kp-subtract>") cp-kill-buffer)
|
||||
|
||||
(,(kbd "<kp-home>") delete-other-windows)
|
||||
(,(kbd "<kp-up>") split-window-below)
|
||||
(,(kbd "<kp-prior>") split-window-right)
|
||||
|
||||
(,(kbd "<kp-begin>") ido-mini)
|
||||
|
||||
(,(kbd "<kp-add>") save-buffer)
|
||||
(,(kbd "S-<kp-add>") (lambda () (interactive) (call-interactively (ert-run-tests-interactively t))))
|
||||
(,(kbd "<kp-enter>") eval-defun)
|
||||
(,(kbd "S-<kp-enter>") eval-buffer)
|
||||
(,(kbd "C-S-<kp-enter>") toggle-debug-on-error)
|
||||
|
||||
(,(kbd "<kp-end>") select-window-1)
|
||||
(,(kbd "<kp-down>") select-window-2)
|
||||
(,(kbd "<kp-next>") select-window-3)
|
||||
|
||||
(,(kbd "<kp-insert>") chronometrist)
|
||||
(,(kbd "C-<kp-insert>") chronometrist-report)
|
||||
(,(kbd "<kp-delete>") abort-recursive-edit)))
|
||||
|
||||
(with-eval-after-load 'dired
|
||||
(define-key dired-mode-map (kbd "b") 'dired-up-directory)
|
||||
;; (add-hook 'dired-mode-hook 'visual-line-mode)
|
||||
;(global-set-key (kbd "C-,") 'string-rectangle 'TAB)
|
||||
)
|
||||
(global-unset-key (kbd "C-x d"))
|
||||
|
||||
;; (require 'dired-toggle-sudo)
|
||||
;; (define-key dired-mode-map (kbd "C-c C-s") 'dired-toggle-sudo)
|
||||
;; (eval-after-load 'tramp
|
||||
;; '(progn
|
||||
;; ;; Allow to use: /sudo:user@host:/path/to/file
|
||||
;; (add-to-list 'tramp-default-proxies-alist
|
||||
;; '(".*" "\\`.+\\'" "/ssh:%h:"))))
|
||||
(global-set-key (kbd "C-x df") 'delete-frame)
|
||||
;;;; make-frame key is after Helm's config
|
||||
|
||||
;(setq compilation-read-command nil)
|
||||
(defun cp-open-init ()
|
||||
"Open the init.el file."
|
||||
(interactive)
|
||||
(find-file "~/.emacs.d/init.el"))
|
||||
;; todo - store current file name → kill the buffer →
|
||||
;; find-file-literally with the stored filename. also, find out if you
|
||||
;; can open it without modes but with the proper encoding.
|
||||
(defun cp-fcf-literally ()
|
||||
"Find the current file literally. Like find-file-literally but
|
||||
does not prompt for a file name."
|
||||
(interactive)
|
||||
(find-file-literally (buffer-file-name)))
|
||||
(defun cp-kill-buffer ()
|
||||
"Kill the current buffer without prompting."
|
||||
(interactive)
|
||||
(kill-buffer nil))
|
||||
|
||||
(autoload 'ibuffer "ibuffer" "ibuffer" t)
|
||||
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
||||
(with-eval-after-load 'ibuffer
|
||||
(cp-set-keys
|
||||
:unset t
|
||||
:keymap ibuffer-mode-map
|
||||
:bindings
|
||||
`((,(kbd "m"))
|
||||
(,(kbd "U"))))
|
||||
(cp-set-keys
|
||||
:keymap ibuffer-mode-map
|
||||
:bindings
|
||||
`((,(kbd "m f") ibuffer-mark-by-file-name-regexp)
|
||||
(,(kbd "m m") ibuffer-mark-by-mode-regexp)
|
||||
(,(kbd "m n") ibuffer-mark-by-name-regexp)
|
||||
(,(kbd "M") ibuffer-mark-forward)
|
||||
(,(kbd "r") ibuffer-do-replace-regexp)
|
||||
(,(kbd "U") ibuffer-unmark-all)))
|
||||
(add-hook 'ibuffer-mode-hook 'ibuffer-set-filter-groups-by-mode))
|
||||
|
||||
;; (require 'win-switch)
|
||||
;; (global-set-key "\C-xo" 'win-switch-dispatch)
|
||||
;; (win-switch-setup-keys-ijkl)
|
||||
;; (setq win-switch-idle-time 0.5)
|
||||
;; (setq win-switch-other-window-first nil)
|
||||
;; ;(setq win-switch-other-window-first nil)
|
||||
|
||||
(require 'window-numbering)
|
||||
(window-numbering-mode 1)
|
||||
|
||||
(defun cp-maximize-window ()
|
||||
"Run maximize-window if more than one window is present."
|
||||
(interactive)
|
||||
(if (> (length (window-list)) 1)
|
||||
(maximize-window)))
|
||||
|
||||
(defun cp-minimize-window ()
|
||||
"Run minimize-window if more than one window is present."
|
||||
(interactive)
|
||||
(if (> (length (window-list)) 1)
|
||||
(minimize-window)))
|
||||
|
||||
(with-eval-after-load 'doc-view
|
||||
(define-key doc-view-mode-map (kbd "=") 'doc-view-fit-height-to-window))
|
||||
|
||||
(with-eval-after-load 'view-mode
|
||||
(define-key view-mode-map (kbd "x") nil)
|
||||
(define-key view-mode-map (kbd "<backspace>") 'scroll-down-command))
|
||||
|
||||
(provide 'cp-nav)
|
|
@ -1,210 +0,0 @@
|
|||
(use-package org
|
||||
:config
|
||||
(general-def "<f5> o" 'org-mode)
|
||||
(general-def org-mode-map
|
||||
"C-," 'nil
|
||||
"M-n" 'org-metadown
|
||||
"M-p" 'org-metaup
|
||||
"C-c C--" 'org-ctrl-c-minus
|
||||
"C-c C-," 'org-metaleft
|
||||
"C-c C-." 'org-metaright
|
||||
;; "C-j" 'org-return
|
||||
;; "C-m" 'org-return-indent
|
||||
"C-c C-9" 'org-mark-ring-goto
|
||||
"C-c C-/" 'org-sparse-tree
|
||||
"M-w" 'cp-copy-line-or-link
|
||||
"C-c C-]" 'org-set-tags
|
||||
"C-M-x" 'cp/eval-sexp
|
||||
"C-c C-o" 'cp/org-open
|
||||
;; boon
|
||||
"C-c C--" 'org-ctrl-c-minus
|
||||
"C-c ]" 'org-set-tags)
|
||||
(mapc (lambda (pair)
|
||||
(add-to-list 'org-file-apps pair))
|
||||
'(("txt" . emacs)
|
||||
("org" . emacs)
|
||||
;; ("pdf" . zathura)
|
||||
("\\(?:gif\\|jpe?g\\|png\\)" . "sxiv -f %s")
|
||||
;; (t . "xdg-open %s")
|
||||
|
||||
("pdf" . system)
|
||||
;; ("pdf" . "zathura %s")
|
||||
;; (auto-mode . emacs)
|
||||
;; (system . "xdg-open %s")
|
||||
(system . "zathura %s")
|
||||
;; (t . system)
|
||||
))
|
||||
(setq org-todo-keywords '((sequence "TODO" "RESEARCH" "STARTED" "DONE"))
|
||||
org-image-actual-width 400
|
||||
org-cycle-include-plain-lists 'integrate
|
||||
org-link-search-must-match-exact-headline nil
|
||||
|
||||
org-html-head
|
||||
;; made to resemble Firefox's reader mode, dark setting
|
||||
"<style type=text/css>
|
||||
body {
|
||||
margin: 40px auto;
|
||||
max-width: 650px;
|
||||
line-height: 1.6;
|
||||
font-size: 18px;
|
||||
color: #eeeeee !important;
|
||||
padding: 0 10px;
|
||||
background-color: #333333;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
h1,h2,h3 {
|
||||
line-height: 1.2;
|
||||
}
|
||||
a,a:visited {
|
||||
color: #07a;
|
||||
}
|
||||
img {
|
||||
max-width: 80%;
|
||||
height: auto;
|
||||
width: auto\9; /* ie8 */
|
||||
}
|
||||
</style>"
|
||||
|
||||
;; ;; mix of motherfuckingwebsite.com + bettermotherfuckingwebsite.com + thebestmotherfucking.website
|
||||
|
||||
;; "<style type=text/css>
|
||||
;; body {
|
||||
;; margin: 40px auto;
|
||||
;; max-width: 650px;
|
||||
;; line-height: 1.6;
|
||||
;; font-size: 18px;
|
||||
;; color: #444;
|
||||
;; padding: 0 10px;
|
||||
;; background-color: #eeeeee;
|
||||
;; font-family: sans-serif;
|
||||
;; }
|
||||
;; h1,h2,h3 {
|
||||
;; line-height: 1.2;
|
||||
;; }
|
||||
;; a,a:visited {
|
||||
;; color: #07a;
|
||||
;; }
|
||||
;; img {
|
||||
;; max-width: 80%;
|
||||
;; height: auto;
|
||||
;; width: auto\9; /* ie8 */
|
||||
;; }
|
||||
;; </style>"
|
||||
|
||||
org-export-default-inline-image-rule
|
||||
`(("https" .
|
||||
,(format "\\.%s\\'"
|
||||
(regexp-opt
|
||||
'("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm"
|
||||
"xpm" "pbm" "pgm" "ppm" "webp") t)))
|
||||
("file" .
|
||||
,(format "\\.%s\\'"
|
||||
(regexp-opt
|
||||
'("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm"
|
||||
"xpm" "pbm" "pgm" "ppm" "webp") t))))))
|
||||
|
||||
;; (defun cp-org-expand-all ()
|
||||
;; (interactive)
|
||||
;; ;; todo - define inner recursive function
|
||||
;; (beginning-of-buffer)
|
||||
;; ;; todo - check if we are on a heading
|
||||
;; (org-forward-heading-same-level)
|
||||
;; ())
|
||||
|
||||
(defvar cp/org-heading-or-list-rx
|
||||
'(and
|
||||
;; headings
|
||||
(zero-or-more "*")
|
||||
(zero-or-more blank)
|
||||
;; list items
|
||||
(zero-or-one
|
||||
(or "- " "+ " "* "
|
||||
(and (one-or-more (char "0-9"))
|
||||
(or ". " ") "))))
|
||||
(zero-or-one (and "[" nonl "] "))))
|
||||
|
||||
(defun org-link-ahead-p (&optional link-type)
|
||||
"Returns t if point is before an org-mode link, ignoring
|
||||
whitespace and org-mode header and list syntax, else nil.
|
||||
|
||||
If LINK-TYPE is 'implicit, checks for an implicit link (one not
|
||||
inside single or double brackets); otherwise, checks for links in
|
||||
the form [[address][description]] and [[address]]."
|
||||
(looking-at
|
||||
(rx-to-string
|
||||
(append cp/org-heading-or-list-rx
|
||||
(if (eq link-type 'implicit)
|
||||
'("http")
|
||||
'("["))))))
|
||||
|
||||
(defun cp/org-open (&optional arg reference-buffer)
|
||||
(interactive "P")
|
||||
(save-excursion
|
||||
(re-search-line
|
||||
(rx-to-string
|
||||
(append cp/org-heading-or-list-rx
|
||||
'((or "[" "[[" "http")))))
|
||||
(org-open-at-point arg reference-buffer)))
|
||||
|
||||
(defun cp-copy-line-or-link (prefix-arg)
|
||||
"Copy address of org-mode link after point, ignoring whitespace,
|
||||
link description (if any) and org-mode header and list syntax. If
|
||||
not before a link, or with a prefix arg, call
|
||||
`whole-line-or-region-kill-ring-save' instead.
|
||||
|
||||
BUG - improper behaviour with checkboxes.
|
||||
2018-03-17T21:15:17+0530 - hopefully fixed now."
|
||||
(interactive "P")
|
||||
(let ((point-a (point)))
|
||||
(cl-flet ((copy-to-closing-bracket
|
||||
()
|
||||
(let ((point-b (point)))
|
||||
(re-search-forward "\\]")
|
||||
(copy-region-as-kill point-b
|
||||
(- (point) 1)))))
|
||||
|
||||
(if (save-excursion
|
||||
(or (use-region-p)
|
||||
prefix-arg
|
||||
(re-search-line "\\[[-X ]\\]")))
|
||||
(whole-line-or-region-kill-ring-save prefix-arg)
|
||||
|
||||
(cond ( ;; (org-link-ahead-p)
|
||||
(re-search-line "\\[")
|
||||
;; (if (looking-at "\\[")
|
||||
;; (forward-char))
|
||||
(forward-char)
|
||||
(copy-to-closing-bracket)
|
||||
(goto-char point-a))
|
||||
|
||||
( ;; (org-link-ahead-p 'implicit)
|
||||
(re-search-line "http")
|
||||
(backward-word)
|
||||
(let ((point-b (point)))
|
||||
(re-search-forward (rx (or eol (and printing " "))))
|
||||
(copy-region-as-kill point-b
|
||||
(point)))
|
||||
(goto-char point-a))
|
||||
|
||||
;; TODO - org-previous-link will land you at the start
|
||||
;; of the DESCRIPTION of the previous link, if it has
|
||||
;; one, but to the user it will look like they are at
|
||||
;; the start of the link. Add a case to handle this.
|
||||
|
||||
;; Does not work if there is an org TODO marker in a
|
||||
;; header.
|
||||
|
||||
(t (whole-line-or-region-kill-ring-save prefix-arg)))))))
|
||||
|
||||
(defun cp/org-table-convert-tsv ()
|
||||
(interactive)
|
||||
(with-output-to-temp-buffer "cp/org-table-convert-tsv"
|
||||
(->> (buffer-substring-no-properties (region-beginning) (region-end))
|
||||
(replace-regexp-in-string "^| *" "")
|
||||
(replace-regexp-in-string " *| *" " ")
|
||||
(replace-regexp-in-string "^-.*$" "")))
|
||||
(with-current-buffer "cp/org-table-convert-tsv"
|
||||
(remove-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||
(write-file (read-from-minibuffer "Output filename: "))))
|
||||
|
||||
(provide 'cp-org)
|
|
@ -1,264 +0,0 @@
|
|||
;; (require 'paredit)
|
||||
|
||||
;; (add-hook 'emacs-lisp-mode-hook 'paredit-mode)
|
||||
;; (add-hook 'lisp-mode-hook 'paredit-mode)
|
||||
;; (add-hook 'scheme-mode-hook 'paredit-mode)
|
||||
;; (add-hook 'inferior-scheme-mode-hook 'paredit-mode)
|
||||
;; (add-hook 'inferior-lisp-mode-hook 'paredit-mode)
|
||||
;; (add-hook 'ielm-mode-hook 'paredit-mode)
|
||||
|
||||
;; (global-set-key (kbd "C-x C-p") 'paredit-mode)
|
||||
|
||||
;; (cp-set-keys
|
||||
;; :keymap paredit-mode-map
|
||||
;; :bindings
|
||||
;; `((,(kbd "C-p") paredit-backward-down)
|
||||
;; (,(kbd "C-n") paredit-forward-up)
|
||||
;; (,(kbd "C-b") paredit-backward)
|
||||
;; (,(kbd "C-f") paredit-forward)
|
||||
;; (,(kbd "C-u") paredit-backward-up)
|
||||
;; (,(kbd "C-d") paredit-forward-down)
|
||||
|
||||
;; (,(kbd "M-b") backward-char)
|
||||
;; (,(kbd "M-f") forward-char)
|
||||
;; (,(kbd "M-p") previous-line)
|
||||
;; (,(kbd "M-n") next-line)
|
||||
;; (,(kbd "M-u") paredit-kill-0)
|
||||
;; (,(kbd "M-d") paredit-forward-delete)
|
||||
|
||||
;; (,(kbd "C-M-b") backward-word)
|
||||
;; (,(kbd "C-M-f") forward-word)
|
||||
;; (,(kbd "C-M-u") upcase-word)
|
||||
;; (,(kbd "C-M-d") paredit-forward-kill-word)
|
||||
;; (,(kbd "C-M-p") nil)
|
||||
;; (,(kbd "C-M-n") nil)
|
||||
|
||||
;; (,(kbd "M-w") paredit-copy-as-kill)
|
||||
;; (,(kbd "C-h") paredit-backward-delete)
|
||||
;; (,(kbd "C-w") paredit-backward-kill-word)))
|
||||
|
||||
;; (cp-set-keys
|
||||
;; :keymap comint-mode-map
|
||||
;; :bindings
|
||||
;; `((,(kbd "C-d") paredit-forward-down)
|
||||
;; (,(kbd "C-M-p") comint-previous-input)
|
||||
;; (,(kbd "C-M-n") comint-next-input)))
|
||||
|
||||
(defun cp/sp-after-colon-p (id action context)
|
||||
(save-excursion
|
||||
(forward-char -1)
|
||||
(looking-at-p ":")))
|
||||
|
||||
(use-package smartparens
|
||||
:load-path "~/.emacs.d/elisp-git/smartparens/"
|
||||
:init
|
||||
(smartparens-global-mode)
|
||||
:config
|
||||
(add-to-list 'sp-no-reindent-after-kill-modes 'markdown-mode)
|
||||
:bind
|
||||
(("M-<up>" . sp-splice-sexp-killing-backward)
|
||||
:map smartparens-mode-map
|
||||
("C-)" . sp-forward-slurp-sexp)
|
||||
("C-(" . sp-backward-slurp-sexp)
|
||||
("C-}" . sp-forward-barf-sexp)
|
||||
("C-{" . sp-backward-barf-sexp)
|
||||
("C-j" . sp-newline)
|
||||
("C-|" . sp-join-sexp)
|
||||
|
||||
("C-k" . sp-kill-hybrid-sexp)
|
||||
("C-h" . sp-backward-delete-char)
|
||||
("<backspace>" . sp-backward-delete-char)
|
||||
("C-w" . sp-backward-kill-word)
|
||||
("<C-backspace>" . sp-backward-kill-word)
|
||||
("M-DEL" . sp-backward-kill-word)
|
||||
("M-d" . sp-kill-word)
|
||||
|
||||
("C-M-p" . sp-backward-down-sexp)
|
||||
("C-M-n" . sp-backward-up-sexp)
|
||||
("C-M-b" . sp-backward-sexp)
|
||||
("C-M-f" . sp-forward-sexp)
|
||||
("C-M-u" . sp-up-sexp)
|
||||
("C-M-d" . sp-down-sexp)
|
||||
("C-M-a" . sp-beginning-of-sexp)
|
||||
("C-M-e" . sp-end-of-sexp)
|
||||
|
||||
("C-M-k" . sp-kill-sexp)
|
||||
("C-M-w" . sp-copy-sexp)
|
||||
:map emacs-lisp-mode-map
|
||||
(";" . sp-comment))
|
||||
:hook
|
||||
(eval-expression-minibuffer-setup . smartparens-mode))
|
||||
|
||||
(require 'smartparens)
|
||||
(require 'smartparens-config)
|
||||
(smartparens-global-mode)
|
||||
(add-hook 'paredit-mode-hook 'turn-off-smartparens-mode)
|
||||
;; (sp-pair "(" ")" :trigger-wrap (kbd "M-(") :actions '(insert wrap autoskip navigate escape))
|
||||
(sp-pair "(" ")" :wrap "M-(")
|
||||
(sp-pair "[" "]" :wrap "M-[")
|
||||
(sp-pair "\"" "\"" :wrap "M-\"")
|
||||
;; (global-unset-key (kbd "M-\'"))
|
||||
;; (sp-pair "\'" "\'" :wrap "M-\'") ;; buggy
|
||||
(sp-pair "<" ">" :wrap "M-<")
|
||||
(sp-pair "{" "}" :wrap "M-{")
|
||||
;; (sp-pair "\\\\*" "\\\\*" :actions '(wrap))
|
||||
;; (sp-pair "\\\\*" :wrap)
|
||||
;; (sp-pair "\\\\/" :wrap)
|
||||
|
||||
;; commented out on 2017-06-06T19:25:13+0530 -
|
||||
(add-hook 'erc-mode-hook 'smartparens-mode)
|
||||
;; Disable inserting pair if preceded by : (e.g. in IRC smileys)
|
||||
(defun cp-point-after-colon-p ()
|
||||
(equal (string (char-before)) ":"))
|
||||
;; (sp-pair "(" nil :unless '(cp-point-after-colon-p))
|
||||
|
||||
;;;; sp-backward-kill-word and subword-backward-kill conflict
|
||||
;; (define-key emacs-lisp-mode-map (kbd "C-p") 'sp-previous-sexp)
|
||||
;; (define-key emacs-lisp-mode-map (kbd "C-n") 'sp-next-sexp)
|
||||
|
||||
;; 2016-11-12 - trying something different, hopefully more consistent
|
||||
(defun cp-setup-lisp-keys ()
|
||||
;; (cp-set-keys
|
||||
;; :keymap smartparens-mode-map
|
||||
;; :bindings
|
||||
;; `((,(kbd "C-M-b") nil)
|
||||
;; (,(kbd "C-M-f") nil)
|
||||
;; (,(kbd "C-M-u") nil)
|
||||
;; (,(kbd "C-M-d") nil)
|
||||
;; (,(kbd "C-M-p") nil)
|
||||
;; (,(kbd "C-M-n") nil)))
|
||||
|
||||
;; (cp-set-keys
|
||||
;; :keymap 'local
|
||||
;; :bindings
|
||||
;; `((,(kbd ";") sp-comment)
|
||||
;; (,(kbd "C-p") sp-backward-down-sexp)
|
||||
;; (,(kbd "C-n") sp-backward-up-sexp)
|
||||
;; (,(kbd "C-b") sp-backward-sexp)
|
||||
;; (,(kbd "C-f") sp-forward-sexp)
|
||||
;; (,(kbd "C-u") sp-up-sexp)
|
||||
;; (,(kbd "C-d") sp-down-sexp)
|
||||
;; (,(kbd "C-a") sp-beginning-of-sexp)
|
||||
;; (,(kbd "C-e") sp-end-of-sexp)
|
||||
|
||||
;; (,(kbd "C-k") sp-kill-sexp)
|
||||
;; (,(kbd "M-w") sp-copy-sexp)
|
||||
;; (,(kbd "C-h") sp-backward-delete-char)
|
||||
;; (,(kbd "C-w") sp-backward-kill-word)
|
||||
;; (,(kbd "M-q") sp-indent-defun)
|
||||
|
||||
;; (,(kbd "M-b") backward-char)
|
||||
;; (,(kbd "M-f") forward-char)
|
||||
;; (,(kbd "M-p") previous-line)
|
||||
;; (,(kbd "M-n") next-line)
|
||||
;; (,(kbd "M-u") cp-kill-line-0)
|
||||
;; (,(kbd "M-d") sp-delete-char)
|
||||
;; (,(kbd "M-a") beginning-of-line)
|
||||
;; (,(kbd "M-e") end-of-line)
|
||||
|
||||
;; (,(kbd "C-M-b") backward-word)
|
||||
;; (,(kbd "C-M-f") forward-word)
|
||||
;; (,(kbd "C-M-u") upcase-word)
|
||||
;; (,(kbd "C-M-d") sp-kill-word)))
|
||||
|
||||
;; (cp-set-keys
|
||||
;; :keymap comint-mode-map
|
||||
;; :bindings
|
||||
;; `((,(kbd "C-d") sp-down-sexp)
|
||||
;; (,(kbd "C-M-p") comint-previous-input)
|
||||
;; (,(kbd "C-M-n") comint-next-input)))
|
||||
|
||||
(cp-set-keys
|
||||
:keymap 'local
|
||||
:bindings
|
||||
`((,(kbd "M-q") sp-indent-defun)
|
||||
(,(kbd "M-w") contrapunctus-lisp-copy)))
|
||||
)
|
||||
|
||||
;; experiment
|
||||
(defun cp/erc-sp-keys ()
|
||||
(cp-set-keys
|
||||
:keymap smartparens-mode-map
|
||||
:unset t
|
||||
:bindings
|
||||
`((,(kbd "C-h"))
|
||||
(,(kbd "C-w")))
|
||||
;; `((,(kbd "C-h") backward-delete-char)
|
||||
;; (,(kbd "C-w") backward-kill-word))
|
||||
))
|
||||
|
||||
;; ;; 2016-11-06 - commented out to try a different, hopefully more consistent setup -
|
||||
(add-hook 'emacs-lisp-mode-hook 'cp-setup-lisp-keys)
|
||||
(add-hook 'lisp-mode-hook 'cp-setup-lisp-keys)
|
||||
(add-hook 'scheme-mode-hook 'cp-setup-lisp-keys)
|
||||
(add-hook 'inferior-scheme-mode-hook 'cp-setup-lisp-keys)
|
||||
(add-hook 'ielm-mode-hook 'cp-setup-lisp-keys)
|
||||
|
||||
(add-hook 'eval-expression-minibuffer-setup-hook 'smartparens-mode)
|
||||
(add-hook 'erc-mode 'cp/erc-sp-keys)
|
||||
;; (add-hook 'eval-expression-minibuffer-setup-hook 'cp-setup-lisp-keys)
|
||||
|
||||
;; ielm
|
||||
;; (require 'ielm)
|
||||
;; (define-key ielm-map (kbd "C-p") 'sp-backward-down-sexp)
|
||||
;; (define-key ielm-map (kbd "C-n") 'sp-backward-up-sexp)
|
||||
;; (define-key ielm-map (kbd "C-b") 'sp-backward-sexp)
|
||||
;; (define-key ielm-map (kbd "C-f") 'sp-forward-sexp)
|
||||
;; (define-key ielm-map (kbd "C-u") 'sp-up-sexp)
|
||||
;; (define-key ielm-map (kbd "C-d") 'sp-down-sexp)
|
||||
;; (define-key comint-mode-map (kbd "C-d") 'sp-down-sexp)
|
||||
;; (define-key ielm-map (kbd "C-a") 'sp-beginning-of-sexp)
|
||||
;; (define-key ielm-map (kbd "C-e") 'sp-end-of-sexp)
|
||||
|
||||
;; (define-key ielm-map (kbd "C-k") 'sp-kill-sexp)
|
||||
;; (define-key ielm-map (kbd "M-w") 'sp-copy-sexp)
|
||||
;; (define-key ielm-map (kbd "C-h") 'sp-backward-delete-char)
|
||||
;; (define-key ielm-map (kbd "C-w") 'sp-backward-kill-word)
|
||||
|
||||
;; (define-key ielm-map (kbd "M-b") 'backward-char)
|
||||
;; (define-key ielm-map (kbd "M-f") 'forward-char)
|
||||
;; (define-key ielm-map (kbd "M-p") 'previous-line)
|
||||
;; (define-key ielm-map (kbd "M-n") 'next-line)
|
||||
;; (define-key ielm-map (kbd "M-u") 'cp-kill-line-0)
|
||||
;; (define-key ielm-map (kbd "C-k") 'sp-kill-sexp)
|
||||
;; (define-key ielm-map (kbd "M-d") 'sp-delete-char)
|
||||
|
||||
;; (define-key ielm-map (kbd "C-M-b") 'backward-word)
|
||||
;; (define-key ielm-map (kbd "C-M-f") 'forward-word)
|
||||
;; (define-key ielm-map (kbd "C-M-u") 'upcase-word)
|
||||
;; (define-key ielm-map (kbd "C-M-d") 'sp-kill-word)
|
||||
;; (define-key ielm-map (kbd "C-M-p") nil)
|
||||
;; (define-key ielm-map (kbd "C-M-n") nil)
|
||||
|
||||
;; (define-key comint-mode-map (kbd "C-M-p") 'comint-previous-input)
|
||||
;; (define-key comint-mode-map (kbd "C-M-n") 'comint-next-input)
|
||||
|
||||
|
||||
;; (define-key scheme-mode-map (kbd "C-p") 'sp-backward-down-sexp)
|
||||
;; (define-key scheme-mode-map (kbd "C-n") 'paredit-forward-up)
|
||||
;; (define-key scheme-mode-map (kbd "C-b") 'paredit-backward)
|
||||
;; (define-key scheme-mode-map (kbd "C-f") 'sp-forward-sexp)
|
||||
;; (define-key scheme-mode-map (kbd "C-u") 'paredit-backward-up)
|
||||
;; (define-key scheme-mode-map (kbd "C-d") 'paredit-forward-down)
|
||||
;; (define-key comint-mode-map (kbd "C-d") 'paredit-forward-down)
|
||||
|
||||
;; (define-key scheme-mode-map (kbd "M-b") 'backward-char)
|
||||
;; (define-key scheme-mode-map (kbd "M-f") 'forward-char)
|
||||
;; (define-key scheme-mode-map (kbd "M-p") 'previous-line)
|
||||
;; (define-key scheme-mode-map (kbd "M-n") 'next-line)
|
||||
;; ;; (define-key scheme-mode-map (kbd "M-u") 'paredit-kill-0)
|
||||
;; (define-key scheme-mode-map (kbd "C-k") 'sp-kill-sexp)
|
||||
;; (define-key scheme-mode-map (kbd "M-d") 'sp-delete-char)
|
||||
|
||||
;; (define-key scheme-mode-map (kbd "C-M-b") 'backward-word)
|
||||
;; (define-key scheme-mode-map (kbd "C-M-f") 'forward-word)
|
||||
;; (define-key scheme-mode-map (kbd "C-M-u") 'upcase-word)
|
||||
;; (define-key scheme-mode-map (kbd "C-M-d") 'sp-kill-word)
|
||||
;; (define-key scheme-mode-map (kbd "C-M-p") nil)
|
||||
;; (define-key scheme-mode-map (kbd "C-M-n") nil)
|
||||
;; (define-key comint-mode-map (kbd "C-M-p") 'comint-previous-input)
|
||||
;; (define-key comint-mode-map (kbd "C-M-n") 'comint-next-input)
|
||||
|
||||
;; (define-key scheme-mode-map (kbd "M-w") 'paredit-copy-as-kill)
|
||||
;; (define-key scheme-mode-map (kbd "C-h") 'paredit-backward-delete)
|
||||
;; (define-key scheme-mode-map (kbd "C-w") 'paredit-backward-kill-word)
|
|
@ -24,3 +24,5 @@
|
|||
|
||||
(define-key sfz-mode-map (kbd "M-p") 'sfz-prev-group)
|
||||
(define-key sfz-mode-map (kbd "M-n") 'sfz-next-group)
|
||||
|
||||
(provide 'cp-sfz)
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
(setq TeX-auto-save t
|
||||
TeX-parse-self t
|
||||
TeX-engine 'xetex
|
||||
;; 2017-10-14T18:55:05+0530
|
||||
TeX-view-program-selection '(((output-dvi has-no-display-manager)
|
||||
"dvi2tty")
|
||||
((output-dvi style-pstricks)
|
||||
"dvips and gv")
|
||||
(output-dvi "xdvi")
|
||||
(output-pdf "Zathura")
|
||||
(output-html "xdg-open")))
|
||||
(add-hook 'tex-mode-hook 'TeX-source-correlate-mode)
|
||||
|
||||
;; 2017-10-19T09:19:34+0530 - these should be merged with
|
||||
;; cp-forward-def/cp-backward-def in cp-lily...
|
||||
(defun cp-backward-def ()
|
||||
(interactive)
|
||||
(push-mark)
|
||||
(re-search-backward "\\\\scene" nil t)
|
||||
(beginning-of-line)
|
||||
(recenter))
|
||||
|
||||
(defun cp-forward-def ()
|
||||
(interactive)
|
||||
(push-mark)
|
||||
(if (not (re-search-forward "\\\\scene" nil t 2))
|
||||
(re-search-forward "\\end{document}" nil t))
|
||||
(beginning-of-line)
|
||||
(recenter))
|
||||
|
||||
(cp-set-keys
|
||||
:keymap LaTeX-mode-map
|
||||
:bindings
|
||||
`((,(kbd "M-p") cp-backward-def)
|
||||
(,(kbd "M-n") cp-forward-def)))
|
|
@ -1,55 +0,0 @@
|
|||
;; Simplify the GUI, thanks
|
||||
;; http://www.masteringemacs.org/articles/2010/10/04/beginners-guide-to-emacs/
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
(horizontal-scroll-bar-mode -1)
|
||||
(display-time-mode t)
|
||||
(setq focus-follows-mouse t
|
||||
mouse-autoselect-window t
|
||||
display-time-format "%a, %d %h %Y %T"
|
||||
display-time-interval 1
|
||||
use-dialog-box nil)
|
||||
|
||||
;; Highlight current line
|
||||
(global-hl-line-mode 1)
|
||||
|
||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||
|
||||
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
|
||||
|
||||
;;;; Set theme
|
||||
;(load-theme 'distinguished t)
|
||||
|
||||
;(require 'github-theme)
|
||||
|
||||
;(require 'heroku-theme)
|
||||
|
||||
;;;; Good theme but uses different font sizes in org-mode, and (I think) some weird non-monospace font
|
||||
;; (require 'monokai-theme)
|
||||
|
||||
(require 'molokai-theme)
|
||||
(enable-theme 'molokai)
|
||||
|
||||
;; (require 'fullscreen-mode)
|
||||
;; (fullscreen-mode 1)
|
||||
|
||||
;; (require 'relative-line-numbers)
|
||||
;; ;; old
|
||||
;; ;; (setq relative-line-numbers-motion-function 'vertical-motion)
|
||||
;; ;; new
|
||||
;; (setq relative-line-numbers-motion-function 'forward-visible-line)
|
||||
;; (global-relative-line-numbers-mode 1)
|
||||
|
||||
;; (add-hook 'shell-mode-hook 'previous-buffer)
|
||||
;; ;; is this what deletes windows when you run a shell command?
|
||||
;; (add-hook 'shell-mode-hook 'delete-other-windows)
|
||||
|
||||
;; 2018-08-26T22:39:09+0530
|
||||
(defun cp/change-split ()
|
||||
"Switch between two windows in horizontal layout and vice-versa."
|
||||
(interactive)
|
||||
(let (()))
|
||||
;; if height of window > width, we're in a vertical split
|
||||
;; otherwise we're in a horizontal split
|
||||
)
|
|
@ -1,144 +0,0 @@
|
|||
(defun cp-global-set-many-keys (bindings)
|
||||
"A clean way to define many keys using `global-set-key'.
|
||||
BINDINGS must be in the form `((,(kbd \"...\") FN) ...)"
|
||||
(mapc (lambda (b)
|
||||
(global-set-key (car b) (cadr b)))
|
||||
bindings))
|
||||
|
||||
(defun cp-define-many-keys (keymap bindings)
|
||||
"A clean way to define many keys using `define-key'.
|
||||
KEYMAP must be a valid keymap.
|
||||
BINDINGS must be in the form `((,(kbd \"...\") FN) ...)"
|
||||
(mapc (lambda (b)
|
||||
(define-key keymap (car b) (cadr b)))
|
||||
bindings))
|
||||
|
||||
(defun cp-local-set-many-keys (bindings)
|
||||
"A clean way to define many keys using `local-set-key'.
|
||||
BINDINGS must be in the form `((,(kbd \"...\") FN) ...)"
|
||||
(mapc (lambda (b)
|
||||
(local-set-key (car b) (cadr b)))
|
||||
bindings))
|
||||
|
||||
(require 'cl-lib)
|
||||
(cl-defun cp-set-keys (&key keymap unset bindings)
|
||||
"A clean way to set/unset many keybindings.
|
||||
|
||||
BINDINGS specifies the functions and the keys they are to be
|
||||
bound to. It must be an alist in the form -
|
||||
`((,(kbd \"...\") FN)
|
||||
...)
|
||||
|
||||
If KEYMAP is a symbol `global' or not supplied, the binding is
|
||||
created by `global-set-key'.
|
||||
If it is a symbol `local', the binding is created by
|
||||
`local-set-key'.
|
||||
Otherwise, it is assumed to be a keymap and the binding is
|
||||
created with `define-key'.
|
||||
|
||||
If UNSET is non-nil, unset keybinds as specified by KEYMAP
|
||||
instead of setting them. If a keymap is specified, the key is unset
|
||||
by using define-key to set it to nil in the given keymap -
|
||||
otherwise, global-unset-key or local-unset-key are used as
|
||||
applicable."
|
||||
(let ((key-function (if (not unset)
|
||||
(pcase keymap
|
||||
((or `global `nil) #'global-set-key)
|
||||
(`local #'local-set-key)
|
||||
(x #'define-key))
|
||||
(pcase keymap
|
||||
((or `global `nil) #'global-unset-key)
|
||||
(`local #'local-unset-key)
|
||||
(x #'define-key)))))
|
||||
(if (eq key-function 'define-key)
|
||||
(if unset
|
||||
(mapc (lambda (b)
|
||||
(funcall key-function keymap (car b) nil))
|
||||
bindings)
|
||||
(mapc (lambda (b)
|
||||
(funcall key-function keymap (car b) (cadr b)))
|
||||
bindings))
|
||||
(if unset
|
||||
(mapc (lambda (b)
|
||||
(funcall key-function (car b)))
|
||||
bindings)
|
||||
(mapc (lambda (b)
|
||||
(funcall key-function (car b) (cadr b)))
|
||||
bindings)))))
|
||||
|
||||
;; ;; tests
|
||||
;; (progn (cp-set-keys :keymap 'global ; not actually needed, e.g. see next call
|
||||
;; :bindings `((,(kbd "<f6>") erc) (,(kbd "<f7>") eww)))
|
||||
;; (and (equal 'erc (lookup-key (current-global-map) (kbd "<f6>")))
|
||||
;; (equal 'eww (lookup-key (current-global-map) (kbd "<f7>")))))
|
||||
;; (progn (cp-set-keys :unset t
|
||||
;; :bindings `((,(kbd "<f6>") erc) (,(kbd "<f7>") eww)))
|
||||
;; (and (equal nil (lookup-key (current-global-map) (kbd "<f6>")))
|
||||
;; (equal nil (lookup-key (current-global-map) (kbd "<f7>")))))
|
||||
;; (progn (cp-set-keys :keymap emacs-lisp-mode-map
|
||||
;; :bindings `((,(kbd "<f6>") erc) (,(kbd "<f7>") eww)))
|
||||
;; (and (equal 'erc (lookup-key emacs-lisp-mode-map (kbd "<f6>")))
|
||||
;; (equal 'eww (lookup-key emacs-lisp-mode-map (kbd "<f7>")))))
|
||||
;; (progn (cp-set-keys :keymap emacs-lisp-mode-map
|
||||
;; :unset t
|
||||
;; :bindings `((,(kbd "<f6>") erc) (,(kbd "<f7>") eww)))
|
||||
;; (and (equal nil (lookup-key emacs-lisp-mode-map (kbd "<f6>")))
|
||||
;; (equal nil (lookup-key emacs-lisp-mode-map (kbd "<f7>")))))
|
||||
;; (progn (cp-set-keys :keymap 'local
|
||||
;; :bindings `((,(kbd "<f6>") erc) (,(kbd "<f7>") eww)))
|
||||
;; (and (equal 'erc (lookup-key emacs-lisp-mode-map (kbd "<f6>")))
|
||||
;; (equal 'eww (lookup-key emacs-lisp-mode-map (kbd "<f7>")))))
|
||||
;; (progn (cp-set-keys :keymap 'local
|
||||
;; :unset t
|
||||
;; :bindings `((,(kbd "<f6>") erc) (,(kbd "<f7>") eww)))
|
||||
;; (and (equal nil (lookup-key emacs-lisp-mode-map (kbd "<f6>")))
|
||||
;; (equal nil (lookup-key emacs-lisp-mode-map (kbd "<f7>")))))
|
||||
|
||||
(defun cp-get-buffer-regexp (regexp &optional all)
|
||||
"Returns the name of the first buffer in the buffer list which matches REGEXP.
|
||||
|
||||
If ALL is non-nil, multiple matches will be returned as a list."
|
||||
(let ((results (cl-remove-if-not (lambda (a)
|
||||
(string-match regexp a))
|
||||
(mapcar #'buffer-name (buffer-list)))))
|
||||
(if all results (car results))))
|
||||
|
||||
(cl-defun cp-buffer-name-match-p (regexp &optional (string (buffer-name)))
|
||||
"Checks if STRING matches REGEXP.
|
||||
If STRING is not provided, uses the current buffer name."
|
||||
(if (string-match regexp string) t nil))
|
||||
|
||||
(defun cp/random-elt (list)
|
||||
"Retun a random element from LIST."
|
||||
(nth (random (length list)) list))
|
||||
|
||||
(defun cp/map-two (fn list)
|
||||
"Apply FN to the first two elements of LIST, then the second two, and so on."
|
||||
(let ((newlist '()))
|
||||
(while (not (= 0 (- (length list) 1)))
|
||||
(setq newlist
|
||||
(append
|
||||
newlist (list
|
||||
(funcall fn (car list) (cadr list)))))
|
||||
(pop list))
|
||||
newlist))
|
||||
|
||||
(defun cp/average (numbers)
|
||||
(/ (-reduce '+ numbers)
|
||||
(length numbers)))
|
||||
|
||||
(defun cp/pastebinit ()
|
||||
(interactive)
|
||||
(-> (shell-command-on-region
|
||||
(if (region-active-p) (region-beginning) (point-min))
|
||||
(if (region-active-p) (region-end) (point-max))
|
||||
"pastebinit")
|
||||
(kill-new)))
|
||||
|
||||
(defun ^ (base pwr)
|
||||
(while (not (zerop pwr))
|
||||
(setq base (* base base)
|
||||
pwr (- pwr 1)))
|
||||
base)
|
||||
|
||||
(provide 'cp)
|
Binary file not shown.
|
@ -0,0 +1,50 @@
|
|||
/* made to resemble Firefox's reader mode, dark setting */
|
||||
<style type=text/css>
|
||||
body {
|
||||
margin: 40px auto;
|
||||
max-width: 650px;
|
||||
line-height: 1.6;
|
||||
font-size: 18px;
|
||||
color: #eeeeee !important;
|
||||
padding: 0 10px;
|
||||
background-color: #333333;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
h1,h2,h3 {
|
||||
line-height: 1.2;
|
||||
}
|
||||
a,a:visited {
|
||||
color: #07a;
|
||||
}
|
||||
img {
|
||||
max-width: 80%;
|
||||
height: auto;
|
||||
width: auto\9; /* ie8 */
|
||||
}
|
||||
</style>
|
||||
|
||||
/* mix of motherfuckingwebsite.com + bettermotherfuckingwebsite.com + thebestmotherfucking.website */
|
||||
|
||||
/* <style type=text/css> */
|
||||
/* body { */
|
||||
/* margin: 40px auto; */
|
||||
/* max-width: 650px; */
|
||||
/* line-height: 1.6; */
|
||||
/* font-size: 18px; */
|
||||
/* color: #444; */
|
||||
/* padding: 0 10px; */
|
||||
/* background-color: #eeeeee; */
|
||||
/* font-family: sans-serif; */
|
||||
/* } */
|
||||
/* h1,h2,h3 { */
|
||||
/* line-height: 1.2; */
|
||||
/* } */
|
||||
/* a,a:visited { */
|
||||
/* color: #07a; */
|
||||
/* } */
|
||||
/* img { */
|
||||
/* max-width: 80%; */
|
||||
/* height: auto; */
|
||||
/* width: auto\9; /\* ie8 *\/ */
|
||||
/* } */
|
||||
/* </style> */
|
717
init.el
717
init.el
|
@ -1,717 +0,0 @@
|
|||
;; -*- lexical-binding: t; -*-
|
||||
;; TODO - convert to use-package
|
||||
|
||||
;; TODO - drop cp/ prefix, use contrapunctus-, set up nameless package
|
||||
;; names
|
||||
|
||||
;; TODO - create wrapper for
|
||||
;; xref-find-definitions/xref-find-definitions-other-window
|
||||
|
||||
;; TODO - make ag suggest my last isearch term
|
||||
|
||||
;; TODO - make a completing prompt for Info manuals instead of the
|
||||
;; current approach of either opening info and searching for a manual
|
||||
;; or binding calls to (info "(something)") to keys.
|
||||
|
||||
;; TODO - add idle timer for recentf-cleanup
|
||||
|
||||
;; TODO - write command to deduce actions for directory based on
|
||||
;; contents. e.g. if a directory has only/mostly videos, run `vlc
|
||||
;; --recursive expand <dir>', mostly images - `sxiv -for <dir>', etc.
|
||||
;; With prefix arg or when confused, ask for command (with
|
||||
;; completion).
|
||||
|
||||
;; TODO - lets write something quicker to find files. Don't ask for
|
||||
;; directory * - just start in the current working directory. Update
|
||||
;; results as we type (after a little delay). Don't make user input
|
||||
;; arguments to find(1) * - by default, search the whole path, put
|
||||
;; filename matches first, path matches later.
|
||||
;;
|
||||
;; * maybe only with prefix arg.
|
||||
|
||||
;; TODO - stop desktop-save from saving my buffers - just save history etc (persp-mode?)
|
||||
|
||||
;; TODO - make idle timer to find all local git repos with uncommited changes
|
||||
|
||||
;; Reorganize into subdirectories?
|
||||
;; text - org, md, tex
|
||||
;; prog - lisp, lilypond
|
||||
;; non-text - doc-view, emms
|
||||
;; applications - eww, chronometrist, fm, irc
|
||||
;; input - modal, hindi
|
||||
|
||||
;;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(add-to-list 'load-path "~/.emacs.d/elisp-git/use-package/")
|
||||
(require 'use-package))
|
||||
|
||||
(require 'package)
|
||||
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
||||
(not (gnutls-available-p))))
|
||||
(proto (if no-ssl "http" "https")))
|
||||
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
|
||||
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
|
||||
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
|
||||
(when (< emacs-major-version 24)
|
||||
;; For important compatibility libraries like cl-lib
|
||||
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
|
||||
(package-initialize)
|
||||
|
||||
;; from https://github.com/jorgenschaefer/Config/blob/master/emacs.el#L796-L800
|
||||
(mapc (lambda (path)
|
||||
(when (file-directory-p path)
|
||||
(add-to-list 'load-path path)
|
||||
(dolist (dirname (directory-files path t "^[^.]"))
|
||||
(when (file-directory-p dirname)
|
||||
(let ((try1 (concat dirname "/elisp"))
|
||||
(try2 (concat dirname "/lisp")))
|
||||
(add-to-list 'load-path
|
||||
(cond ((file-exists-p try1) try1)
|
||||
((file-exists-p try2) try2)
|
||||
(t dirname))))))))
|
||||
'("~/.emacs.d/elisp-git/"
|
||||
"~/.emacs.d/contrapunctus"
|
||||
"~/.emacs.d/elpa/"
|
||||
"~/.emacs.d/user"))
|
||||
|
||||
(load "cp-ui")
|
||||
|
||||
(require 'atomic-chrome)
|
||||
(atomic-chrome-start-server)
|
||||
(setq atomic-chrome-url-major-mode-alist
|
||||
'(("wikisource" . mediawiki-mode)))
|
||||
|
||||
(use-package emacs
|
||||
:config
|
||||
(setq gc-cons-threshold 100000000
|
||||
delete-by-moving-to-trash t
|
||||
trash-directory "~/.trash/"
|
||||
history-length 1000
|
||||
use-file-dialog nil))
|
||||
|
||||
(use-package doc-view
|
||||
:config
|
||||
(setq doc-view-resolution 300))
|
||||
|
||||
(use-package gnutls
|
||||
:config
|
||||
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36749
|
||||
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
|
||||
|
||||
(use-package ag
|
||||
:ensure t
|
||||
:bind
|
||||
("<f2> p" . ag)
|
||||
("<f2> P" . ag-project-regexp)
|
||||
:config
|
||||
(setq ag-highlight-search t))
|
||||
|
||||
(require 'cp-modal)
|
||||
(require 'cp-god)
|
||||
(require 'cp-chronometrist)
|
||||
|
||||
(use-package comint
|
||||
:bind (:map comint-mode-map
|
||||
("M-p" . #'comint-previous-matching-input-from-input)
|
||||
("M-n" . #'comint-next-matching-input-from-input)))
|
||||
|
||||
(use-package company
|
||||
:ensure t
|
||||
:diminish company-mode
|
||||
:commands global-company-mode
|
||||
:init (global-company-mode)
|
||||
:bind ;; ("TAB" . company-indent-or-complete-common)
|
||||
(:map emacs-lisp-mode-map
|
||||
("TAB" . company-indent-or-complete-common)
|
||||
("C-i" . company-indent-or-complete-common)))
|
||||
|
||||
(use-package company-emoji
|
||||
:ensure t
|
||||
:if (featurep 'company)
|
||||
:config (add-to-list 'company-backends 'company-emoji))
|
||||
|
||||
(use-package counsel
|
||||
:ensure t
|
||||
:bind ("M-x" . counsel-M-x)
|
||||
:config
|
||||
(setq counsel-find-file-ignore-regexp "\\`\\."))
|
||||
|
||||
;; (use-package elsa
|
||||
;; :commands flycheck-elsa-setup)
|
||||
|
||||
(global-set-key (kbd "M-w") 'kill-ring-save)
|
||||
(define-key emacs-lisp-mode-map (kbd "M-w") nil)
|
||||
;; M-d is useful in the minibuffer
|
||||
(define-key emacs-lisp-mode-map (kbd "M-d") nil)
|
||||
(global-set-key (kbd "M-d") 'easy-kill-delete-region)
|
||||
|
||||
(use-package easy-kill
|
||||
:disabled
|
||||
:ensure t
|
||||
:bind (("M-w" . easy-kill)
|
||||
("M-d" . easy-kill-delete-region)))
|
||||
|
||||
(use-package elfeed
|
||||
:bind (:map elfeed-show-mode-map
|
||||
("v" . nil))
|
||||
:config
|
||||
(add-to-list 'boon-special-mode-list 'elfeed-show-mode)
|
||||
(add-to-list 'boon-special-mode-list 'elfeed-search-mode))
|
||||
|
||||
(use-package hydra
|
||||
:ensure t
|
||||
:commands defhydra)
|
||||
|
||||
(require 'cp-emms)
|
||||
|
||||
(use-package emr
|
||||
:ensure t
|
||||
:bind (:map prog-mode-map
|
||||
("M-S-<return>" . emr-show-refactor-menu)))
|
||||
|
||||
(use-package eshell
|
||||
:ensure t
|
||||
:config (setq eshell-history-size 999))
|
||||
|
||||
(use-package eww
|
||||
:ensure t
|
||||
:bind
|
||||
(:map eww-mode-map
|
||||
("b" . #'eww-back-url)
|
||||
("f" . #'eww-forward-url)
|
||||
("v" . nil)))
|
||||
|
||||
(use-package flx-ido
|
||||
:disabled
|
||||
:ensure t
|
||||
:init (flx-ido-mode 1)
|
||||
(setq ido-enable-flex-matching t
|
||||
ido-use-faces nil))
|
||||
|
||||
(use-package flx-isearch
|
||||
:disabled
|
||||
:ensure t
|
||||
:bind
|
||||
("C-s" . #'flx-isearch-forward)
|
||||
("C-r" . #'flx-isearch-backward))
|
||||
|
||||
;; (use-package flycheck
|
||||
;; :ensure t
|
||||
;; :init (global-flycheck-mode))
|
||||
|
||||
;; (use-package flycheck-elsa
|
||||
;; :hook (emacs-lisp-mode . flycheck-elsa-setup))
|
||||
|
||||
(setenv "PATH" (concat "/home/anon/bin:" (getenv "PATH")))
|
||||
(setenv "EDITOR" "emacsclient")
|
||||
|
||||
;; what on earth is this message after every init -
|
||||
;; ad-handle-definition: `tramp-read-passwd' got redefined
|
||||
|
||||
;; ;; (profiler-start 'cpu)
|
||||
;; (toggle-debug-on-error)
|
||||
;; ;; (toggle-debug-on-quit)
|
||||
|
||||
(require 'dash)
|
||||
(require 's)
|
||||
(require 'visual-fill-column)
|
||||
;; (add-to-list 'load-path "~/.emacs.d/elisp-git/yafolding.el/")
|
||||
|
||||
(add-to-list 'load-path "~/.emacs.d/user/")
|
||||
(add-to-list 'load-path "~/.emacs.d/contrapunctus/")
|
||||
(add-to-list 'load-path "~/.emacs.d/contrapunctus/fin/")
|
||||
(add-to-list 'load-path "~/.emacs.d/contrapunctus/ido-mini/")
|
||||
|
||||
(load "cp")
|
||||
|
||||
;; (if (not (server-running-p)) (server-start))
|
||||
(server-start)
|
||||
|
||||
(use-package general
|
||||
:commands general-define-key)
|
||||
|
||||
;; 2017-06-09T00:24:36+0530
|
||||
;; my laptop's X, W, and G keys gave up the ghost
|
||||
;; temporary bindings, till my laptop keyboard is fixed
|
||||
|
||||
;; 2020-01-07T12:43:41+0530
|
||||
;; update to use general, add M-f8 binding
|
||||
(general-define-key
|
||||
"<f8>" 'keyboard-quit
|
||||
"M-<f8>" 'eval-defun
|
||||
"M-<f9>" 'dired-jump
|
||||
"<f10>" 'save-buffer
|
||||
"M-<f10>" 'find-file
|
||||
"<f11>" 'ido-mini
|
||||
"M-<f11>" 'ibuffer
|
||||
"<f12>" 'execute-extended-command
|
||||
"M-<f12>" 'text-scale-adjust
|
||||
"C-c C-j" 'join-line
|
||||
"C-c C-r" (lambda () (interactive) (revert-buffer t t)))
|
||||
|
||||
;;;; UTF-8 magic
|
||||
;; (setq locale-coding-system 'utf-8)
|
||||
;; (set-terminal-coding-system 'utf-8)
|
||||
;; (set-keyboard-coding-system 'utf-8)
|
||||
;; (set-selection-coding-system 'utf-8)
|
||||
;; (prefer-coding-system 'utf-8)
|
||||
|
||||
;;;; Linewrapping
|
||||
(add-hook 'org-mode-hook 'visual-line-mode)
|
||||
(add-hook 'erc-mode-hook 'visual-line-mode)
|
||||
;(global-set-key (kbd "C-x t") 'toggle-truncate-lines)
|
||||
(add-hook 'markdown-mode-hook 'visual-fill-column-mode)
|
||||
(add-hook 'text-mode-hook 'visual-line-mode)
|
||||
(load "cp-md")
|
||||
|
||||
(defun cp/turn-on-truncate-lines ()
|
||||
;; (setq truncate-lines 1)
|
||||
(toggle-truncate-lines 1))
|
||||
(defun cp/add-to-hooks (function hooks)
|
||||
(-map (lambda (hook)
|
||||
(add-hook hook function))
|
||||
hooks))
|
||||
(defun cp/remove-from-hooks (function hooks)
|
||||
(-map (lambda (hook)
|
||||
(remove-hook hook function))
|
||||
hooks))
|
||||
|
||||
(cp/add-to-hooks 'cp/turn-on-truncate-lines '(dired-mode-hook
|
||||
prog-mode-hook
|
||||
diff-mode-hook
|
||||
message-mode-hook))
|
||||
|
||||
(global-visual-line-mode -1)
|
||||
(setq truncate-partial-width-windows nil
|
||||
truncate-lines t)
|
||||
(add-hook 'erc-mode-hook 'visual-line-mode)
|
||||
(add-hook 'comint-mode-hook 'visual-line-mode)
|
||||
|
||||
;; commented out on 2018-03-19T14:18:34+0530
|
||||
;; (add-hook 'markdown-mode-hook 'auto-fill-mode)
|
||||
;; (add-hook 'text-mode-hook 'auto-fill-mode)
|
||||
|
||||
;; (add-hook 'paredit-mode-hook 'auto-fill-mode)
|
||||
|
||||
;;;; Tab settings
|
||||
;; (setq default-tab-width 4)
|
||||
(setq tab-width 4)
|
||||
;(define-key text-mode-map (kbd "TAB") 'self-insert-command)
|
||||
(setq-default indent-tabs-mode nil)
|
||||
;;;; Fix scrolling
|
||||
(setq scroll-conservatively 10000
|
||||
scroll-preserve-screen-position t)
|
||||
(setq auto-window-vscroll nil)
|
||||
;;; Recenter screen on isearch matches
|
||||
(add-hook 'isearch-mode-hook 'recenter)
|
||||
(add-hook 'isearch-update-post-hook 'recenter)
|
||||
(defadvice isearch-repeat-forward
|
||||
(after isearch-repeat-forward-recenter activate) (recenter))
|
||||
(defadvice isearch-repeat-backward
|
||||
(after isearch-repeat-backward-recenter activate) (recenter))
|
||||
|
||||
(ad-activate 'isearch-repeat-forward)
|
||||
(ad-activate 'isearch-repeat-backward)
|
||||
|
||||
(global-set-key (kbd "C-s") 'isearch-forward-regexp)
|
||||
(global-set-key (kbd "C-r") 'isearch-backward-regexp)
|
||||
|
||||
;;;; While we're at it, let's add that to next-error as well
|
||||
;;;; (this affects jumping to match from M-x grep , too)
|
||||
(add-hook 'next-error-hook 'recenter)
|
||||
|
||||
;;;; ...and to magit-toggle-section
|
||||
;;; It'd be really cool to (recenter 3) when you /open/ a section,
|
||||
;;; and (recenter) when you close a section
|
||||
(defadvice magit-section-toggle
|
||||
(after magit-section-toggle-recenter activate) (recenter 3))
|
||||
(ad-activate 'magit-section-toggle)
|
||||
(defadvice magit-unstage-item
|
||||
(after magit-unstage-item-move) (next-line))
|
||||
(ad-activate 'magit-unstage-item)
|
||||
(defadvice magit-goto-next-section
|
||||
(after magit-next-section-recenter activate) (recenter 3))
|
||||
(ad-activate 'magit-goto-next-section)
|
||||
(defadvice magit-goto-previous-section
|
||||
(after magit-previous-section-recenter activate) (recenter 3))
|
||||
(ad-activate 'magit-goto-previous-section)
|
||||
|
||||
(defun cp-insert-timestamp ()
|
||||
(interactive)
|
||||
(insert (format-time-string "%FT%T%z")))
|
||||
|
||||
(require 'fin)
|
||||
(defun cp/eval-sexp (arg)
|
||||
"In emacs-lisp-mode, just run eval-defun.
|
||||
|
||||
In other modes - jump to first Lisp expression in current line
|
||||
and eval it."
|
||||
(interactive "P")
|
||||
(save-excursion
|
||||
(cond ((or
|
||||
(equal major-mode 'emacs-lisp-mode)
|
||||
(equal major-mode 'lisp-interaction-mode))
|
||||
(eval-defun arg))
|
||||
((re-search-line "(")
|
||||
(progn
|
||||
(forward-char -1)
|
||||
(forward-sexp)
|
||||
(eval-last-sexp arg)))
|
||||
(t nil))))
|
||||
|
||||
(use-package helpful
|
||||
:ensure t
|
||||
:bind (("<f1> <f1>" . #'helpful-at-point)
|
||||
("<f1> f" . #'helpful-callable)
|
||||
("<f1> c" . #'helpful-command)
|
||||
("<f1> k" . #'helpful-key)
|
||||
("<f1> v" . #'helpful-variable)))
|
||||
|
||||
(use-package ibuffer
|
||||
:bind
|
||||
(:map ibuffer-mode-map
|
||||
("X" . 'ibuffer-do-kill-on-deletion-marks)))
|
||||
|
||||
(use-package info
|
||||
:ensure t
|
||||
:config
|
||||
(info-initialize)
|
||||
(--map (add-to-list #'Info-directory-list it)
|
||||
'("~/.emacs.d/info/"
|
||||
"~/.emacs.d/elisp-git/geiser/doc/"
|
||||
"~/lilypond/usr/share/info/"))
|
||||
:bind
|
||||
(("<f1> i" . nil)
|
||||
("<f1> i i" . info)
|
||||
("<f1> i a" . info-apropos)
|
||||
("<f1> i q" . (lambda () (interactive) (info "(emacs)")))
|
||||
("<f1> i w" . (lambda () (interactive) (info "(elisp)")))
|
||||
("<f1> i l" . (lambda () (interactive) (info "(lilypond-notation)")))
|
||||
("<f1> i r" . (lambda () (interactive) (info "(lilypond-learning)")))
|
||||
("<f1> i s" . (lambda () (interactive) (info "(stumpwm)")))
|
||||
("<f1> i o" . (lambda () (interactive) (info "(org)")))
|
||||
("<f1> i g" . (lambda () (interactive) (info "(guile)"))))
|
||||
:bind
|
||||
(:map Info-mode-map
|
||||
("b" . Info-history-back)
|
||||
("f" . Info-history-forward)))
|
||||
|
||||
(general-define-key
|
||||
;; "s-k" 'cp-kill-buffer
|
||||
"s-k" 'bury-buffer
|
||||
"C-x k" 'cp-kill-buffer
|
||||
"C-`" 'shell
|
||||
"M-`" 'eshell
|
||||
"M-<f2>" 'compile
|
||||
"M-<f3>" 'run-chicken
|
||||
"M-<f4>" 'run-lisp
|
||||
"M-<f5>" 'ielm)
|
||||
|
||||
(general-define-key
|
||||
:prefix "<f1>"
|
||||
"M" 'describe-mode
|
||||
"m" 'woman
|
||||
"l" 'find-library)
|
||||
|
||||
(general-define-key
|
||||
:prefix "<f2>"
|
||||
;; "<f2>" 'imenu
|
||||
"<f2>" 'xref-find-definitions
|
||||
"r" 'xref-find-references
|
||||
"m" 'imenu
|
||||
;; "p" 'grep
|
||||
"p" 'ag-regexp
|
||||
"o" 'find-grep
|
||||
"i" 'find-dired
|
||||
"h" 'proced)
|
||||
|
||||
(general-define-key
|
||||
:prefix "<f5>"
|
||||
"<f5>" 'eval-buffer
|
||||
"i" 'cp-open-init
|
||||
"v" 'visual-line-mode
|
||||
"f" 'cp-fcf-literally
|
||||
"f" 'fundamental-mode
|
||||
"t" 'text-mode
|
||||
"T" 'cp-insert-timestamp
|
||||
"c" 'calendar)
|
||||
|
||||
(general-define-key
|
||||
;; [down-mouse-1] 'mouse-set-point
|
||||
;; [up-mouse-1] 'er/expand-region
|
||||
[s-mouse-3] 'bury-buffer
|
||||
[mouse-8] 'delete-window
|
||||
;; (kbd "<mouse-9>") 'keyboard-quit
|
||||
;; [mouse-9] 'buffer-menu
|
||||
[mouse-9] 'ibuffer
|
||||
[C-mouse-9] 'recentf-open-files
|
||||
[M-mouse-4] 'next-buffer
|
||||
[M-mouse-5] 'previous-buffer
|
||||
[M-mouse-8] 'split-window-right
|
||||
[M-mouse-9] 'split-window-below
|
||||
;; quitting from helm-mini - whether with keyboard-quit or
|
||||
;; keyboard-escape-quit - "banishes" the mouse pointer to the
|
||||
;; top-right corner!? wtf, helm.
|
||||
;; (kbd "s-<mouse-9>") 'helm-mini
|
||||
)
|
||||
|
||||
(with-eval-after-load 'help-mode
|
||||
(cp-set-keys
|
||||
:keymap help-mode-map
|
||||
:bindings
|
||||
`((,(kbd "b") help-go-back)
|
||||
(,(kbd "f") help-go-forward))))
|
||||
|
||||
;; More convenient Unicode keys
|
||||
(global-unset-key (kbd "M-["))
|
||||
(cp-set-keys
|
||||
:bindings
|
||||
`((,(kbd "C-' r") ,(kbd "₹"))
|
||||
(,(kbd "C-' C-r") ,(kbd "₹"))
|
||||
(,(kbd "C-' e") ,(kbd "€"))
|
||||
(,(kbd "C-' b") ,(kbd "←"))
|
||||
(,(kbd "C-' f") ,(kbd "→"))
|
||||
(,(kbd "C-' p") ,(kbd "↑"))
|
||||
(,(kbd "C-' n") ,(kbd "↓"))
|
||||
(,(kbd "C-' l") ,(kbd "λ"))
|
||||
(,(kbd "C-' F") ,(kbd "ƒ"))))
|
||||
|
||||
(setq default-input-method "devanagari-itrans")
|
||||
|
||||
(setq backup-by-copying t
|
||||
backup-directory-alist '(("." . "~/.emacs.d/saves/"))
|
||||
delete-old-versions t
|
||||
kept-new-versions 2
|
||||
kept-old-versions 2
|
||||
version-control t)
|
||||
|
||||
(setq browse-url-browser-function 'browse-url-xdg-open)
|
||||
|
||||
(use-package iedit
|
||||
:ensure t
|
||||
:bind (("C-;" . #'iedit-mode)
|
||||
("C-:" . #'iedit-mode-toggle-on-function)))
|
||||
|
||||
(use-package ivy
|
||||
:ensure t
|
||||
:commands ivy-mode
|
||||
:init (ivy-mode))
|
||||
|
||||
(use-package jabber
|
||||
:ensure t
|
||||
:disabled
|
||||
:commands jabber-connect
|
||||
:config (global-unset-key (kbd "C-x C-j"))
|
||||
(global-set-key (kbd "C-x C-j") 'join-line)
|
||||
(setq jabber-history-enabled t
|
||||
jabber-history-muc-enabled t
|
||||
jabber-alert-presence-message-function nil))
|
||||
|
||||
(use-package magit
|
||||
:ensure t
|
||||
:bind (("<f5> m" . #'magit-status)
|
||||
:map magit-status-mode-map
|
||||
;; ([mouse-3] . 'magit-section-toggle)
|
||||
([down-mouse-3] . 'mouse-set-point)
|
||||
([up-mouse-3] . 'magit-section-toggle))
|
||||
:commands magit-status
|
||||
:hook
|
||||
(magit-post-stage . (lambda () (recenter))))
|
||||
|
||||
(use-package mediawiki
|
||||
:ensure t
|
||||
:commands mediawiki-mode)
|
||||
|
||||
(use-package midnight
|
||||
:ensure t
|
||||
:init
|
||||
(midnight-mode)
|
||||
:config
|
||||
(setq clean-buffer-list-kill-regexps '("")
|
||||
clean-buffer-list-delay-general 7
|
||||
clean-buffer-list-delay-special (* 60 60 24 7))
|
||||
:hook
|
||||
(midnight . clean-buffer-list))
|
||||
|
||||
(use-package nodejs-repl
|
||||
:ensure t
|
||||
:config (setq nodejs-repl-command "nodejs"))
|
||||
|
||||
(use-package nov
|
||||
:mode ("\\.epub\\'" . nov-mode))
|
||||
|
||||
(use-package package
|
||||
:config
|
||||
(when (featurep 'boon)
|
||||
(general-def package-menu-mode-map
|
||||
"X" 'package-menu-execute)))
|
||||
|
||||
(use-package paradox
|
||||
:ensure t
|
||||
:bind
|
||||
("<f5> p" . #'paradox-list-packages)
|
||||
:config (setq paradox-execute-asynchronously t)
|
||||
(when (featurep 'boon)
|
||||
(general-def paradox-menu-mode-map
|
||||
"X" 'package-menu-execute)))
|
||||
|
||||
(use-package powerline
|
||||
:ensure t)
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:ensure t
|
||||
:hook (prog-mode . rainbow-delimiters-mode))
|
||||
|
||||
(use-package swiper
|
||||
:ensure t
|
||||
:bind (("C-s" . swiper)
|
||||
("C-r" . swiper-backward))
|
||||
:config (add-to-list 'desktop-globals-to-save 'swiper-history))
|
||||
|
||||
(use-package sxiv
|
||||
:config (setq sxiv-exclude-strings '("meh" "\\.NEF$")))
|
||||
|
||||
(use-package time
|
||||
:ensure t
|
||||
:config
|
||||
(setq display-time-next-load-average t)
|
||||
(add-to-list 'zoneinfo-style-world-list '("Europe/Berlin" "Berlin")))
|
||||
|
||||
;; (load "cp-adb")
|
||||
(load "cp-editing")
|
||||
;; (load "cp-evil")
|
||||
(load "cp-fm")
|
||||
(load "cp-lily")
|
||||
(load "cp-sfz")
|
||||
(require 'cp-lisp)
|
||||
(require 'cp-nav)
|
||||
|
||||
;; (ispell-change-dictionary "en")
|
||||
(setq ispell-dictionary "en")
|
||||
|
||||
(use-package undo-tree
|
||||
:commands global-undo-tree-mode
|
||||
:ensure t
|
||||
:if (not (featurep 'evil))
|
||||
:diminish undo-tree-mode
|
||||
:init (global-undo-tree-mode))
|
||||
|
||||
(with-eval-after-load 'text-mode
|
||||
(define-key text-mode-map (kbd "M-p") 'org-drag-line-backward)
|
||||
(define-key text-mode-map (kbd "M-n") 'org-drag-line-forward))
|
||||
|
||||
(autoload 'byte-recompile-file "bytecomp" "byte-recompile-file" t)
|
||||
;; (2017-12-29T13:21:57+0530
|
||||
;; TODO - watch Org and MD files and recompile it if they are newer
|
||||
;; than their associated HTML files (e.g. I edited the source on a
|
||||
;; phone and synced it back to the laptop)
|
||||
;; see (info "(elisp) File Notifications")
|
||||
;; and (describe-function 'file-newer-than-file-p)
|
||||
;; )
|
||||
(defun cp/after-save ()
|
||||
(let* ((file-path (buffer-file-name))
|
||||
(file-path-shell (shell-quote-argument file-path)))
|
||||
(case major-mode
|
||||
('org-mode (org-html-export-to-html))
|
||||
('LilyPond-mode (let ((project-dir (locate-dominating-file file-path
|
||||
"main.ly")))
|
||||
(when project-dir
|
||||
(cd project-dir))
|
||||
(compile (car compile-history))))
|
||||
('latex-mode (if (file-exists-p "Makefile")
|
||||
(compile (car compile-history))
|
||||
(compile (concat "xelatex " file-path-shell))))
|
||||
;; ('markdown-mode (markdown-export))
|
||||
('c-mode (compile (concat "gcc -static -o "
|
||||
(shell-quote-argument
|
||||
(file-name-base))
|
||||
" "
|
||||
file-path-shell))))))
|
||||
(add-hook 'after-save-hook 'cp/after-save)
|
||||
|
||||
;; (load "cp-helm")
|
||||
(load "cp-hindi")
|
||||
;; (load "cp-irc")
|
||||
(load "cp-parens")
|
||||
(load "cp-playlist")
|
||||
|
||||
(require 'keyfreq)
|
||||
(keyfreq-mode 1)
|
||||
(keyfreq-autosave-mode 1)
|
||||
;; ;; disabled on 2017-08-18T19:39:21+0530, no longer interested
|
||||
;; (open-dribble-file (concat "~/.emacs.d/keylogs/"
|
||||
;; (format-time-string "%Y%m%d-%H%M%S")
|
||||
;; ".txt"))
|
||||
|
||||
;; 2017-10-14T15:22:56+0530 - I suspect devanagari-itrans tires the
|
||||
;; left hand faster than the right - let's find out!
|
||||
(add-hook
|
||||
'input-method-activate-hook
|
||||
(lambda ()
|
||||
(open-dribble-file
|
||||
(concat
|
||||
"~/.emacs.d/keylogs/"
|
||||
(format-time-string "%Y%m%d-%H%M%S")
|
||||
"-"
|
||||
current-input-method
|
||||
".txt"))))
|
||||
(add-hook
|
||||
'input-method-deactivate-hook
|
||||
(lambda () (open-dribble-file nil)))
|
||||
|
||||
(use-package recentf
|
||||
:init (recentf-mode 1)
|
||||
:bind ("C-x C-r C-o" . recentf-open-files)
|
||||
:config
|
||||
(setq recentf-auto-cleanup 'never
|
||||
recentf-max-menu-items 500
|
||||
recentf-max-saved-items 1000
|
||||
recentf-save-file "/home/anon/.emacs.d/recentf"
|
||||
recentf-exclude '("\\.html\\(\\.orig\\)?$"
|
||||
"\\.jpe?g$"
|
||||
"\\.png$"
|
||||
"\\.mp4$"
|
||||
"\\.etc"
|
||||
"\\.umstuff"))
|
||||
:hook
|
||||
(kill-emacs . recentf-cleanup))
|
||||
|
||||
(require 'cp-ido)
|
||||
|
||||
;;;; text size change
|
||||
;; nicked from wasamasa's init - https://github.com/wasamasa/dotemacs/blob/934d0b37692d62fe9af56b52accac5bcd4445ae3/init.org
|
||||
(setq default-frame-alist '((font . "DejaVu Sans Mono-10.5")))
|
||||
(defun my-fix-emojis (&optional frame)
|
||||
(set-fontset-font "fontset-default" nil "Symbola" frame 'append))
|
||||
(my-fix-emojis)
|
||||
(add-hook 'after-make-frame-functions 'my-fix-emojis)
|
||||
;; (set-face-attribute 'default nil :font "-outline-Bitstream Vera Sans Mono-normal-normal-normal-mono-12-*-*-*-c-*-iso8859-1")
|
||||
|
||||
(require 'wgrep)
|
||||
|
||||
(setq custom-file "~/.emacs.d/custom.el")
|
||||
(load custom-file)
|
||||
|
||||
(mapc (lambda (command)
|
||||
(put command 'disabled nil))
|
||||
'(downcase-region
|
||||
upcase-region
|
||||
set-goal-column
|
||||
scroll-left
|
||||
erc-remove-text-properties-region))
|
||||
|
||||
(require 'cp-org)
|
||||
(require 'cp-desktop)
|
||||
|
||||
;; (toggle-debug-on-quit)
|
||||
;; (profiler-stop)
|
||||
;; (emacs-init-time)
|
||||
;; (profiler-report)
|
||||
|
||||
;; Local Variables:
|
||||
;; nameless-current-name: "contrapunctus"
|
||||
;; End:
|
||||
|
||||
(provide 'init)
|
||||
;;; init.el ends here
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet -*-
|
||||
# contributor: contrapunctus (tilde.team/~contrapunctus)
|
||||
# name: cl-defgeneric
|
||||
# key: dg
|
||||
# --
|
||||
(cl-defgeneric ${1:name} (${2:args})
|
||||
"${3:docstring}"
|
||||
$0)
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# contributor: contrapunctus (tilde.team/~contrapunctus)
|
||||
# name: cl-defmethod
|
||||
# key: dm
|
||||
# --
|
||||
(cl-defmethod ${1:name} (${2:args})
|
||||
$0)
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet -*-
|
||||
# contributor: contrapunctus (tilde.team/~contrapunctus)
|
||||
# name: defclass
|
||||
# key: dc
|
||||
# --
|
||||
(defclass ${1:name} (${2:superclasses})
|
||||
(${3:slots})
|
||||
:documentation "${0:docstring}")
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: defcustom
|
||||
# key: dc
|
||||
# --
|
||||
(defcustom ${1:symbol} ${2:standard}
|
||||
"${3:doc}"$0)
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: defhydra
|
||||
# key: dh
|
||||
# --
|
||||
(defhydra ${1:name} (${2:args})
|
||||
${3:"docstring"}
|
||||
$0)
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: find-file-noselect
|
||||
# key: ffns
|
||||
# --
|
||||
(find-file-noselect ${1:file})$0
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: get-file-buffer
|
||||
# key: gfb
|
||||
# --
|
||||
(get-file-buffer ${1:file})$0
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: goto-char-point-min
|
||||
# key: gcpm
|
||||
# --
|
||||
(goto-char (point-min))
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: lambda
|
||||
# key: l
|
||||
# --
|
||||
(lambda (${1:arg}) $0)
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: point-max
|
||||
# key: pm
|
||||
# --
|
||||
(point-max)
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: read-current-buffer
|
||||
# key: rcb
|
||||
# --
|
||||
(read (current-buffer))
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: with-slots
|
||||
# key: ws
|
||||
# --
|
||||
(with-slots (${1:slots}) ${2:object})$0
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet -*-
|
||||
# contributor: Mark Karpov
|
||||
# name: my-defclass
|
||||
# key: dc
|
||||
# --
|
||||
(defclass ${1:name} (${2:parents})
|
||||
($0)${3:
|
||||
(:documentation "${4:doc}")})
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet -*-
|
||||
# contributor: contrapunctus (tilde.team/~contrapunctus)
|
||||
# name: defgeneric
|
||||
# key: dg
|
||||
# --
|
||||
(defgeneric ${1:name} (${2:args})
|
||||
"${3:docstring}")
|
||||
$0
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# contributor: contrapunctus (tilde.team/~contrapunctus)
|
||||
# name: my-defmethod
|
||||
# key: dm
|
||||
# --
|
||||
(defmethod ${1:name} (${2:args})
|
||||
$0)
|
|
@ -0,0 +1,12 @@
|
|||
# -*- mode: snippet -*-
|
||||
# contributor: Mark Karpov
|
||||
# name: my-defpackage
|
||||
# key: dp
|
||||
# --
|
||||
(defpackage :${1:package}${2:
|
||||
(:nicknames ${3:nicks})}${4:
|
||||
(:use ${5:packages})}${6:
|
||||
(:shadow ${7:packages})}${8:
|
||||
(:export ${9:packages})}${10:
|
||||
(:documentation "${11:doc}")})
|
||||
$0
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# contributor: Mark Karpov
|
||||
# name: my-in-package
|
||||
# key: ip
|
||||
# --
|
||||
(in-package :${1:package})
|
||||
$0
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: in-package
|
||||
# key: ip
|
||||
# --
|
||||
(in-package :${0:package})
|
|
@ -0,0 +1,5 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: quickload
|
||||
# key: qq
|
||||
# --
|
||||
(ql:quickload :${1:system} $0)
|
|
@ -0,0 +1,68 @@
|
|||
;;; -*- mode: emacs-lisp; -*-
|
||||
|
||||
emacs-lisp-mode
|
||||
(dc "(defcustom " (s "symbol") " " (s "standard")
|
||||
n> "\"" (s "docstring") "\""
|
||||
n> ":type '" (s "type") ")")
|
||||
(dg "(defgroup " p " nil\n \"" p "\"" n> ":group '" p n> ":prefix \"" p "-\")")
|
||||
(cdg "(cl-defgeneric " p " (" ")" n> ")")
|
||||
(cdm "(cl-defmethod " p " (" ")" n> ")")
|
||||
(pm "(point-min)")
|
||||
(pM "(point-max)")
|
||||
(up "(use-package " (p "package") ")")
|
||||
|
||||
lisp-mode emacs-lisp-mode inferior-emacs-lisp-mode slime-repl-mode
|
||||
(la "(lambda (" p ")" n> r> ")")
|
||||
;; (l "(lambda (" (s "arguments") ") " (s "forms") ")")
|
||||
(dv "(defvar " (p "symbol" symbol) " " (p "value")
|
||||
n> "\"" (p "doc") "\"" ")")
|
||||
(dm "(defmethod " (p "name") " (" (p "arguments") ")" n> q ")")
|
||||
(df "(defun " (p "name") " (" (s "arguments") ")" n> r> ")")
|
||||
(l "(let (" p ")" n> r> q ")")
|
||||
(ls "(let* (" p ")" n> r> q ")")
|
||||
(ws "(with-slots (" (p "slots") ") " (p "object") n> ")")
|
||||
|
||||
slime-repl-mode lisp-mode
|
||||
(dc "(defclass " (p "symbol") " (" (s "superclasses") ")" n>
|
||||
"(" p ")" q ")")
|
||||
(s "(%" (s slot)
|
||||
" :initarg :" (s slot) n>
|
||||
" :accessor " (s slot) > ")")
|
||||
(d ":documentation \"" (s "docstring") "\"")
|
||||
(if ":initform " q)
|
||||
(dg "(defgeneric " p " (" "))")
|
||||
(qq "(ql:quickload '(" (p "packages") "))")
|
||||
(dp "(defpackage :" (p "name")
|
||||
n> "(:use :cl)" q ")")
|
||||
(up "(use-package '(" (p "package") "))")
|
||||
(ip "(in-package :" (p "package") ")")
|
||||
(ln "(:local-nicknames (:" (p "nickname") " :" (p "package-name") ")" q ")")
|
||||
(c "#+(or)")
|
||||
;; print debugging
|
||||
(pd "(format *debug-io* \"" q "~%\")")
|
||||
(im "(:import-from :" (s "package") " #:" (s "symbol") ")")
|
||||
(di "(:default-initargs " (s "initarg") ")")
|
||||
(ii "(defmethod initialize-instance :after" n>
|
||||
" ((" p ") &rest initargs &key &allow-other-keys)"
|
||||
n> q ")")
|
||||
(qu "(ql:update-all-dists)" n> "(ql:update-client)")
|
||||
(dpmp
|
||||
"(define-presentation-method present "
|
||||
n> "(object (type " (p "t") ") (stream " (p "t") ") view &key acceptably for-context-type)"
|
||||
n> q ")")
|
||||
|
||||
sql-mode
|
||||
(ct "CREATE TABLE " (s "table") " ("
|
||||
n " " (s "column") ","
|
||||
n ");")
|
||||
|
||||
latex-mode
|
||||
(be "\\begin{" (s env) "}" > n> r> "\\end{" (s env) "}")
|
||||
(e "\\begin{enumerate}\n\\item " r> n> "\\end{enumerate}")
|
||||
(i "\\begin{itemize}\n\\item " r> n> "\\end{itemize}")
|
||||
|
||||
texinfo-mode
|
||||
(i "@include ")
|
||||
|
||||
org-mode
|
||||
(b "[ ] ")
|
Loading…
Reference in New Issue