1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-23 07:18:53 +00:00
Commit Graph

301 Commits

Author SHA1 Message Date
Bastien Guerry
4b8d74150f Fix bug: fetch the updated title of a page when creating the sitemap.
* org-publish.el (org-publish-cache-ctime-of-src): improve
docstring.
(org-publish-find-title): New option to explicitly reset the
title in the cache.
(org-publish-format-file-entry): Use this new option.

Thanks to Jonathan Bisson for reporting this.
2011-02-16 11:39:13 +01:00
Manuel Giraud
dbb46ae6b1 Better sitemap formating
Hi,

Here's a patch that make the sitemap entry formating coherent with the
new html-pre/postamble one.

While here I was trying to add some documentation about this feature in
org.texi but I end up copy/pasting or paraphrasing the docstring of
correspondant customs. Is it acceptable for the documentation or plain
useless?

>From 766b0db7d0189d2edb0d8799c3424d62f9ac4e47 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
Date: Fri, 11 Feb 2011 15:32:58 +0100
Subject: [PATCH] org-publish.el: sitemap formating coherent with new preamble

Adopt downcase for format directive to be coherent with the new
pre/postamble formating.

Use `format-spec' function instead of `org-replace-escapes'.
2011-02-11 17:35:52 +01:00
Bastien Guerry
da8dc7bba7 Rewrite the handling of HTML preamble/postamble.
* org-html.el (org-export-html-auto-preamble)
(org-export-html-auto-postamble): Remove.
(org-export-html-preamble, org-export-html-postamble): Turn
into custom variables.  Update the docstrings.
(org-export-html-preamble-format)
(org-export-html-postamble-format): New custom variables.
(org-export-as-html): Use org-export-html-postamble-format and
org-export-html-preamble-format.
(org-export-html-title-format): delete.

* org-exp.el (org-export-plist-vars): Remove
:auto-preamble and :auto-postamble.  Rename :preamble and
:postamble to :html-preamble and :html-postamble.

* org-publish.el (org-publish-project-alist): Remove
:auto-preamble and :auto-postamble.  Rename :preamble and
:postamble to :html-preamble and :html-postamble.

* org.texi (Publishing options): replace :preamble and
:auto-preamble by :html-preamble (same for postamble.)
2011-02-11 01:27:15 +01:00
Manuel Giraud
641144ef26 org-publish.el: allow formatting of sitemap entries.
* org-publish.el (org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): new custom variables.
(org-publish-projects): use these variables to format the
sitemap entries.
2011-02-09 17:12:18 +01:00
Manuel Giraud
334cf2038d Adds sort options when publishing the sitemap
This patch adds sort options to the sitemap.  In addition to
alphabetical order, one can choose chronological or anti-chronological
ordering of sitemap entries.  To retrieve file date, it tries to parse
the "#+date" keyword and if not present defaults to file modification
time.
2011-02-08 17:51:17 +01:00
Jan Seeger
deb5f8df31 Always add sitemap file to project files if sitemap is requested
* lisp/org-publish.el (org-publish-get-base-files): Add sitemap file.

I noticed some wonkiness in getting my sitemap created on my webserver
when pushing my website, and the problem seems to lie in
org-publish-get-base-files only returning existing files, and not
picking up on the soon to be generated sitemap. My patch always adds
the sitemap file to the list of returned files if a sitemap is
requested, regardless of if it exists or not.
2011-01-26 11:03:20 +01:00
David Maus
b4979a86ca Use mtime of symlink target
* lisp/org-publish.el (org-publish-cache-ctime-of-src): Use mtime of
symlink target.
2011-01-06 20:25:00 +01:00
Carsten Dominik
7666ba421f Version number back to 7.4 2010-12-10 18:49:40 +01:00
Carsten Dominik
76a25715c9 Bump version number to 7.5 2010-12-10 18:43:10 +01:00
Bastien Guerry
6630edbd0f Set version number to 7.3 2010-11-07 14:52:14 +01:00
Carsten Dominik
82af72eef7 Push version number to 7.02trans 2010-10-29 09:11:46 +02:00
Carsten Dominik
d5d96f612e Improve docstring for org-publish-project-alist 2010-10-14 14:12:37 +02:00
Carsten Dominik
9f5c6557f2 Add publishing functions for ASCII, Latin-1 and UTF-8
* lisp/org-publish.el (org-publish-org-to-ascii):
(org-publish-org-to-latin1):
(org-publish-org-to-utf8): New functions.

* doc/org.texi (Publishing action): Document the new publishing functions.

Thanks to Matthias Danzl for showing how to do this.
2010-10-14 13:51:23 +02:00
Bastien Guerry
cf5fbad49b org-publish-all: remove outdated comment. 2010-09-18 18:44:44 +02:00
Sebastian Rose
2fcd20e6eb Bug: Inconsistency with org-publish-attachment
Aidan Gauland <aidalgol@no8wireless.co.nz> writes:
> Sebastian Rose <sebastian_rose <at> gmx.de> writes:
>> did you revert the previous patch?  The second patch was against master
>> again.
>
> I ran git reset --hard then applied the second patch.
>
>> I changed to a subdirectory of my :base-directory (here $BASE):
>>
>> $ cd ${BASE}/subdirectory
>> $ cp ~/images/first.jpg .        # a simple image
>> $ ln -s ~/images/second.jpg      # a link to an image
>> $ ln -s ~/images/screenshots/    # a link to a directory
>>
>> When exporting, I get this tree in :publishing-directory ($PUB):
>>
>> $PUB/
>>  |-- subdirectory/
>>  |   |-- first.jpg
>>  |   |-- second.jpg
>>  |   `-- screenshots/
>>  |       |-- some.png
>>  |       `-- other.png
>>
>> which is what you expected, is that right?
>
> Yes, that's what I expected.  What I'm getting is a little different.
>
> $PUB/
> `-- subdirectory/
>     |-- screenshots/
>     |	  `-- subdirectory/
>     |	      `-- screenshots/
>     |	          |-- other.png
>     |	          `-- some.png
>     `-- subdirectory/
>         |-- first.jpg
>         |-- second.jpg
>
> This is how the project is defined...
> (setq
>  org-publish-project-alist
>  '(("static"
>     :base-directory "~/org-bug/"
>     :publishing-directory "~/org-bug-pub/"
>     :publishing-function org-publish-attachment
>     :recursive t
>     :base-extension "css\\|gz\\|bz\\|lzma\\|jpg\\|gif\\|png")))
>
> And published with this sexp.
> (org-publish "static")
>
> Perhaps the discrepancy between our setups is git commit (not sure if
> I'm using the right terms there)?  git log shows
> 878d94b472 at the top of its output.
>
> Thanks for your help!
> --Aidan

Ahrrgh :)

I just pulled, because I couldn't find that commit.

That commit already includes the (obviously wrong) first patch...

Here's the patch that reverts the first attempt and applies the new
one.   Hope this works :)

  Sebastian
2010-09-18 02:58:28 +02:00
Sebastian Rose
f2eec6921f Make org-publish-attachment honor directory structure
* lisp/org-publish.el (org-publish-attachment): Put the attachment
into the right directory.

Aidan Gauland <aidalgol@no8wireless.co.nz> writes:
> On Thu, Sep 16, 2010 at 12:40:34AM +0200, Sebastian Rose wrote:
>> Aidan Gauland <aidalgol@no8wireless.co.nz> writes:
>> > Sebastian Rose <sebastian_rose <at> gmx.de> writes:
>> >> It would be a bug.
>> >>
>> >> But I cannot reproduce it (current Org mode from git, emacs24).
>> >
>> > I just figured out why: I store all my images in ~/images/ and just
>> > have symbolic links to them in my Org website directory.
>> >
>> > Can you reproduce it now that you have this piece of information?
>>
>>
>> Ah, OK.  That might be because of some call to
>>
>>   (file-truename file...)
>>
>> or similar.  `file-truename' removes symbolic links in filenames.
>>
>> Functions like this are called to make sure, the file is published only
>> if needed (i.e. the file has changed since last export).
>>
>> I'm not sure currently if it's clever to remove such calls (see
>> lisp/org-publish.el and search `file-truename').
>
> What if `file-truename' was used only to get the path of the actual
> file to copy, but the (relative) path of the link is used as the
> destination?
>
> --Aidan

Hi Aidan,

`org-publish-attachment' is wrong or called with wrong arguments.

This patch fixes it.

As always, there might be a better way to fix it,
but this way the function `org-publish-attachment' will work regardless
of parameters.  Someone will always call this function with the wrong
`PUB-DIR' parameter...

Aidan, would like to apply the patch and verify it works for you?

Best wishes,

  Sebastian
2010-09-16 18:00:59 +02:00
Bastien Guerry
11e7a573a5 org-publish.el: allow :base-directory to omit the ending slash.
This was spotted by Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl>.
2010-09-02 16:01:51 +02:00
Harri Kiiskinen
550278c135 :body-only property for publishing projects
* lisp/org-publish.el (org-publish-project-alist): Document the new
body-only property.
(org-publish-org-to): Use the body-only property.
2010-08-23 13:34:31 +02:00
Carsten Dominik
3529be82ef Fix interpretation of the :include property as a list of file names 2010-08-16 17:27:25 +02:00
Carsten Dominik
dd484300d3 Publish: Better error messages if important information is missing
* lisp/org-publish.el (org-publish-file): Better error message if
base-directory or publishing-directory are not defined.
2010-07-22 11:45:04 +02:00
Carsten Dominik
6268cceec3 Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
Philip Rooke
ebf808f9aa Correct some docstrings [part 4]
Same rationale as previous patches in this series.

Phil
2010-07-16 21:00:36 +02:00
Daniel Clemente
b324bdca5c default base-extension .org for org-publish
Org-publish: correctly find files in projects which didn't define a base-extension.
Previously, (org-publish-get-project-from-filename "~/org/file.org") would return nil because the constructed regular expression "^/home/dc/org/.+\\.\\(\\)$" required a dot at the end.

#+BEGIN_QUOTE

#+END_QUOTE
2010-07-06 12:56:47 +02:00
Carsten Dominik
6c381070f9 Make timestamp directory even if the parent does not exist
* lisp/org-publish.el (org-publish-initialize-cache): Make
timestamp directory, the entire path to it.
2010-07-01 11:31:14 +02:00
Sebastian Rose
2700ec42c7 possible Bug: non-interactive publishing (emacs 22.1)
This patch fixes batch-mode publishing. Tested in emacs24 like this:

   sh$   emacs -q -batch --eval='(org-publish "PROJECT_NAME" t)'
2010-06-16 02:17:05 -04:00
David Maus
d7e15f0c88 Serialize the publishing cache
* lisp/org-publish.el (org-publish-write-cache-file):
Write a serialized version of the cache hash.
(org-publish-initialize-cache): Reset the cache hash before creating a
new one.Serialize publishing project cache with `puthash' expressions.
2010-05-25 11:38:42 +02:00
Carsten Dominik
9cb5299bd1 Define a variable 2010-05-15 14:15:08 +02:00
David Maus
5e264e35c5 Remove superfluous third argument to `org-publish-cache-set'. 2010-05-15 00:59:53 +02:00
David Maus
54da0dce2a Use `make-hash-table' to create hash table of org-publish-cache. 2010-05-15 00:59:39 +02:00
Sebastian Rose
339d6fe4bb Publishing, cashing and timestamps
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Hi Sebastian,
>
> sorry for being slow.  Could you do me a favor and send me the cache patch one
> more time - if possible updated to the current master.
>
> I am just not sure I have the right patch in my hands.

Hi Carsten,

no problem. The patch is attached.

Here is a list of my ChangeLog entries, redated to today:

2010-05-13  Sebastian Rose  <sebastian_rose@gmx.de>

	* org-publish.el (org-publish-cache): Use one big hashmap for
	each project defined in `org-publish-project-alist'. The
	hashmap will hold pairs of our timestamp-filenames and
	timestamps, as well as pairs of source-paths and associated
	plists for arbitrary values. Currently only the files title is
	stored there.

	The caching feature writes the information gathered during
	publishing to disk and re-loads it from there the next time we
	publish the same project.  All those informations will hence
	survive a restart of emacs.

	One cache file per publishing project is used. The contents of
	that file is the elisp that fills the new variable
	`org-publish-cache'.  The cache file is named according to the
	project with `.cache' added and lives in
	`org-timestamp-directory'.

	* org-publish.el (initialize-files-alist): This function and
	the variable `org-publish-files-alist' are not used anymore in
	favour of the reloadable cache and the functions for handling
	it. Removed therefor.

	* org-publish.el (org-publish-validate-link) was not used
	anywhere. Removed.

	* org-publish.el (org-publish-get-base-files): Added the
	variable `sitemap-requested' to avoid sorting where possible.
	See also end of `org-publish-get-base-files-1'.

	* org-publish.el (org-publish-get-files): This function is
	not called anymore. Removed.

	* org-publish.el (org-publish-get-project-from-filename) does
	not depend on a list of files anymore. Instead of laoding all
	files of all, we walk `org-publish-project-alist' until we
	find a project, where the properties :base-directory, :recursive,
	:base-extension, :include and :exclude match.

	* org-publish.el (org-publish-file) takes an additional
	parameter to avoid superfloues loading and writing of the
	cache file when used to publish a part of a project.
2010-05-13 20:03:35 +02:00
Carsten Dominik
c86a3fc4aa Push version number to 6.36trans 2010-05-09 06:24:20 +02:00
Carsten Dominik
88100d1580 Release 6.36a 2010-05-09 06:13:54 +02:00
Carsten Dominik
a14af124ba User-visible changes for 6.36 2010-05-09 06:12:41 +02:00
Carsten Dominik
3a7f7dbcca Fix typos 2010-04-24 02:17:07 +02:00
Carsten Dominik
9b6eeb4d2d Fix sitemap creation 2010-04-23 06:49:22 +02:00
Carsten Dominik
238a3d2818 Another fix for sitemap sorting 2010-04-23 00:06:10 +02:00
Carsten Dominik
830e0cfe40 Fix file sorting for publishing. 2010-04-22 18:04:13 +02:00
Carsten Dominik
16c0dd7f69 Fix a small issue with the sitemap code 2010-04-22 15:14:16 +02:00
Carsten Dominik
cbf97141d0 Index: Allow index entries before the first headline
Requested by Stefan Vollmar.
2010-04-22 09:27:43 +02:00
Carsten Dominik
2bc8590755 HTML export: Allow sorting of the site map
Patch by Sebastian Rose
2010-04-22 09:27:35 +02:00
Carsten Dominik
43bf1bbbd7 Push version number to 6.35trans 2010-04-15 12:24:55 +02:00
Carsten Dominik
6f3026edf1 Release 6.35g 2010-04-08 20:15:15 +02:00
Carsten Dominik
a589c7a22e Release 6.35f 2010-04-08 10:36:32 +02:00
Carsten Dominik
50e5924d8a Release 6.35e 2010-04-07 16:33:52 +02:00
Carsten Dominik
f722763f8a Release 6.35d 2010-04-07 16:26:42 +02:00
Carsten Dominik
d65ed03be6 Update copyright notices and fix wrong version tags 2010-04-07 16:26:10 +02:00
Carsten Dominik
cafbe1d038 Release 6.35c 2010-04-07 08:58:25 +02:00
Carsten Dominik
b213c0f31e Release 6.35b 2010-04-07 07:54:14 +02:00
Carsten Dominik
08d0d2fa20 Release 6.35 2010-04-06 09:16:36 +02:00
Carsten Dominik
7cfba5b16b Control case sensitivity in index generation 2010-04-04 22:45:26 +02:00