Skip to content

Commit

Permalink
heart with respect
Browse files Browse the repository at this point in the history
  • Loading branch information
jueqingsizhe66 committed Sep 20, 2018
1 parent cd3821f commit 16e22c3
Show file tree
Hide file tree
Showing 1,201 changed files with 2,039 additions and 167,217 deletions.
87 changes: 87 additions & 0 deletions .orgConf.el
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ In ~%s~:
(run-with-idle-timer 300 t 'jump-to-org-agenda)



;https://github.com/sachac/.emacs.d/blob/gh-pages/Sacha.org#strike-through-done-headlines
;; change "DONE" keyword style
(setq org-fontify-done-headline t)
(custom-set-faces
Expand Down Expand Up @@ -1644,3 +1646,88 @@ e.g. Sunday, September 17, 2000."
(setq org-ref-bibliography-notes "~/.emacs.d/GTD/orgref/notes.org"
org-ref-default-bibliography '("~/.emacs.d/GTD/orgref/reference.bib" "~/.emacs.d/GTD/orgref/20180324.bib" "~/.emacs.d/GTD/orgref/20180303.bib" "~/.emacs.d/GTD/orgref/higherMegawatt.bib" "~/.emacs.d/GTD/orgref/20161223.bib")
org-ref-pdf-directory "~/.emacs.d/GTD/orgref/bibtex-pdfs/")



(defun copy-file-name-to-clipboard ()
"Copy the current buffer file name to the clipboard."
(interactive)
(let ((filename (if (equal major-mode 'dired-mode)
default-directory
(buffer-file-name))))
(when filename
(kill-new filename)
(message "Copied buffer file name '%s' to the clipboard." filename))))


;(require 'artbollocks-mode)
;(add-hook 'text-mode-hook 'artbollocks-mode)

(use-package artbollocks-mode
:defer t
:config
(progn
(setq artbollocks-weasel-words-regex
(concat "\\b" (regexp-opt
'("one of the"
"should"
"just"
"sort of"
"a lot"
"probably"
"maybe"
"perhaps"
"I think"
"really"
"pretty"
"nice"
"action"
"utilize"
"leverage") t) "\\b"))
;; Don't show the art critic words, or at least until I figure
;; out my own jargon
(setq artbollocks-jargon nil)))

;;; http://emacsredux.com/blog/2013/03/27/open-file-in-external-program/
(defun prelude-open-with (arg)
"Open visited file in default external program.
With a prefix ARG always prompt for command to use."
(interactive "P")
(when buffer-file-name
(shell-command (concat
(cond
((and (not arg) (eq system-type 'darwin)) "open")
((and (not arg) (member system-type '(gnu gnu/linux gnu/kfreebsd))) "xdg-open")
(t (read-shell-command "Open current file with: ")))
" "
(shell-quote-argument buffer-file-name)))))

(add-to-list 'org-file-apps '("pdf" . "acrobat %s"))


;; https://github.com/sachac/.emacs.d/blob/gh-pages/Sacha.org#estimating-wpm
(require 'org-clock)
(defun my/org-entry-wpm ()
(interactive)
(save-restriction
(save-excursion
(org-narrow-to-subtree)
(goto-char (point-min))
(let* ((words (count-words-region (point-min) (point-max)))
(minutes (org-clock-sum-current-item))
(wpm (/ words minutes)))
(message "WPM: %d (words: %d, minutes: %d)" wpm words minutes)
(kill-new (number-to-string wpm))))))



(defun my/org-send-to-bottom-of-list ()
"Send the current line to the bottom of the list."
(interactive)
(beginning-of-line)
(let ((kill-whole-line t))
(save-excursion
(kill-line 1)
(org-end-of-item-list)
(yank))))
281 changes: 281 additions & 0 deletions GTD/orgBoss/Note/notes.org

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions GTD/orgBoss/Site/www.site.org
Original file line number Diff line number Diff line change
Expand Up @@ -472,3 +472,69 @@ https://github.com/wklken/bash-utils
https://github.com/d3/d3

鼻祖级的做大数据可视化展现
** emacs learning
https://www.emacswiki.org/emacs/CategoryDotEmacs

http://emacslife.com/read-lisp-tweak-emacs/beginner-2-understand-emacs-lisp.html


Hooks(特别好的一个词,一个进步点,有点像是callback和closure的机制)
Hooks are lists of functions that are called from Emacs Lisp in order to modify the behaviour of something. For example, different modes have their own hooks so that you can add functions that will run when that mode is initialized. You saw this example earlier in the module:


(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
add-hook的第一个hook代表监听端口(监听函数),当一触发这个函数,则执行后面的第二个参数(对应一个函数或者一个hook)

http://y.tsutsumi.io/emacs-from-scratch-part-3-extending-emacs-with-elisp.html (hooks介绍)
Emacs provides a nice hook implementation. pass in the hook name you want to listen to, and the function name you want to call.

This is equivalent to:

(add-to-list 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
It adds the turn-on-eldoc-mode function to the list of functions
when a buffer is initialized with emacs-lisp-mode.



http://sachachua.com/blog/series/read-lisp-tweak-emacs/


** Adding more features to Emacs
Most Emacs libraries are not loaded automatically. This saves memory and keeps things simpler.
Some of the customizations you may want to make require that other parts of Emacs are loaded first.
For example, if you want to define a key for the c-mode-map (used for editing C code)
or add a function to org-mode-hook (called when a buffer is set up with Org Mode),
those libraries need to be loaded first. You can load libraries by using require, like this:

(require 'org)
This loads the org library. require looks for a file named after the name provided to it,
loads it, and double-checks that the library includes (provide 'feature-name-goes-here).
It signals a Cannot open load file error if the library is not found. If the library
exists but does not provide that symbol, you’ll get a Required feature FEATURE was not provided error instead.

Note that the symbol you give to require might not be the same as the function you call.
For example, c-mode is actually defined in the cc-mode library, while org-mode is defined in org.
To find out what file a function is defined in, use C-h f (describe-function) followed by the name of the function.
The first line will tell you what file the function is defined in, if any. For example, c-mode‘s definition starts with:

c-mode is an interactive autoloaded compiled Lisp function in
`cc-mode.el'.
The first part of the filename (before the .el or .elc) is usually what you would use with require.
If you have the source installed (the .el file), you can look for the (provide ...) expression to find the actual symbol to use.


Elisp初级教程
https://www.gnu.org/software/emacs/manual/html_mono/eintr.html

https://emacs-doctor.com/learn-emacs-lisp-in-15-minutes.html

https://cjohansen.no/an-introduction-to-elisp/


http://joelmccracken.github.io/entries/emacs-lisp-for-hackers-part-1-lisp-essentials/
Elisp高级教程
https://www.gnu.org/software/emacs/manual/html_mono/elisp.html

https://www.gnu.org/software/emacs/manual/html_mono/elisp.html#Tips

宏代表着二次解析,从你的字符串提取出可运行的lisp表达式
15 changes: 13 additions & 2 deletions GTD/orgBoss/newgtd.org
Original file line number Diff line number Diff line change
Expand Up @@ -1592,11 +1592,12 @@ SCHEDULED: <2018-08-29 周三>
3. [ ] 在你的计算目录下phaseAngle.csv修正
4. [ ] 提取扭矩曲线
5. [ ]
** TODO [#B] 2018论文版面费 <2018-09-07 周五 19:17> :@NCEPU:
SCHEDULED: <2018-09-15 周六> DEADLINE: <2018-09-30 周日>
** DONE [#B] 2018论文版面费 <2018-09-07 周五 19:17> :@NCEPU:
CLOSED: [2018-09-19 周三 02:55] SCHEDULED: <2018-09-15 周六> DEADLINE: <2018-09-30 周日>
:PROPERTIES:
:Effort: 1:00
:END:
- State "DONE" from "TODO" [2018-09-19 周三 02:55]
:LOGBOOK:
CLOCK: [2018-09-07 周五 19:17]--[2018-09-07 周五 19:18] => 0:01
:END:
Expand All @@ -1616,3 +1617,13 @@ CLOSED: [2018-09-16 周日 00:43] DEADLINE: <2018-09-15 周六>


必须完成
** TODO [#B] 交会议注册费 <2018-09-20 周四 15:08> :@NCEPU:
DEADLINE: <2018-09-21 周五>
:PROPERTIES:
:Effort: 1:00
:END:
:LOGBOOK:
CLOCK: [2018-09-20 周四 15:09]--[2018-09-20 周四 15:09] => 0:00
:END:


86 changes: 85 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@ ivy ivy-dired-history all-the-icons-ivy ivy-rich

### 19. 改进org-mode配置

org-mode organize your life into plain text(朴素的文字形势)

在.orgConf.el中添加的正确org-capture-templates,使用快捷键`C-c c`来捕捉你的想法并进行记录。 org-remember打算删掉。

有趣的大纲查看命令
Expand Down Expand Up @@ -770,7 +772,8 @@ the character you wana jump.
emacs对应的先标记
`C-x SPC a`, a代表标记键,可以为a-z
然后调回来使用,
`C-x r j` ,输入a即可
`C-x r j` : 表示跳转到某个文件
`C-x r s` : 表示复制当前信息到某个文件

有些人也说可以用C-SPC,然后C-x c-x跳转即可(进一步可以参考[标题16][151])。

Expand Down Expand Up @@ -3498,6 +3501,8 @@ Add [defshortcut code][179] inside the .orgConf.el

然后你就可以敲入`C-x r j` ,输入对应字母,跳转到对应的文件下。

<2018-09-20 18:21> `C-x r s` 表示复制内容到对应的文件内(有用的快捷键)。


### 88. magit cannot commit

Expand Down Expand Up @@ -7000,6 +7005,83 @@ org-ref设置
[org-ref][385] 结合pdf_tools,helm-bibtex,helm等工具,组合成一个文献管理平台。


### 145. Copy 当前文件的路径名+文件名

```
(defun copy-file-name-to-clipboard ()
"Copy the current buffer file name to the clipboard."
(interactive)
(let ((filename (if (equal major-mode 'dired-mode)
default-directory
(buffer-file-name))))
(when filename
(kill-new filename)
(message "Copied buffer file name '%s' to the clipboard." filename))))
```


对应还有复制文件到某个路径, 对应的是`M-x copy-file`


### 146. weasel word deleted ###


[ Artbollocks-mode ][386] is written by [sachac][387] who is very keen on the development of the emacs.

通过该mode可以让一些关键字、重复字和你定义的术语显示出来,自己再进行修改

```
(use-package artbollocks-mode
:defer t
:load-path "~/elisp/artbollocks-mode"
:config
(progn
(setq artbollocks-weasel-words-regex
(concat "\\b" (regexp-opt
'("one of the"
"should"
"just"
"sort of"
"a lot"
"probably"
"maybe"
"perhaps"
"I think"
"really"
"pretty"
"nice"
"action"
"utilize"
"leverage") t) "\\b"))
;; Don't show the art critic words, or at least until I figure
;; out my own jargon
(setq artbollocks-jargon nil)))
```


### 147. 记录一下你的敲击速度


怎么用? 当你打开一个.org文件,然后在一个标题下开始定时`C-c C-x C-i` 并且开始敲入单词,
一顿猛敲之后,关闭计时`C-c C-x C-o`,执行`M-x my/org-entry-wpm`,按照当前标题下的总字数/总时间得到你的 wpm.

```
(require 'org-clock)
(defun my/org-entry-wpm ()
(interactive)
(save-restriction
(save-excursion
(org-narrow-to-subtree)
(goto-char (point-min))
(let* ((words (count-words-region (point-min) (point-max)))
(minutes (org-clock-sum-current-item))
(wpm (/ words minutes)))
(message "WPM: %d (words: %d, minutes: %d)" wpm words minutes)
(kill-new (number-to-string wpm))))))
```




----------
Expand Down Expand Up @@ -7393,3 +7475,5 @@ org-ref设置
[383]: http://members.optusnet.com.au/~charles57/GTD/datetree.html
[384]: https://github.com/tmalsburg/helm-bibtex
[385]: https://github.com/jkitchin/org-ref
[386]: https://github.com/sachac/artbollocks-mode
[387]: https://github.com/sachac/.emacs.d/blob/gh-pages/Sacha.org#avoiding-weasel-words
6 changes: 3 additions & 3 deletions bookmarks
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
(position . 56775))
("org-capture-last-stored"
(filename . "~/.emacs.d/GTD/orgBoss/Note/notes.org")
(front-context-string . "** workflow mana")
(rear-context-string . "_graphviz.png]]\n")
(position . 66791))
(front-context-string . "** 对文字的敬畏 [#B] ")
(rear-context-string . "准一个目标,纹丝不动,反复琢磨\n")
(position . 76873))
#1=(#("org-remember-last-stored" 0 24
(bmkp-full-record #1#))
(annotation)
Expand Down
8 changes: 4 additions & 4 deletions elpa/archives/gnu/archive-contents
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
((:keywords "convenience")
(:url . "https://github.com/ergoemacs/ergoemacs-mode"))])
(excorporate .
[(0 8 0)
[(0 8 1)
((emacs
(24 1))
(fsm
Expand All @@ -443,7 +443,7 @@
(url-http-ntlm
(2 0 3))
(nadvice
(0 2)))
(0 3)))
"Exchange integration" tar
((:keywords "calendar")
(:url . "http://elpa.gnu.org/packages/excorporate.html"))])
Expand Down Expand Up @@ -772,7 +772,7 @@
((:url . "http://elpa.gnu.org/packages/myers.html")
(:keywords "list" "containers"))])
(nadvice .
[(0 2)
[(0 3)
nil "Forward compatibility for Emacs-24.4's nadvice" single
((:url . "http://elpa.gnu.org/packages/nadvice.html")
(:keywords))])
Expand Down Expand Up @@ -854,7 +854,7 @@
((:keywords "convenience" "text" "org")
(:url . "https://savannah.nongnu.org/projects/org-edna-el/"))])
(orgalist .
[(1 8)
[(1 9)
((emacs
(24 4)))
"Manage Org-like lists in non-Org buffers" single
Expand Down
2 changes: 1 addition & 1 deletion elpa/archives/gnu/archive-contents.signed
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Good signature from 474F05837FBDEF9B GNU ELPA Signing Agent <elpasign@elpa.gnu.org>
(trust undefined) created at 2018-09-14T05:10:02+0800 using DSA
(trust undefined) created at 2018-09-19T17:10:02+0800 using DSA
2 changes: 1 addition & 1 deletion elpa/archives/marmalada/archive-contents
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@
[(0 0 1)
nil "get stuff from pinboard" single])
(picpocket .
[(39)
[(40)
((emacs
(24 4)))
"Image viewer" single])
Expand Down
2 changes: 1 addition & 1 deletion elpa/archives/melpa/archive-contents

Large diffs are not rendered by default.

Loading

0 comments on commit 16e22c3

Please sign in to comment.