Mercurial > emacs
comparison lisp/org/org-mouse.el @ 99139:8fa7ef477c04
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-format-agenda-item)
(org-agenda-filter-make-matcher): Make sure tags are stored and
compared donwcased.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-insert-todo-heading): Fix bug with force-heading
argument.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org-exp.el (org-export-as-ascii): Handle the case that we are
bulishing from an indirect buffer.
* org-table.el (org-table-copy-down): Fix bug with time stamp
increment.
* org-mouse.el (org-mouse-features): New option.
(org-mode-hook): Turn on features depending on
`org-mouse-features'.
* org.el (org-insert-heading-respect-content): Force heading
creation.
(org-insert-heading): keep the folding state of the heading before
the inserted one.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org-archive.el (org-archive-to-archive-sibling): Handle top
level headlines better.
2008-10-26 Bastien Guerry <bzg@altern.org>
* org-export-latex.el (org-export-latex-classes): Added
\usepackage{graphicx} to the default list of packages.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-filter): Renamed from
`org-agenda-filter-tags'.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-entry-properties): Add CATEGORY property, iven if it
is not defined as a property in this entry.
(org-add-log-note): Mask prefix argument when immediately storing
the note.
* org-agenda.el (org-agenda-filter-effort-default-operator): New
option.
2008-10-26 James TD Smith <ahktenzero@mohorovi.cc>
* org.el (org-add-log-setup): Bugfix; code to find insertion point
after drawers was skipping ahead one line too many, so notes were
inserted after the first note instead of before it.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-filter-tags,org-agenda-filter-form):
New variables.
(org-prepare-agenda): Reset the filter tags.
(org-agenda-filter-by-tag, org-agenda-filter-by-tag-show-all):
Show filter tags in mode line.
* org-table.el (orgtbl-to-html): Bind `html-table-tag' for the
formatter.
* org-export-latex.el (org-latex-entities-regexp): New constant.
(org-export-as-pdf): Use two calls to `shell-command'.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org-export-latex.el (org-export-latex-treat-sub-super-char):
Honor the {} value of the subsuperscript setting. Make sure that
longer subsuperscripts are typeset in a roman font.
* org.el (org-clock-update-time-maybe): Compute negative clock
intervals correctly.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-add-log-setup): Respect
`org-log-state-notes-insert-after-drawers'.
(org-log-state-notes-insert-after-drawers): New option.
(org-todo-trigger-tag-changes): New function.
(org-todo): Call `org-todo-trigger-tag-changes'.
2008-10-26 James TD Smith <ahktenzero@mohorovi.cc>
* org.el (org-add-log-setup): Only skip drawers if the are
immediately after the scheduling keywords.
* org-clock.el (org-clock-in-switch-to-state): Allow this to be a
function
(org-clock-in): If `org-clock-in-switch-to-state' is a function,
call it with the current todo state to get the state to switch to
when clocking in.
(org-clock-in): Use org-indent-line-function to indent clock lines.
(org-clock-find-position): Fix indentation of empty clock drawers.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org-publish.el (org-publish-org-to): Handle case when
org-export-to-pdf does return a file name, not a buffer.
(org-publish-org-to-pdf): New function.
* org-export-latex.el (org-export-as-pdf)
(org-export-as-pdf-and-open): New commands.
* org-table.el (org-table-eval-formula): Avoid parsing Calc's HMS
forms as ranges.
* org-export-latex.el (org-export-latex-lists): Ignore lists-like
things in protexted regions.
2008-10-26 Carsten Dominik <dominik@science.uva.nl>
* org-export-latex.el (org-export-latex-preprocess): Improve
quoting of LaTeX environments.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Sat, 25 Oct 2008 21:32:46 +0000 |
parents | e1cc41b9282d |
children | e3acb52d33e1 |
comparison
equal
deleted
inserted
replaced
99138:a479c7f4849d | 99139:8fa7ef477c04 |
---|---|
2 | 2 |
3 ;; Copyright (C) 2006, 2007, 2008 Free Software Foundation | 3 ;; Copyright (C) 2006, 2007, 2008 Free Software Foundation |
4 ;; | 4 ;; |
5 ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com> | 5 ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com> |
6 ;; Maintainer: Carsten Dominik <carsten at orgmode dot org> | 6 ;; Maintainer: Carsten Dominik <carsten at orgmode dot org> |
7 ;; Version: 6.09a | 7 ;; Version: 6.10c |
8 ;; | 8 ;; |
9 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
10 ;; | 10 ;; |
11 ;; GNU Emacs is free software: you can redistribute it and/or modify | 11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
12 ;; it under the terms of the GNU General Public License as published by | 12 ;; it under the terms of the GNU General Public License as published by |
164 (defcustom org-mouse-punctuation ":" | 164 (defcustom org-mouse-punctuation ":" |
165 "Punctuation used when inserting text by drag and drop." | 165 "Punctuation used when inserting text by drag and drop." |
166 :group 'org-mouse | 166 :group 'org-mouse |
167 :type 'string) | 167 :type 'string) |
168 | 168 |
169 (defcustom org-mouse-features | |
170 '(context-menu yank-link activate-stars activate-bullets activate-checkboxes) | |
171 "The features of org-mouse that should be activated. | |
172 Changing this variable requires a restart of Emacs to get activated." | |
173 :group 'org-mouse | |
174 :type '(set :greedy t | |
175 (const :tag "Mouse-3 shows context menu" context-menu) | |
176 (const :tag "C-mouse-1 and mouse-3 move trees" move-tree) | |
177 (const :tag "S-mouse-2 and drag-mouse-3 yank link" yank-link) | |
178 (const :tag "Activate headline stars" activate-stars) | |
179 (const :tag "Activate item bullets" activate-bullets) | |
180 (const :tag "Activate checkboxes" activate-checkboxes))) | |
169 | 181 |
170 (defun org-mouse-re-search-line (regexp) | 182 (defun org-mouse-re-search-line (regexp) |
171 "Search the current line for a given regular expression." | 183 "Search the current line for a given regular expression." |
172 (beginning-of-line) | 184 (beginning-of-line) |
173 (re-search-forward regexp (point-at-eol) t)) | 185 (re-search-forward regexp (point-at-eol) t)) |
408 (loop for priority from ?A to org-lowest-priority | 420 (loop for priority from ?A to org-lowest-priority |
409 collect (char-to-string priority))) | 421 collect (char-to-string priority))) |
410 | 422 |
411 (defun org-mouse-tag-menu () ;todo | 423 (defun org-mouse-tag-menu () ;todo |
412 (append | 424 (append |
413 (let ((tags (org-split-string (org-get-tags) ":"))) | 425 (let ((tags (org-get-tags))) |
414 (org-mouse-keyword-menu | 426 (org-mouse-keyword-menu |
415 (sort (mapcar 'car (org-get-buffer-tags)) 'string-lessp) | 427 (sort (mapcar 'car (org-get-buffer-tags)) 'string-lessp) |
416 `(lambda (tag) | 428 `(lambda (tag) |
417 (org-mouse-set-tags | 429 (org-mouse-set-tags |
418 (sort (if (member tag (quote ,tags)) | 430 (sort (if (member tag (quote ,tags)) |
888 | 900 |
889 (add-hook 'org-mode-hook | 901 (add-hook 'org-mode-hook |
890 '(lambda () | 902 '(lambda () |
891 (setq org-mouse-context-menu-function 'org-mouse-context-menu) | 903 (setq org-mouse-context-menu-function 'org-mouse-context-menu) |
892 | 904 |
893 ; (define-key org-mouse-map [follow-link] 'mouse-face) | 905 (when (memq 'context-menu org-mouse-features) |
894 (define-key org-mouse-map (if (featurep 'xemacs) [button3] [mouse-3]) nil) | 906 (define-key org-mouse-map (if (featurep 'xemacs) [button3] [mouse-3]) nil) |
895 (define-key org-mode-map [mouse-3] 'org-mouse-show-context-menu) | 907 (define-key org-mode-map [mouse-3] 'org-mouse-show-context-menu)) |
896 (define-key org-mode-map [down-mouse-1] 'org-mouse-down-mouse) | 908 (define-key org-mode-map [down-mouse-1] 'org-mouse-down-mouse) |
897 (define-key org-mouse-map [C-drag-mouse-1] 'org-mouse-move-tree) | 909 (when (memq 'context-menu org-mouse-features) |
898 (define-key org-mouse-map [C-down-mouse-1] 'org-mouse-move-tree-start) | 910 (define-key org-mouse-map [C-drag-mouse-1] 'org-mouse-move-tree) |
899 (define-key org-mode-map [S-mouse-2] 'org-mouse-yank-link) | 911 (define-key org-mouse-map [C-down-mouse-1] 'org-mouse-move-tree-start)) |
900 (define-key org-mode-map [drag-mouse-3] 'org-mouse-yank-link) | 912 (when (memq 'yank-link org-mouse-features) |
901 (define-key org-mouse-map [drag-mouse-3] 'org-mouse-move-tree) | 913 (define-key org-mode-map [S-mouse-2] 'org-mouse-yank-link) |
902 (define-key org-mouse-map [down-mouse-3] 'org-mouse-move-tree-start) | 914 (define-key org-mode-map [drag-mouse-3] 'org-mouse-yank-link)) |
903 | 915 (when (memq 'move-tree org-mouse-features) |
904 (font-lock-add-keywords nil | 916 (define-key org-mouse-map [drag-mouse-3] 'org-mouse-move-tree) |
917 (define-key org-mouse-map [down-mouse-3] 'org-mouse-move-tree-start)) | |
918 | |
919 (when (memq 'activate-stars org-mouse-features) | |
920 (font-lock-add-keywords | |
921 nil | |
905 `((,outline-regexp | 922 `((,outline-regexp |
906 0 `(face org-link mouse-face highlight keymap ,org-mouse-map) | 923 0 `(face org-link mouse-face highlight keymap ,org-mouse-map) |
907 'prepend) | 924 'prepend)) |
908 ("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +" | 925 t)) |
909 (1 `(face org-link keymap ,org-mouse-map mouse-face highlight) 'prepend)) | 926 |
910 ("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)" | 927 (when (memq 'activate-bullets org-mouse-features) |
928 (font-lock-add-keywords | |
929 nil | |
930 `(("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +" | |
931 (1 `(face org-link keymap ,org-mouse-map mouse-face highlight) | |
932 'prepend))) | |
933 t)) | |
934 | |
935 (when (memq 'activate-checkboxes org-mouse-features) | |
936 (font-lock-add-keywords | |
937 nil | |
938 `(("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)" | |
911 (2 `(face bold keymap ,org-mouse-map mouse-face highlight) t))) | 939 (2 `(face bold keymap ,org-mouse-map mouse-face highlight) t))) |
912 t) | 940 t)) |
913 | 941 |
914 (defadvice org-open-at-point (around org-mouse-open-at-point activate) | 942 (defadvice org-open-at-point (around org-mouse-open-at-point activate) |
915 (let ((context (org-context))) | 943 (let ((context (org-context))) |
916 (cond | 944 (cond |
917 ((assq :headline-stars context) (org-cycle)) | 945 ((assq :headline-stars context) (org-cycle)) |