emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Raffi R <raffir@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>, emacs-orgmode@gnu.org
Subject: Re: indent list item and change list type automatically
Date: Sun, 5 Jul 2009 18:26:48 -0400	[thread overview]
Message-ID: <b49618890907051526i33a7dc2dkfe3792c0a50620ab@mail.gmail.com> (raw)
In-Reply-To: <87d48f9c6c.wl%ucecesf@ucl.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

Hello,

Here is the current jot-mode (I think...the latest version is at my
lab and is, I think, much less buggy when it comes to showing levels)
along with some documentation and a lot of TODOs. It's pretty dirty,
and I'd greatly appreciate input. When people think it's at a
releasable state, I'll put it up on Worg/EmacsWiki.

Thanks,
- Raffi.

On Sun, Jul 5, 2009 at 3:12 PM, Eric S Fraga<ucecesf@ucl.ac.uk> wrote:
> At Sun, 5 Jul 2009 10:57:34 -0400,
> Raffi R wrote:
>>
>> I've written a very quick and dirty derived mode for org that
>> implements the following keystrokes:
>> Tab is demote.
>> Shift-tab is promote.
>> Enter is org-insert-heading.
>> C-tab is the old Shift-Tab
>> C-j is the old Return.
>>
>> I know it messes with the default org configuration, which is part of
>> why I have not posted it anywhere, but it works *extremely* well for
>> me when I'm taking notes e.g. in lecture, and I find myself using
>> jot-mode (what I named it) just as often as org-mode proper.
>>
>> If people are interested, I'd be glad to email it/post it on EmacsWiki
>> or Worg (although I should warn you, it is probably very unstylish
>> Elisp, too!).
>
> I cannot speak for others but I'm interested, especially having
> recently acquired a Nokia N800 internet tablet... where keystrokes are
> to be minimised and your bindings sound quite appropriate for note
> taking.  Please post here or on wiki/worg sites.
>

[-- Attachment #2: jot-mode.org --]
[-- Type: application/octet-stream, Size: 2138 bytes --]

* Jot Mode

Jot mode is a collection of keyboard shortcuts and layout settings (mostly forcing show-all more often than not) designed to make org-mode more amenable to rapid notetaking (e.g. in lectures or brainstorming sessions). It is a derived mode of org-mode.

* Jot Mode is derived from org-mode

Jot mode is extremely short. This is because it is a derivation of org-mode which allows for the full power of org-mode with keyboard shortcuts more amenable to certain use cases. However, since it is not necessarily desirable to use these shortcuts all the time, they are not just hooks into org-mode itself. This means that you can use jot-mode when it is appropriate (e.g. rapid notetaking sessions) and org-mode when it is appropriate (a million other things).

* Usage

** Keyboard shortcuts:
   - Enter/Return :: Insert new heading beneath current one.
   - C-j :: insert text below current heading without creating new heading first.
   - Tab :: Demote current heading.
   - Shift-Tab :: Promote current heading.
   - C-Tab :: Cycle through expansion options for buffer.

* TODOS
** Make default header export level 0.
   This is doable with C-0 org-export-this-file. I'm not sure how to
pass the digit, though.
This would be useful because most headings in jot-mode tend to have no text underneath them (in my use, anyways).
** Create keyword recognized by org-export as a heading
   Since the default export level should be 0, it would be nice to have some way to indicate a section heading.
** Fix jot-kill-current-heading and bind it to a key.
** show-all on load.
   In fact, you know what? show-all everywhere.
** Figure out consistent behaviour for level collapse.
   I figure show-all should be the default behaviour. Not sure how/when to enable to enable level collapse. Right now, level collapsing is all messed up.
** Redefine modified functions as advice.
   Some of the modified org-functions should probably just be defadvice wrappers around the existing functions instead of defuns proper.
** Bind return to org-insert-heading instead of org-insert-heading-after-current.
** Promote/demote non-*s with Tab/S-Tab


[-- Attachment #3: jot.el --]
[-- Type: application/octet-stream, Size: 3117 bytes --]

;;; jot-mode.el -- Notetaking mode that extends org-mode for Emacs.

;; Copyright (C) 2009 Raffi Rush <raffir@gmail.com>

;; Maintainer: Raffi Rush
;; Version: 0.1
;; Keywords: outlines, lecture notes, notetaking, notes, jot

;; This file is not part of GNU Emacs

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

;;; Commentary:

;; This file implements some extensions for org-mode to make it
;; more amenable to being used to construct an outline very rapidly
;; (e.g. for lecture notes).

;; Put this file into your load-path and put the following into your ~/.emacs:
;; (require 'jot)

;; Using jot-mode:

;; Jot-mode modifies org-mode to make it more amenable to rapid notetaking.
;; First of all, by default all headings are expanded.
;; Second of all, key remappings:
;; [Return/enter]: creates a new bullet at the same level as the current heading. To edit text under the current heading, use C-j or C-return
;; TAB: demotes the current heading. It can be used anywhere with the current heading. In org-mode, this is done using Meta-[right arrow]
;; Shift-TAB: outdents (promotes the current heading)
;; C-TAB: is the new org-shifttab

;;; Code:
(require 'org)


(define-derived-mode jot-mode
  org-mode "Jot"
  "Major mode for jottable notes. Derived from org-mode."
  )

;(defadvice org-insert-heading-after-current (after jot-insert-heading-after-current)
;  (show-all))

(defun jot-insert-heading-after-current ()
  "Same as org-insert-heading-after-current, but shows all headings."
  (interactive)
  (org-insert-heading-after-current)
  (show-all))

(defun (jot-metaup) ()
  "Same as org-metaup, but shows all headings."
  (interactive)
  (org-metaup)
  (show-all))

(defun jot-metadown ()
  "Same as org-metadown, but shows all headings."
  (interactive)
  (org-metadown)
  (show-all))

;; jot-kill-current-headline: This doesn't work properly yet.
(defun jot-kill-current-headline ()
  (interactive)
  (save-excursion)
  (org-beginning-of-line)
  (or
   (replace-regexp "*+ " "")
   (replace-regexp "[0-9]\. " ""))
)

(define-key jot-mode-map (kbd "RET") 'jot-insert-heading-after-current)
(define-key jot-mode-map [(tab)]      'org-do-demote)
(define-key jot-mode-map [(shift tab)] 'org-do-promote)
(define-key jot-mode-map [(control tab)] 'org-shifttab)
(define-key jot-mode-map [(control return)] 'org-return-indent)  



;;; Finish up
(provide 'jot-mode)
(provide 'jot)

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2009-07-05 22:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 21:23 indent list item and change list type automatically Rainer Stengele
2009-06-29  7:51 ` Rainer Stengele
2009-06-29  9:46   ` Eric S Fraga
2009-07-06 13:44   ` Carsten Dominik
2009-07-07 11:20     ` Rainer Stengele
2009-07-07 11:33       ` Carsten Dominik
2009-07-07 11:44         ` Rainer Stengele
2009-07-07 11:52           ` Carsten Dominik
2009-07-07 21:15             ` Rainer Stengele
2009-06-30  0:51 ` Samuel Wales
2009-07-05 14:57   ` Raffi R
2009-07-05 19:12     ` Eric S Fraga
2009-07-05 22:26       ` Raffi R [this message]
2009-07-06  8:32         ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b49618890907051526i33a7dc2dkfe3792c0a50620ab@mail.gmail.com \
    --to=raffir@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).