Mercurial > emacs
comparison lisp/org/org-gnus.el @ 100448:cea079b68b76
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-refile): Avoid refiling to within the region to be
refiled.
* org-export-latex.el (org-export-latex-special-chars): Replace
special characters also in tables.
* org-agenda.el (org-agenda-change-all-lines): New argument
FORCE-TAGS.
(org-agenda-set-tags): Cet the new tags and pas them to
`org-format-agenda-item'.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-export-latex.el (org-export-latex-classes): Add longable as
a default package to all classes.
(org-export-latex-tables): Handle the longtable attribute and the
align attribute.
* org-table.el (orgtbl-to-generic): Handle tables that start with
a hline.
* org-export-latex.el (org-export-latex-emphasis-alist): Switch to
\verb for colde-like snippets.
(org-export-as-latex): Fix issues with region export.
* org.el (org-up-heading-safe): Speed up function by using a
direct regexp search.
(org-olpa): New variable.
(org-get-outline-path): Speed-up path constructions in cases where
this is possible because the entire hierarchy is scanned anyway.
(org-refile-get-location): Don't compare the truenames of files,
this is too slow.
(org-goto-max-level): New option.
(org-goto): Use `org-goto-max-level'.
2008-12-16 Tassilo Horn <tassilo@member.fsf.org>
* org-gnus.el (org-gnus-article-link, org-gnus-article-link):
Strip angle brackets from message-ids in the former and don't do
it in the latter.
(org-gnus-follow-link): Open summary reliable, even if the last
messages were deleted, and handle empty groups, too.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-export-latex.el (org-export-latex-emphasis-alist): Use \verb
instead of \texttt for the =...= and ~===~ emphasis environments.
(org-export-as-latex): Remove any old :org-license-to-kill text
properties.
(org-export-as-latex): Pass RBEG to `org-export-latex-first-lines'.
(org-export-latex-make-header): Add some hard space after the
table of contents.
(org-export-latex-first-lines): Accept RBEG argument. Mark
exported text so that it will be excuded in further steps.
* org-table.el (org-table-get-specials): Make @0 reference the
last line in a table.
(org-table-recalculate): Improve docstring.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-log-done): Fix docstring.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-html-format-image): Fix bugs.
* org-export-latex.el (org-export-latex-tables)
(org-export-latex-links): Implement attribute, label, and caption
handling.
* org-exp.el (org-export-html-style-default): Add style
definitions for the figure div.
(org-export-preprocess-string, org-export-as-html): Implement
attribute, label, and caption handling.
(org-export-attach-captions-and-attributes): New function.
(org-export-html-format-image): New function.
(org-format-org-table-html): Implement attribute, label, and
caption handling.
* org.el (org-find-text-property-in-string): New function.
(org-extract-attributes): Use the property org-attr instead of
org-attrobutes, because this property is now set with the #+ATTR
lines.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-compat.el (org-substring-no-properties): Fix for XEmacs, for
the case that FROM is nil.
* org.el (org-before-first-heading-p): New function.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-as-html): Do not add a space before
enforces line breaks.
(org-export-as-html): Close paragraph before blockquote and verse
tags.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-id.el (org-id-locations-file): Wrap file name with
`convert-standard-filename'.
(org-id-files): New variable.
(org-id-use-hash): New option.
(org-id-update-id-locations): Also search in all files current
listed in `org-id-files'. Convert the resulting alist to a hash
if the user customation says so.
(org-id-locations-save): Handle he case if `org-id-locations' is a
hash.
(org-id-locations-load): Convert the alist to a hash.
(org-id-add-location): Handle the hast case.
(kill-emacs-hook): Make sure id locations are saved when Emacs is
exited.
(org-id-hash-to-alist, org-id-alist-to-hash)
(org-id-paste-tracker): New functions.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Tue, 16 Dec 2008 13:28:37 +0000 |
parents | c851df8e004e |
children | ba23e35d3eaf |
comparison
equal
deleted
inserted
replaced
100447:f84c0729a0e9 | 100448:cea079b68b76 |
---|---|
4 | 4 |
5 ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 ;; Author: Carsten Dominik <carsten at orgmode dot org> |
6 ;; Tassilo Horn <tassilo at member dot fsf dot org> | 6 ;; Tassilo Horn <tassilo at member dot fsf dot org> |
7 ;; Keywords: outlines, hypermedia, calendar, wp | 7 ;; Keywords: outlines, hypermedia, calendar, wp |
8 ;; Homepage: http://orgmode.org | 8 ;; Homepage: http://orgmode.org |
9 ;; Version: 6.14 | 9 ;; Version: 6.15a |
10 ;; | 10 ;; |
11 ;; This file is part of GNU Emacs. | 11 ;; This file is part of GNU Emacs. |
12 ;; | 12 ;; |
13 ;; GNU Emacs is free software: you can redistribute it and/or modify | 13 ;; GNU Emacs is free software: you can redistribute it and/or modify |
14 ;; it under the terms of the GNU General Public License as published by | 14 ;; it under the terms of the GNU General Public License as published by |
72 `org-gnus-prefer-web-links' is reversed." | 72 `org-gnus-prefer-web-links' is reversed." |
73 (let ((unprefixed-group (replace-regexp-in-string "^[^:]+:" "" group))) | 73 (let ((unprefixed-group (replace-regexp-in-string "^[^:]+:" "" group))) |
74 (if (and (string-match "^nntp" group) ;; Only for nntp groups | 74 (if (and (string-match "^nntp" group) ;; Only for nntp groups |
75 (org-xor current-prefix-arg | 75 (org-xor current-prefix-arg |
76 org-gnus-prefer-web-links)) | 76 org-gnus-prefer-web-links)) |
77 (concat (if (string-match "gmane" unprefixed-group) | 77 (org-make-link (if (string-match "gmane" unprefixed-group) |
78 "http://news.gmane.org/" | 78 "http://news.gmane.org/" |
79 "http://groups.google.com/group/") | 79 "http://groups.google.com/group/") |
80 unprefixed-group) | 80 unprefixed-group) |
81 (concat "gnus:" group)))) | 81 (org-make-link "gnus:" group)))) |
82 | 82 |
83 (defun org-gnus-article-link (group newsgroups message-id x-no-archive) | 83 (defun org-gnus-article-link (group newsgroups message-id x-no-archive) |
84 "Create a link to a Gnus article. | 84 "Create a link to a Gnus article. |
85 The article is specified by its MESSAGE-ID. Additional | 85 The article is specified by its MESSAGE-ID. Additional |
86 parameters are the Gnus GROUP, the NEWSGROUPS the article was | 86 parameters are the Gnus GROUP, the NEWSGROUPS the article was |
96 newsgroups ;; Make web links only for nntp groups | 96 newsgroups ;; Make web links only for nntp groups |
97 (not x-no-archive)) ;; and if X-No-Archive isn't set. | 97 (not x-no-archive)) ;; and if X-No-Archive isn't set. |
98 (format (if (string-match "gmane\\." newsgroups) | 98 (format (if (string-match "gmane\\." newsgroups) |
99 "http://mid.gmane.org/%s" | 99 "http://mid.gmane.org/%s" |
100 "http://groups.google.com/groups/search?as_umsgid=%s") | 100 "http://groups.google.com/groups/search?as_umsgid=%s") |
101 (org-fixup-message-id-for-http | 101 (org-fixup-message-id-for-http message-id)) |
102 (replace-regexp-in-string "[<>]" "" message-id))) | |
103 (org-make-link "gnus:" group "#" message-id))) | 102 (org-make-link "gnus:" group "#" message-id))) |
104 | 103 |
105 (defun org-gnus-store-link () | 104 (defun org-gnus-store-link () |
106 "Store a link to a Gnus folder or message." | 105 "Store a link to a Gnus folder or message." |
107 (cond | 106 (cond |
113 (t "???"))) | 112 (t "???"))) |
114 desc link) | 113 desc link) |
115 (unless group (error "Not on a group")) | 114 (unless group (error "Not on a group")) |
116 (org-store-link-props :type "gnus" :group group) | 115 (org-store-link-props :type "gnus" :group group) |
117 (setq desc (org-gnus-group-link group) | 116 (setq desc (org-gnus-group-link group) |
118 link (org-make-link desc)) | 117 link desc) |
119 (org-add-link-props :link link :description desc) | 118 (org-add-link-props :link link :description desc) |
120 link)) | 119 link)) |
121 | 120 |
122 ((memq major-mode '(gnus-summary-mode gnus-article-mode)) | 121 ((memq major-mode '(gnus-summary-mode gnus-article-mode)) |
123 (and (eq major-mode 'gnus-summary-mode) (gnus-summary-show-article)) | 122 (and (eq major-mode 'gnus-summary-mode) (gnus-summary-show-article)) |
125 (header (with-current-buffer gnus-article-buffer | 124 (header (with-current-buffer gnus-article-buffer |
126 (gnus-summary-toggle-header 1) | 125 (gnus-summary-toggle-header 1) |
127 (goto-char (point-min)) | 126 (goto-char (point-min)) |
128 (mail-header-extract-no-properties))) | 127 (mail-header-extract-no-properties))) |
129 (from (mail-header 'from header)) | 128 (from (mail-header 'from header)) |
130 (message-id (mail-header 'message-id header)) | 129 (message-id (org-remove-angle-brackets |
130 (mail-header 'message-id header))) | |
131 (date (mail-header 'date header)) | 131 (date (mail-header 'date header)) |
132 (to (mail-header 'to header)) | 132 (to (mail-header 'to header)) |
133 (newsgroups (mail-header 'newsgroups header)) | 133 (newsgroups (mail-header 'newsgroups header)) |
134 (x-no-archive (mail-header 'x-no-archive header)) | 134 (x-no-archive (mail-header 'x-no-archive header)) |
135 (subject (gnus-summary-subject-string)) | 135 (subject (gnus-summary-subject-string)) |
147 (let (group article) | 147 (let (group article) |
148 (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path)) | 148 (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path)) |
149 (error "Error in Gnus link")) | 149 (error "Error in Gnus link")) |
150 (setq group (match-string 1 path) | 150 (setq group (match-string 1 path) |
151 article (match-string 3 path)) | 151 article (match-string 3 path)) |
152 (when group | |
153 (setq group (org-substring-no-properties group))) | |
154 (when article | |
155 (setq article (org-substring-no-properties article))) | |
152 (org-gnus-follow-link group article))) | 156 (org-gnus-follow-link group article))) |
153 | 157 |
154 (defun org-gnus-follow-link (&optional group article) | 158 (defun org-gnus-follow-link (&optional group article) |
155 "Follow a Gnus link to GROUP and ARTICLE." | 159 "Follow a Gnus link to GROUP and ARTICLE." |
156 (require 'gnus) | 160 (require 'gnus) |
157 (funcall (cdr (assq 'gnus org-link-frame-setup))) | 161 (funcall (cdr (assq 'gnus org-link-frame-setup))) |
158 (if gnus-other-frame-object (select-frame gnus-other-frame-object)) | 162 (if gnus-other-frame-object (select-frame gnus-other-frame-object)) |
163 (when group | |
164 (setq group (org-substring-no-properties group))) | |
165 (when article | |
166 (setq article (org-substring-no-properties article))) | |
159 (cond ((and group article) | 167 (cond ((and group article) |
160 (gnus-group-read-group 1 nil group) | 168 (gnus-activate-group group t) |
161 (gnus-summary-goto-article | 169 (condition-case nil |
162 (if (string-match "[^0-9]" article) | 170 (let ((articles 1) |
163 article | 171 group-opened) |
164 (string-to-number article)) | 172 (while (and (not group-opened) |
165 nil t)) | 173 ;; stop on integer overflows |
174 (> articles 0)) | |
175 (setq group-opened (gnus-group-read-group articles nil group) | |
176 articles (if (< articles 16) | |
177 (1+ articles) | |
178 (* articles 2)))) | |
179 (if group-opened | |
180 (gnus-summary-goto-article article nil t) | |
181 (message "Couldn't follow gnus link. %s" | |
182 "The summary couldn't be opened."))) | |
183 (quit (message "Couldn't follow gnus link. %s" | |
184 "The linked group is empty.")))) | |
166 (group (gnus-group-jump-to-group group)))) | 185 (group (gnus-group-jump-to-group group)))) |
167 | 186 |
168 (defun org-gnus-no-new-news () | 187 (defun org-gnus-no-new-news () |
169 "Like `M-x gnus' but doesn't check for new news." | 188 "Like `M-x gnus' but doesn't check for new news." |
170 (if (not (gnus-alive-p)) (gnus))) | 189 (if (not (gnus-alive-p)) (gnus))) |