Coder Social home page Coder Social logo

org-linenote's Introduction

org-linenote

An Emacs note package inspired by Visual Studio Code’s Linenote (https://marketplace.visualstudio.com/items?itemName=tkrkt.linenote).

What is this package?

org-linenote has several key features:

  • Creating a note per line
  • Saving notes by preserving the directory structure
  • Compatibility with VS Code Linenote extension
  • No org properties required
  • Based on a Git repository

org-linenote is useful when you need a detailed note on a specific line of code or document, unlike other note-taking packages that create a note per file. Additionally, the package does not require Org properties but only utilizes the line number from the filename.

Also, the package provides compatibility with the VS Code Linenote extension. If you manage the notes within the markdown (.md) format, the same notes can also be utilized in Visual Studio Code.

These features make org-linenote useful when you need ‘line-by-line’ notes to analyze the code and share notes with others. I use this package for analyzing Linux kernel and sharing insights with people (most of them are vscode users).

Installation

(require 'org-linenote)

Usage

https://github.com/seokbeomKim/org-linenote/blob/image/example.gif

The package provides interactive functions as follows:

  • org-linenote-mode: to enable Linenote’s highlight on the current buffer.
  • org-linenote-browse: to browse notes for the current buffer.
  • org-linenote-add-annotate: to add a note for the current line.
  • org-linenote-edit-annotate: an alias for org-linenote-add-annotate. Edit the note corresponding to the current line.
  • org-linenote-remove-annotate: to remove the note corresponding to the current line.
  • org-linenote-move-forward: to move to the next note from the current line.
  • org-linenote-move-backward: to move to the previous note from the current line.
  • org-linenote-find-root-dir: to find the root directory of the project.
  • org-linenote-find-note-dir: to find the note directory of the current buffer.

Single-line and multi-line notes

This package manages the notes by using relative paths and line numbers. Every note is stored in the .linenote directory in the project root directory with the relative path and the line number.

For example, when we add a note on init/main.c:131, then it creates the note in .linenote/init/main.c#L131.org (or .md file based on the configuration). You can also create a multi-line note by selecting multiple lines in the code or document. In this case, the note is created in .linenote/init/main.c#L131-133.org, for example.

Integrating org-linenote and VS Code’s Linenote

org-linenote utilizes the directory $PROJECT/.linenote, but VS Code Linenote uses $PROJECT/.vscode/linenote.

Notes must be in markdown format to be displayed correctly in VS Code. org-linenote can deal with both org and markdown format. But, VS Code Linenote can only deal with markdown format. So, I recommend using the markdown format for compatibility with vscode-linenote if you use vscode as well.

If you want to create notes with a different extension, you can set org-linenote--default-extension to other values. This only affects the extension of new notes to create and does not filter existing notes.

(setq org-linenote--default-extension ".md")

Create a symbolic link (org-linenote directory to VS Code Linenote directory)

$ ln -sv $PROJECT/.linenote $PROJECT/.vscode/linenote

Change-Log

0.2.0

  • Fix a bug on mode activation
  • Add a feature to auto highlight by filenotify events
  • Add interactive functions to move to the next/previous note
  • Add interactive functions to find Linenote directory

0.1.2

  • Refactor org-linenote-mode to use minor-mode
  • Modified code according to MELPA PR feedbacks (melpa/melpa#8955)

0.1.1

  • Fix a bug on note browsing
  • Add org-linenote--default-extension

0.1.0

  • initial version

Feedback

If you have any feedback, suggestions for improvements, or advice, please feel free to get in touch.

org-linenote's People

Contributors

seokbeomkim avatar

Stargazers

Patryk Gronkiewicz avatar Kostas Andreadis avatar Mohammed Zeglam avatar FCP avatar  avatar Aaron avatar JunghanKim avatar Eli avatar  avatar Jesse Claven avatar Jens Östlund avatar Yutaka Matsubara avatar 肥肥 avatar AKIYAMA Kouhei avatar  avatar Takaaki ISHIKAWA avatar  avatar DarkBuffalo avatar Fabrizio Contigiani avatar Mir Behroz Noor avatar A. Cingoranelli avatar  avatar  avatar Lukas C. Bossert avatar Jonne Mickelin Sätherblom avatar  avatar stardiviner avatar Zachary Romero avatar Ashton Wiersdorf avatar Adam Porter avatar Terje Larsen avatar

Watchers

 avatar JunghanKim avatar  avatar

Forkers

emacsmirror

org-linenote's Issues

todo: move to prev/next note

Todo

Functions to move around notes (go to prev/next note)

Detail

Functions to go to prev/next must be implemented

todo: live preview with posframe or eldoc

Todo

Live preview support (#feature support)

Details

By providing an additional mode or flag, it must be available to see notes on the current cursor even though the user does not open them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.