{"id":13646529,"url":"https://github.com/aborn/leanote-emacs","last_synced_at":"2025-04-13T05:37:35.122Z","repository":{"id":69739302,"uuid":"62980107","full_name":"aborn/leanote-emacs","owner":"aborn","description":"A minor mode writing markdown note using leanote platform in emacs.","archived":false,"fork":false,"pushed_at":"2018-01-02T11:02:35.000Z","size":335,"stargazers_count":30,"open_issues_count":4,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T22:12:34.361Z","etag":null,"topics":["emacs","leanote","leanote-emacs","leanote-mode"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aborn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-07-10T03:37:47.000Z","updated_at":"2024-01-09T13:15:05.000Z","dependencies_parsed_at":"2023-05-14T18:30:49.829Z","dependency_job_id":null,"html_url":"https://github.com/aborn/leanote-emacs","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborn%2Fleanote-emacs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborn%2Fleanote-emacs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborn%2Fleanote-emacs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborn%2Fleanote-emacs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aborn","download_url":"https://codeload.github.com/aborn/leanote-emacs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670506,"owners_count":21142897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","leanote","leanote-emacs","leanote-mode"],"created_at":"2024-08-02T01:02:58.270Z","updated_at":"2025-04-13T05:37:35.096Z","avatar_url":"https://github.com/aborn.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"# leanote-mode\n[![Build Status](https://travis-ci.org/aborn/leanote-emacs.svg?branch=master)](https://travis-ci.org/aborn/leanote-emacs)\n[![MELPA](https://melpa.org/packages/leanote-badge.svg)](https://melpa.org/#/leanote)\n[![MELPA Stable](https://stable.melpa.org/packages/leanote-badge.svg)](https://stable.melpa.org/#/leanote)\n[![POPKIT ELPA](https://elpa.popkit.org/packages/leanote-badge.svg)](https://elpa.popkit.org/#/leanote)  \n\nA minor mode writing notes in emacs with elegant way [leanote](https://leanote.com/[leanote])\nand its [open source platform](http://leanote.org/).\n\n## Install\nInstall it from elpa source package (i.e. [melpa](https://melpa.org/) or [popkit elpa](https://elpa.popkit.org/)).  \n```elisp\nM-x package-install RET leanote RET\n```\nManually install, download leanote.el file to folder */path/to/leanote/*  \n```elisp\n(add-to-list 'load-path \"/path/to/leanote/\")\n(require 'leanote)\n(add-hook 'markdown-mode-hook\n          (lambda ()\n            (leanote)\n            (leanote-spaceline-status)  ;; optional, use it if necessary\n            ))\n```\n\n## Usage\nAfter install, add following code to your init(.emacs or init.el anyway) file.\n```elisp\n(add-hook 'markdown-mode-hook 'leanote)\n```\n**Note:** Config your own server api if you use youself host(vps) as following  \n```elisp\n(setq leanote-api-root \"https://your-domain/api\")\n```\n\n## Actions\n* M-x leanote-login ------------ login to server.\n* M-x leanote-sync ------------- sync all notes from server to local.\n* M-x leanote-push ------------- push current note to remote server (include create new).\n* M-x leanote-pull ------------- pull and force update current note from server.\n* M-x leanote-find find -------- all notes in current account(default use swiper).\n* M-x leanote-helm-find -------- find all notes in current account(helm).\n* M-x leanote-delete ----------- delete current note.\n* M-x leanote-rename ----------- rename current note.\n* M-x leanote-notebook-create -- create new notebook.\n* M-x leanote-notebook-delete -- delete current notebook.\n\n## Hotkey for action\n* **C-x C-l u** leanote-push\n* **C-x C-l r** leanote-rename\n* **C-x C-l f** leanote-find\n* **C-x C-l o** leanote-pull\n* **C-x C-l n** leanote-notebook-create\n\n## Leanote status\nFirst of all, install spaceline (need 2.x version), install leanote status by *M-x leanote-spaceline-status* or add following code to your init file.\n```elisp\n(add-hook 'markdown-mode-hook\n          (lambda ()\n            (leanote)\n            (leanote-spaceline-status)  ;; optional, use it if necessary\n            ))\n```\nThe mode line show it status when markdown file is leanote, \n![](images/status.png \"mode line status\")\nWhat's more, when leanote note is modified local (without push to remote), the mode line show **leanote***\n![](images/statusm.png \"mode line status modified\")\nNot login status\n![](images/status-unlogin.png \"not login status\")\nAlready login status\n![](images/status-login.png \"already login status\")\nNeed sync with remote\n![](images/status-update.png \"need update current note\")\nNew note status, which need to push to remote\n![](images/statusnewnote.png \"new note need to push to remote\")\n\n## Leanote log\nAll logs are recorded in \\*Leanote-Log* buffer.\n\nEnglish version readme ends here. Chinese readme provided as follows.\n\n--------------------------------------------------------------------------------\n\n# leanote-mode\nleanote-mode是emacs下的一个**minor-mode**，使得你能在emacs下优雅的记笔记。同时，\n可采用[leanote](https://leanote.com/)提供的服务保存markdown格式的笔记内容。\n\n## 安装\n从elpa的源中进行安装（如[melpa](https://melpa.org/) 或者 [popkit elpa](https://elpa.popkit.org/).）  \n```elisp\nM-x package-install RET leanote RET\n```\n手工安装，下载leanote.el文件到文件夹*/path/to/leanote/*\n```elisp\n(add-to-list 'load-path \"/path/to/leanote/\")\n(require 'leanote)\n(add-hook 'markdown-mode-hook\n          (lambda ()\n            (leanote)\n            (leanote-spaceline-status)  ;; optional, use it if necessary\n            ))\n```\n\n## 使用\n将下面代码添加到你emacs的启动文件(.emacs 或者 init.el 或者 .spacemacs)\n```elisp\n(add-hook 'markdown-mode-hook 'leanote)\n```\n如果你是自己部署leanote的服务，配置自己服务的api\n```elisp\n(setq leanote-api-root \"https://your-domain/api\")\n```\n\n## 常用功能\n* M-x leanote-login ------------ 登录服务器\n* M-x leanote-sync ------------- 同步所有远端笔记到本地\n* M-x leanote-push ------------- 将当前本地笔记上传到远端(如果远端没有就创建之)\n* M-x leanote-pull ------------- 强制同步当前笔记为远端内容\n* M-x leanote-find ------------- 查找当前账号下所有本地笔记\n* M-x leanote-delete ----------- 删除当前笔记\n* M-x leanote-rename ----------- 重命名当前笔记\n* M-x leanote-notebook-create -- 新建立笔记本\n* M-x leanote-notebook-delete -- 删除当前笔记本\n\n## 常功能绑定的快捷键\n* **C-x C-l u** leanote-push\n* **C-x C-l r** leanote-rename\n* **C-x C-l f** leanote-find\n* **C-x C-l o** leanote-pull\n* **C-x C-l n** leanote-notebook-create\n\n## leanote状态显示\nleanote状态需要安装2.x及以上版本的spaceline，然后通过*M-x leanote-spaceline-status*\n或者将下列代码加入到你emacs初始配置文件里(这样不用每次打开emacs执行上面命令)。\n```elisp\n(add-hook 'markdown-mode-hook\n          (lambda ()\n            (leanote)\n            (leanote-spaceline-status)  ;; optional, use it if necessary\n            ))\n```\n当一个markdown文件为leanote时，其mode line会显示出来，如下：\n![](images/status.png \"mode line status\")\n当一个leanote文件只是在本地修改了，没有同步到远端的时，状态显示为**leanote***，如下：\n![](images/statusm.png \"mode line status modified\")\n没有登录时的状态\n![](images/status-unlogin.png \"not login status\")\n已经登录时的状态\n![](images/status-login.png \"already login status\")\n本地笔记没有远程笔记新时，需要同步远程笔记时的状态\n![](images/status-update.png \"need update current note\")\n还没有push到远端的新笔记状态\n![](images/statusnewnote.png \"new note need to push to remote\")\n\n## 操作日志\n所有的操作日志被记录在\\*Leanote-Log* 这个buffer里。\n\n## FAQ\n* 出现Could not create connection to leanote.com:443?  \n答：windows下emacs 24.5及以下版本是不支持TLS，要手动安装一个TLS库，见这个[博客](http://www.lonecpluspluscoder.com/2015/08/01/adding-tls-support-to-emacs-24-5-on-windows/)。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faborn%2Fleanote-emacs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faborn%2Fleanote-emacs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faborn%2Fleanote-emacs/lists"}