Skip to content

Commit

Permalink
Now you can listen music in emacs
Browse files Browse the repository at this point in the history
  • Loading branch information
jueqingsizhe66 committed Oct 9, 2017
1 parent 4751365 commit fa88681
Show file tree
Hide file tree
Showing 109 changed files with 20,913 additions and 7 deletions.
1 change: 0 additions & 1 deletion .orgConf.el
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@ Captured %<%Y-%m-%d %H:%M>
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))



;; better bullets ;;
(font-lock-add-keywords 'org-mode ;;
'(("^ +\\([-*]\\) " ;;
Expand Down
5 changes: 5 additions & 0 deletions GTD/newgtd.org
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ DEADLINE: <2017-10-22 周日> SCHEDULED: <2017-10-03 周二>
- [ ] 丝线实验 流场可视化实验
** TODO [#B] 办理工程热物理注册问题 [85%] :@work:
SCHEDULED: <2017-10-08 周日>


:PROPERTIES:
:Effort: 1:00
:END:
Expand Down Expand Up @@ -199,3 +201,6 @@ http://www.howardism.org/Technical/Emacs/spreadsheet.html
#+END_EXAMPLE


* fdf
SCHEDULED: <2017-10-09 周一>

77 changes: 77 additions & 0 deletions GTD/orgBoss/Note/notes.org
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,86 @@ https://link.zhihu.com/?target=http%3A//orgmode.org/org.pdf
(highlight-regexp "0[0-9]\\{2\\}-[0-9]\\{8\\}" 'phone-number-lock-face)
(highlight-regexp "Lisp\\|Scheme" 'language-lock-face)
(highlight-regexp "神之编辑器\\|编辑器之神" 'emacs-vim-lock-face)


)

; org mode 中开启高亮
(add-hook 'org-mode-hook 'bigboss-highlight)

https://www.zhihu.com/question/28830039?sort=created
** latex author [#B] :@work:
Added: [2017-10-09 周一 21:41]
LaTeX 的作者 Leslie Lamport

本论文全篇使用Emacs25.3进行文字编辑,Tex Live 2013进行排版设计,git2.13进行版本控制
org——mode进行进度管理。因此要感谢Emacs的发明者Richard Stallman;Tex的发明者Donald Knuth;
git的发明者Linus Torvalds, latex的作者Lesile Lamport;以及Org-mode的发明者carsten Dominik.
** schedule zone [#B] :@work:
Added: [2017-10-09 周一 21:44]
精确到时间是可以的,时间区间都可以。 格式是:
SCHEDULED: <2015-04-04 Sat 09:00-12:00 ++1d>
这样。上面这句的意思是从4-4日开始, 每天早上的9-12点规划干某件事情。

至于提醒功能, 可以试试org-notify, 不过这个我自己没有用过, 所以不好回答你。
** shift+l [#B] :@work:
Added: [2017-10-09 周一 21:49]

你好~想问一下第一张图里面的每个Day下的时间是怎么显示的,
我用C-c C-s 和C-c C-d设置了时间,但是在界面里面却没有显示,我现在用的是emacs25.1。

在 org-agenda 里面按 Shift-l 就可以啦
** add clock summary [#B] :@work:
Added: [2017-10-09 周一 22:14]

如何在一个org文件创建clock summary
C-c C-x C-r
** org blog jekyll [#B] :@work:
Added: [2017-10-09 周一 22:16]

org-mode可以直接拿来写blog, 这不是什么新鲜事了。 不过最近发现几个项目, 可以方便地从org 输出到jekyll支持的格式。
对于喜欢jekyll,但更喜欢org-mode的同学是个好的解决方案。 当然也有直接从org-mode生成静态网页的。


https://github.com/noinil/prelude/blob/master/personal/noinil.el
https://github.com/noinil/prelude/blob/75d41be0c5da3383cde1bd073c2aa5a9f4b7d792/personal/noinil.el#L397
** emacs 看电影 [#B] :@F708:
Added: [2017-10-09 周一 22:46]
用Emacs看电影

大多数人用emacs听歌,我却喜欢用emacs看电影。用 EMMS 和 mplayer 结合,看电影真是太方便了。

不要从源里安装EMMS,它可能给你安装别的播放器,没必要,我们有 mplayer 足够了。从 EMMS 的主页下载,然后编译安装 EMMS 。

然后在 .emacs 中加入如下的配置:
1
2
3
4
5
6
7
8
9
10
11
12

(require 'emms-setup)
(emms-standard)
(setq emms-player-list '(emms-player-mplayer) emms-player-mplayer-command-name "mplayer" emms-player-mplayer-parameters '("-slave"))
(setq emms-repeat-playlist nil emms-source-file-default-directory "~/音乐/" emms-lyrics-dir "~/音乐/" emms-lyrics-coding-system nil emms-playlist-buffer-name "*EMMS*")
(global-set-key (kbd "C-c e g") 'emms-play-directory)
(global-set-key (kbd "C-c e d") 'emms-play-dired)
(global-set-key (kbd "C-c e v") 'emms-playlist-mode-go)
(global-set-key (kbd "C-c e x") 'emms-start)
(global-set-key (kbd "C-c e SPC") 'emms-pause)
(global-set-key (kbd "C-c e s") 'emms-stop)
(global-set-key (kbd "C-c e n") 'emms-next)
(global-set-key (kbd "C-c e p") 'emms-previous)

我的emms設置比較簡單,我只是通過它調用mplayer聽歌看電影,不需要看歌詞等額外的功能。我要说的是用 EMMS + mplayer + Dired 可以非常方便地看碟。

通過 Dired 打開電影目錄,比如其中有一個文件夾 辛德勒名單 ,裏面有4 個媒體文件:辛德勒名單CD1.avi、辛德勒名單CD2.avi、辛德勒名單CD3.avi、辛德勒名單CD4.avi。我只需要將光標停在 辛德勒名單 文件夾上,按 C-c e d ,調用 emms-play-dired 函數,則會自動建立播放列表,mplayer 按順序播放這4個文件。

比如有一個電視劇的文件夾 手機 ,裏面共有 36 集,我今天想看 10-12集,用 Dired 進入 手機 文件夾,用 m 在 10-12 集上做標記,然後按 C-c e d ,mplayer 就會順次播放 10-12集。
4 changes: 4 additions & 0 deletions GTD/orgBoss/Site/www.site.org
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ M-x desrcibe-theme
github gist
** https://gist.github.com/discover
All gist
** https://en.wikibooks.org/wiki/LaTeX
latex入门到精通
** https://www.zhihu.com/people/noinil/answers?page=2
chen tao
132 changes: 132 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,132 @@ Headline1 become purple now.
see the journal folder @ `~/.emacs.d/GTD/orgBoss/`


### 63. Now I am listening music with emms in Windows10

1. [emms][118] 安装: `M-x package-install emms`

emms会去调用mplayer播放音乐和电影,所以得把mplayer下载,然后添加到path目录下,
这样emms.el就回去调用该播放器。

2. 离开emacs, [mplayer][119]下载,我把其放在E:/mpalyer底下(可以参看[mplayer官网][120]
```
E:\MPlayer 的目录
2016/12/04 10:33 <DIR> .
2016/12/04 10:33 <DIR> ..
2016/12/04 10:33 <DIR> fonts
2016/12/04 10:33 18,437 LICENSE.txt
2016/12/04 10:33 29,576,704 mencoder.exe
2016/12/04 10:33 <DIR> mplayer
2016/12/04 10:33 31,128,064 mplayer.exe
2016/12/04 10:33 633,017 MPlayer.html
2016/12/04 10:33 534,832 MPlayer.man.html
2013/02/18 13:28 4,306 README.win32.txt
6 个文件 61,895,360 字节
4 个目录 50,590,359,552 可用字节
```
3. 添加E:/mplayer路径到path目录下

4. 回到emacs,在customizations文件夹下创建setup-emms.el,添加如下内容

以下配置来自[Chen Tao][122]
```
;; =============================================================================
;; emms mode settings ===================================================
;; ___ _ __ ___ _ __ ___ ___
;; / _ \ '_ ` _ \| '_ ` _ \/ __|
;; | __/ | | | | | | | | | \__ \
;; \___|_| |_| |_|_| |_| |_|___/
;;
(require 'emms-setup)
(emms-all)
(require 'emms-i18n)
(require 'emms-history)
;; (emms-default-players)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (setq emms-player-list ;;
;; '(emms-player-mplayer ;;
;; emms-player-mpg321 ;;
;; emms-player-ogg123)) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; use mplayer , that's enough!
(setq emms-player-list '(emms-player-mplayer) emms-player-mplayer-command-name "mplayer" emms-player-mplayer-parameters '("-slave"))
(setq emms-playlist-buffer-name "*Music*")
(add-hook 'emms-player-started-hook 'emms-show)
(setq emms-show-format "Now Playing: %s")
(setq emms-source-file-default-directory "H:/Classic/") ;;depend on yourself!! Change your music or movie directory
;; emms-playlist mode keys map
(global-set-key (kbd "C-c m s") 'emms-stop)
(global-set-key (kbd "C-c m P") 'emms-pause)
(global-set-key (kbd "C-c m n") 'emms-next)
(global-set-key (kbd "C-c m p") 'emms-previous)
(global-set-key (kbd "C-c m f") 'emms-show)
(global-set-key (kbd "C-c m >") 'emms-seek-forward)
(global-set-key (kbd "C-c m <") 'emms-seek-backward)
(global-set-key (kbd "C-c m S") 'emms-start)
(global-set-key (kbd "C-c m g") 'emms-playlist-mode-go)
(global-set-key (kbd "C-c m d") 'emms-play-directory-tree)
(global-set-key (kbd "C-c m h") 'emms-shuffle)
(global-set-key (kbd "C-c m e") 'emms-play-file)
(global-set-key (kbd "C-c m l") 'emms-play-playlist)
(global-set-key (kbd "C-c m r") 'emms-toggle-repeat-track)
(global-set-key (kbd "C-c m R") 'emms-toggle-repeat-playlist)
(add-hook 'emms-playlist-mode-hook
(lambda ()
(toggle-truncate-lines 1)))
```

使用mplayer即可,解决所有emacs的music and movie(注意播放电影的时候,实际上已经不在emacs界面下,
使用q退出mplayer,使用上下左右方向键进行快进等)播放问题。

自己定制你的音乐文件夹`emms-source-file-default-directory`!

5. 使用感受(m是music和movie的缩写)

- 常用函数
+ C-c m d(emms-play-directory-tree) 打开一个播放文件夹
+ C-c m g(emms-playlist-mode-go) 打开播放列表
+ RET 在播放列表下按下enter键表示播放
------------------------------------------------------以上三个命令够了
+ C-c m n(emms-next) 下一首
+ C-c m p(emms-previous) 上一首
+ C-c m P (emms-Pause)暂停
+ C-c m s (emms-stop) 停止
+ C-c m S (emms-start) 开始

首先打开一个音乐文件夹(不喜欢一个文件打开 `M-x emms-play-file(c-c m e) `,
喜欢使用`M-x emms-play-directory-tree(C-c m d)`

![musiclist][123]

然后打开播放列表(使用`M-x emms或者M-x emms-playlist-mode-go(C-c m g)`)

有时候要播放下一首,就使用(`M-x emms-next(c-c m n)` 类似前一首`M-x emms-previous(C-c m p`)


[网友][121],提供一个播放多个电影文件的方法

```
通過 Dired 打開電影目錄,比如其中有一個文件夾 辛德勒名單 ,裏面有4 個媒體文件:
辛德勒名單CD1.avi、辛德勒名單CD2.avi、辛德勒名單CD3.avi、辛德勒名單CD4.avi。我只需要將光標停在 辛德勒名單 文件夾上,
按 C-c e d ,調用 emms-play-dired 函數,則會自動建立播放列表,mplayer 按順序播放這4個文件。
比如有一個電視劇的文件夾 手機 ,裏面共有 36 集,我今天想看 10-12集,用 Dired 進入 手機 文件夾,用 m 在 10-12 集上做標記,
然後按 C-c e d ,mplayer 就會順次播放 10-12集。
```



<hr/>
<hr/>

Expand Down Expand Up @@ -1814,3 +1940,9 @@ see the journal folder @ `~/.emacs.d/GTD/orgBoss/`
[115]:https://github.com/vvvvalvalval/scope-capture/blob/master/doc/Tutorial.md
[116]:https://github.com/vvvvalvalval/scope-capture
[117]:https://github.com/jueqingsizhe66/ranEmacs.d/blob/develop/customizations/img/purple.jpg
[118]:https://www.gnu.org/software/emms/
[119]:http://oss.netfarm.it/mplayer/
[120]:http://www.mplayerhq.hu/design7/news.html
[121]:http://darksun.blog.51cto.com/3874064/1339029
[122]:https://github.com/noinil/prelude/blob/75d41be0c5da3383cde1bd073c2aa5a9f4b7d792/personal/noinil.el#L195
[123]:https://github.com/jueqingsizhe66/ranEmacs.d/blob/develop/customizations/img/music.jpg
15 changes: 10 additions & 5 deletions bookmarks
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
;;; 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 -*-
(("www.site.org"
(("rupeng.sql"
(filename . "h:/rupeng.sql")
(front-context-string . "ues(null,'card_v")
(rear-context-string . "o T_Settings val")
(position . 380))
("www.site.org"
(filename . "~/.emacs.d/GTD/orgBoss/Site/www.site.org")
(front-context-string . "* SITES\n** www.o")
(rear-context-string)
Expand All @@ -23,10 +28,10 @@
(rear-context-string . "5-03 Sun 21:38]\n")
(position . 499))
("org-capture-last-stored"
(filename . "~/.emacs.d/GTD/newgtd.org")
(front-context-string . "** TODO [#B] Doi")
(rear-context-string . "0月11号 周三办理 汇款程序\n")
(position . 5950))
(filename . "~/.emacs.d/GTD/orgBoss/Note/notes.org")
(front-context-string . "** emacs 看电影 [#B")
(rear-context-string . "/noinil.el#L397\n")
(position . 7385))
("core.clj"
(filename . "e:/clojure-home/first-example/src/first_example/core.clj")
(front-context-string)
Expand Down
Binary file added customizations/img/music.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions customizations/setup-emms.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
;; =============================================================================

;; emms mode settings ===================================================
;; ___ _ __ ___ _ __ ___ ___
;; / _ \ '_ ` _ \| '_ ` _ \/ __|
;; | __/ | | | | | | | | | \__ \
;; \___|_| |_| |_|_| |_| |_|___/
;;
(require 'emms-setup)
(emms-all)
(require 'emms-i18n)
(require 'emms-history)

;; (emms-default-players)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (setq emms-player-list ;;
;; '(emms-player-mplayer ;;
;; emms-player-mpg321 ;;
;; emms-player-ogg123)) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; use mplayer , that's enough!
(setq emms-player-list '(emms-player-mplayer) emms-player-mplayer-command-name "mplayer" emms-player-mplayer-parameters '("-slave"))

(setq emms-playlist-buffer-name "*Music*")

(add-hook 'emms-player-started-hook 'emms-show)
(setq emms-show-format "Now Playing: %s")
(setq emms-source-file-default-directory "H:/Classic/") ;;depend on yourself!! Change your music or movie directory

;; emms-playlist mode keys map
(global-set-key (kbd "C-c m s") 'emms-stop)
(global-set-key (kbd "C-c m P") 'emms-pause)
(global-set-key (kbd "C-c m n") 'emms-next)
(global-set-key (kbd "C-c m p") 'emms-previous)
(global-set-key (kbd "C-c m f") 'emms-show)
(global-set-key (kbd "C-c m >") 'emms-seek-forward)
(global-set-key (kbd "C-c m <") 'emms-seek-backward)

(global-set-key (kbd "C-c m S") 'emms-start)
(global-set-key (kbd "C-c m g") 'emms-playlist-mode-go)
(global-set-key (kbd "C-c m d") 'emms-play-directory-tree)
(global-set-key (kbd "C-c m h") 'emms-shuffle)
(global-set-key (kbd "C-c m e") 'emms-play-file)
(global-set-key (kbd "C-c m l") 'emms-play-playlist)
(global-set-key (kbd "C-c m r") 'emms-toggle-repeat-track)
(global-set-key (kbd "C-c m R") 'emms-toggle-repeat-playlist)

(add-hook 'emms-playlist-mode-hook
(lambda ()
(toggle-truncate-lines 1)))
18 changes: 18 additions & 0 deletions elpa/emms-20170929.1427/dir
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.

File: dir, Node: Top This is the top of the INFO tree

This (the Directory node) gives a menu of major topics.
Typing "q" exits, "?" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs manual, etc.

In Emacs, you can click mouse button 2 on a menu item or cross reference
to select it.

* Menu:

Emacs
* Emms: (emms). The Emacs Multimedia System
Loading

0 comments on commit fa88681

Please sign in to comment.