Skip to content

gnusosa/re-org.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

re-org.el

Control your ReOrg from Emacs

re-org.el is composed of several functions that control the executable re-org ruby gem.

Commands supported

Here is the list of commands supported by re-org.el. This is list generated by C-h a re-org RET

re-org          M-x ... RET
  Calls the selection of functions that re-org.el provides

re-org-mode     M-x ... RET
  Calls the minor mode that re-org.el provides

re-org-new      M-x ... RET
  Calls the generation of a new org-file with specific arguments given

re-org-new-template        M-x ... RET
  Creates a new template based on another template

re-org-quick    M-x ... RET
  Quickly creates a new org-file given a template and title

re-org-quick-jekyll-post   M-x ... RET
  Quickly creates a new jekyll-post org-file with a given title

Usage

To start the re-org.el’s minor mode:

M-x re-org-mode
M-x re-org

https://cloud.githubusercontent.com/assets/634696/4376515/3ecb0950-4346-11e4-89d0-5d8b238d2f09.gif

M-x re-org-new

https://cloud.githubusercontent.com/assets/634696/4376517/419d6f24-4346-11e4-9029-a54b17877a00.gif

Minor Mode

The following key bindings are provided by re-org.el’s minor mode:

re-org          C-c m
  Calls the selection of functions that re-org.el provides

re-org-new      C-c n
  Calls the generation of a new org-file with specific arguments given

re-org-new-template        C-c t
  Creates a new template based on another template

re-org-quick    C-c q
  Quickly creates a new org-file given a template and title

re-org-quick-jekyll-post   C-c j
  Quickly creates a new jekyll-post org-file with a given title

User custom configuration

auto-open

re-org.el will create a buffer and open any org-file that is created with any of the provided functions. This can be disabled via customize or setting re-org-auto-open to nil.

re-org-auto-open
  User option: Automatically open the newly created org-file in a new buffer
  Properties: standard-value custom-type custom-requests
              variable-documentation

re-org executable path

re-org.el can use a specific re-org ruby gem executable. re-org-command can be set with a string of the executable path.

re-org-command
  User option: Path to the re-org executable to use
  Properties: standard-value custom-type custom-requests
              variable-documentation

re-org gem path

In order, for this functions to work, re-org and its requirements must be found in the environment and executable path of Emacs.

For example for rbenv:

(setenv "PATH"
        (concat (getenv "HOME") "/.rbenv/shims:"
                (getenv "HOME") "/.rbenv/bin:" (getenv "PATH")))
 (setq exec-path
       (cons (concat (getenv "HOME") "/.rbenv/shims")
             (cons (concat (getenv "HOME") "/.rbenv/bin") exec-path)))

Current Status

re-org.el supports the following commands that the re-org gem provides:

  • Support for the new command with multiple arguments.
  • Support for the templates command with multiple arguments.
  • the status command was not implemented.

I don’t make use of status command from the re-org gem, therefore, I didn’t implemented it. Contributions for this missing feature are welcomed. :-D

Contributing

  1. Fork it
  2. Create your feature branch (`git checkout -b my-new-feature`)
  3. Commit your changes (`git commit -am ‘Added some feature’`)
  4. Push to the branch (`git push origin my-new-feature`)
  5. Create new Pull Request