From 4cd1b49f0648827698afc56af4a0c80eb9c81e7b Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sat, 11 Feb 2017 12:33:50 +0100 Subject: emacs: added org-capture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- emacs/custom.el | 2 +- emacs/init.html | 71 ++++++++++++++++++++++++++++++++++++++++++++------------- emacs/init.org | 25 +++++++++++++++++++- 3 files changed, 80 insertions(+), 18 deletions(-) (limited to 'emacs') diff --git a/emacs/custom.el b/emacs/custom.el index 6ba8355..b7db1a1 100644 --- a/emacs/custom.el +++ b/emacs/custom.el @@ -7,7 +7,7 @@ ["#1c1c1c" "#d78787" "#b9dc92" "#ffffaf" "#87afd7" "#875f87" "#dfafdf" "#d0d0d0"]) '(custom-safe-themes (quote - ("7e69e41a60afea0bea1e5f7a89416466db331ec45cbafe47ebec694411c997b8" "3762f105d8ea307cec0ee7cc36dcbce1ab0009ca1ae448fd07e8e8e65647431f" "75080b8936556e23444bd76fcfc042e484a50a403ccb7f36fd190c21f7bf8941" "e2669e7d32201debd97395277167b6a1d93606b9445ebce01b9f878eb980e200" "92eb47cefb2f03abaaaa52c60a0b89845361577c2201d3399d19b944828505f4" "62c1fac02f61eaad07bf39fd461f5c78ee3424ba87a1f5fe91b1bea25475f327" "62f08bc59e1ac24e6df5b5b01fea2da24f2fec201b285ccda9991b7052a3a46a" "ce1c38b72f45eed22f3dfaf7f3f0df4b0b6ed975cc5d2012fb1aad13e8055840" "e8b0224a3bd5da096120bf19c976a29cfe67af41bfe73171348bfe99ee0da62d" "ad1c0d9498ad9344082d47e3a1bb6b75f0d004e0ae8361613b0c9963b23fbb4d" "8e6f5b61626315a98a6b38acfe966800777bf6a1841aa2b812b471772cc17114" "5869e98ef7446c9e2283e5788c0f6e2790676bdb52e9e1e112bb74e2415733c4" "5a3f33eefbcf2a3098bafd22d7ad44358e66c3e844797e7bf9ef552a08dfeb6f" default))) + ("8ebd5ccdc11c1e53647c9efc153dbcf0b00a61a519825d2698ce065913cecd35" "7e69e41a60afea0bea1e5f7a89416466db331ec45cbafe47ebec694411c997b8" "3762f105d8ea307cec0ee7cc36dcbce1ab0009ca1ae448fd07e8e8e65647431f" "75080b8936556e23444bd76fcfc042e484a50a403ccb7f36fd190c21f7bf8941" "e2669e7d32201debd97395277167b6a1d93606b9445ebce01b9f878eb980e200" "92eb47cefb2f03abaaaa52c60a0b89845361577c2201d3399d19b944828505f4" "62c1fac02f61eaad07bf39fd461f5c78ee3424ba87a1f5fe91b1bea25475f327" "62f08bc59e1ac24e6df5b5b01fea2da24f2fec201b285ccda9991b7052a3a46a" "ce1c38b72f45eed22f3dfaf7f3f0df4b0b6ed975cc5d2012fb1aad13e8055840" "e8b0224a3bd5da096120bf19c976a29cfe67af41bfe73171348bfe99ee0da62d" "ad1c0d9498ad9344082d47e3a1bb6b75f0d004e0ae8361613b0c9963b23fbb4d" "8e6f5b61626315a98a6b38acfe966800777bf6a1841aa2b812b471772cc17114" "5869e98ef7446c9e2283e5788c0f6e2790676bdb52e9e1e112bb74e2415733c4" "5a3f33eefbcf2a3098bafd22d7ad44358e66c3e844797e7bf9ef552a08dfeb6f" default))) '(delete-selection-mode nil) '(electric-indent-mode t) '(magit-commit-arguments (quote ("--all" "--verbose" "--signoff"))) diff --git a/emacs/init.html b/emacs/init.html index e751911..894a932 100644 --- a/emacs/init.html +++ b/emacs/init.html @@ -4,7 +4,7 @@ mssola's GNU Emacs configuration - + @@ -174,11 +174,12 @@ for the JavaScript code in this tag.
  • General settings
  • Publishing
  • Agenda
  • -
  • Other
  • -
  • TODO shortcut for making an org link, and transforming a link into a proper org link
  • -
  • TODO make it work with evil
  • -
  • TODO Proper keybindings for quick access.
  • -
  • TODO shortcuts for stuff like: create something urgent for today
  • +
  • Capture
  • +
  • Other
  • +
  • TODO shortcut for making an org link, and transforming a link into a proper org link
  • +
  • TODO make it work with evil
  • +
  • TODO Proper keybindings for quick access.
  • +
  • TODO shortcuts for stuff like: create something urgent for today
  • IRC
  • @@ -636,7 +637,7 @@ Global key binding.
    -
    (global-set-key (kbd "C-c c") 'calendar)
    +
    (global-set-key (kbd "M-c") 'calendar)
     
    @@ -2072,13 +2073,51 @@ The prefix for the different kinds of types being used. (todo . "%c:%t%s"))) + +

    +Set up a key binding for org-agenda. +

    + +
    + +
    (global-set-key (kbd "C-c a") 'org-agenda)
    +
    +
    -

    Other

    +

    Capture

    +Set the default notes file and the key binding. +

    + +
    + +
    (setq org-default-notes-file (concat org-directory "/notes.org"))
    +(define-key global-map "\C-cc" 'org-capture)
    +
    +
    + +

    +And finally set org-capture-templates. +

    + +
    + +
    (setq org-capture-templates
    +      `(("t" "todo" entry (file "") "* TODO %?\n%U\n")
    +        ("i" "idea" entry (file "") "* %? :IDEA:\n%U\n%a\n")))
    +
    +
    +
    +
    + + @@ -2721,7 +2760,7 @@ along with this program. If not, see < diff --git a/emacs/init.org b/emacs/init.org index 4444da9..a88e3fb 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -333,7 +333,7 @@ We catalans start our weeks on Monday. Global key binding. #+BEGIN_SRC elisp - (global-set-key (kbd "C-c c") 'calendar) + (global-set-key (kbd "M-c") 'calendar) #+END_SRC Fix some stuff for evil mode. @@ -1472,6 +1472,29 @@ The prefix for the different kinds of types being used. (todo . "%c:%t%s"))) #+END_SRC +Set up a key binding for org-agenda. + +#+BEGIN_SRC elisp +(global-set-key (kbd "C-c a") 'org-agenda) +#+END_SRC + +** Capture + +Set the default notes file and the key binding. + +#+BEGIN_SRC elisp +(setq org-default-notes-file (concat org-directory "/notes.org")) +(define-key global-map "\C-cc" 'org-capture) +#+END_SRC + +And finally set =org-capture-templates=. + +#+BEGIN_SRC elisp +(setq org-capture-templates + `(("t" "todo" entry (file "") "* TODO %?\n%U\n") + ("i" "idea" entry (file "") "* %? :IDEA:\n%U\n%a\n"))) +#+END_SRC + ** Other Insert a value in org mode. See this [[http://emacs.stackexchange.com/questions/2206/i-want-to-have-the-kbd-tags-for-my-blog-written-in-org-mode][StackExchange answer]]. -- cgit v1.2.3