From: Carsten Dominik <carsten.dominik@gmail.com>
To: sebastian_rose@gmx.de
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: Bug on file publish
Date: Mon, 27 Oct 2008 08:22:34 +0100 [thread overview]
Message-ID: <FC0A0DC6-CD18-4462-A720-568EBC1FC9F3@gmail.com> (raw)
In-Reply-To: <4905036A.4000706@gmx.de>
[-- Attachment #1.1: Type: text/plain, Size: 2048 bytes --]
Hi Sebastian and Richard,
I just pushed what I think fixes this bug, please verify.
Thanks.
- Carsten
On Oct 27, 2008, at 12:55 AM, Sebastian Rose wrote:
> Hi,
>
>
> I tried to use (file-locked-p f) in org-publish-base-files-1,
> but I couldn't get it to work.
>
> (file-locked-p "~/notes/index.org") ;; => t if "~/notes/.#index.org"
> exists.
>
> .#index.org is only there, if I change the file without saving it.
> It's
> removed, if I save the buffer.
>
>
>
>
> A working quick fix:
>
> Instead of
> (not (string-match "^\\.+$" fnd))
> use
> (not (string-match "^\\.+" fnd))
>
> in org-publish-base-files-1
>
> Drawbacks:
> - we can't export hidden files anymore.
> Or is that a feature?
>
>
>
> It might be better to look for locked project files, or those still
> opened in emacs, and ask the user to save those files before
> publishing
> them. Unsaved changes in a buffer are not published before saving them
> anyway. So a warning would be usefull anyway. A user might be
> surprised
> if unsaved changes are not published, as unsaved changes are exported.
>
>
>
>
> Anyway - here's the little patch:
>
>
> diff --git a/lisp/org-publish.el b/lisp/org-publish.el
> index 2af71d3..46fd055 100644
> --- a/lisp/org-publish.el
> +++ b/lisp/org-publish.el
> @@ -430,7 +430,7 @@ matching the regexp SKIP-DIR when recursiing
> through BASE-DIR."
> (let ((fd-p (car (file-attributes f)))
> (fnd (file-name-nondirectory f)))
> (if (and fd-p recurse
> - (not (string-match "^\\.+$" fnd))
> + (not (string-match "^\\.+" fnd))
> (if skip-dir (not (string-match skip-dir fnd)) t))
> (org-publish-get-base-files-1 f recurse match skip-
> file skip-dir)
> (unless (or fd-p ;; this is a directory
>
>
>
>
> _______________________________________________
> 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
[-- Attachment #1.2: Type: text/html, Size: 5321 bytes --]
[-- Attachment #2: 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
prev parent reply other threads:[~2008-10-27 7:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 0:09 Bug on file publish Richard Riley
2008-10-26 6:42 ` Carsten Dominik
2008-10-26 21:56 ` Sebastian Rose
2008-10-26 22:10 ` Sebastian Rose
2008-10-26 23:55 ` Sebastian Rose
2008-10-27 5:24 ` Carsten Dominik
2008-10-27 7:22 ` Carsten Dominik [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FC0A0DC6-CD18-4462-A720-568EBC1FC9F3@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=sebastian_rose@gmx.de \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.