emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Publishing htaccess files with a project
@ 2010-10-16  1:01 Jeff Horn
  2010-10-16 16:39 ` Sebastian Rose
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Horn @ 2010-10-16  1:01 UTC (permalink / raw)
  To: Org-mode ml

Hi orgsters,

I'm wondering how I should publish .htaccess files? My current setup
is a source directory under ~/org/, which is kept at Dropbox, and a
publishing directory under ~/Sites/, which is not. Since data loss is
pyschologically crippling, I like to keep *all* my source files
(images, css, whatnot) in the source directory.

I have a static project setup that pushes css, images, and a few other
filetypes to the publishing directory. How can I do the same with
.htaccess? I tried adding "htaccess" to :base-extenstions, but that
unfortunately did nothing.

Thanks for the help!

Jeff

-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Publishing htaccess files with a project
  2010-10-16  1:01 Publishing htaccess files with a project Jeff Horn
@ 2010-10-16 16:39 ` Sebastian Rose
  2010-10-20  4:53   ` Jeff Horn
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Rose @ 2010-10-16 16:39 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Org-mode ml

Jeff Horn <jrhorn424@gmail.com> writes:
> Hi orgsters,
>
> I'm wondering how I should publish .htaccess files? My current setup
> is a source directory under ~/org/, which is kept at Dropbox, and a
> publishing directory under ~/Sites/, which is not. Since data loss is
> pyschologically crippling, I like to keep *all* my source files
> (images, css, whatnot) in the source directory.
>
> I have a static project setup that pushes css, images, and a few other
> filetypes to the publishing directory. How can I do the same with
> .htaccess? I tried adding "htaccess" to :base-extenstions, but that
> unfortunately did nothing.

Hi Jeff,



use the property :include :

 (setq org-publish-project-alist
     '(("org-htaccess"
         :base-directory "~/org/"
         :recursive t
         :base-extension "xxx"    ;; non-exestent
         :include (".htaccess")
         :publishing-directory "~/public_html/"
         :publishing-function org-publish-attachment)
  ...


and make "org-htaccess" part of your compound project.



  Sebastian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Publishing htaccess files with a project
  2010-10-16 16:39 ` Sebastian Rose
@ 2010-10-20  4:53   ` Jeff Horn
  2010-10-20 16:14     ` Sebastian Rose
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Horn @ 2010-10-20  4:53 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Org-mode ml

We had a bit of a discussion off list, but I still haven't been able
to get the behavior I am after. See below.

<snip>
When I make the change as you have suggested above, I get the original
file not found error.

From the *Messages* buffer:
------------------------------------------------------------------------------
Select command:
Publishing file /Users/jeffreyhorn/org/ftr/.htaccess using
`org-publish-attachment'
org-publish-attachment: Opening input file: No such file or directory,
/Users/jeffreyhorn/org/ftr/.htaccess
------------------------------------------------------------------------------

This is my project definition as it stands now:
------------------------------------------------------------------------------
("ftr-htaccess"
        :base-directory "~/org/ftr/"
        :publishing-directory "~/Sites/FTR/"
        :recursive t
        :base-extension "org"
        :exclude ".org"
        :include (".htaccess")
        :publishing-function org-publish-attachment)
------------------------------------------------------------------------------
</snip>

With this configuration, Sebastian and I were expecting the
org-publish-attachment function to pick up the .htaccess file and push
it to the publishing-directory. Instead, publishing exits with very
little information (and no Backtrace is triggered). The information I
have available is quoted above.

I may be making an obvious mistake, and any further help would be
gratefully accepted.

Jeff

On Sat, Oct 16, 2010 at 12:39 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
> Jeff Horn <jrhorn424@gmail.com> writes:
>> Hi orgsters,
>>
>> I'm wondering how I should publish .htaccess files? My current setup
>> is a source directory under ~/org/, which is kept at Dropbox, and a
>> publishing directory under ~/Sites/, which is not. Since data loss is
>> pyschologically crippling, I like to keep *all* my source files
>> (images, css, whatnot) in the source directory.
>>
>> I have a static project setup that pushes css, images, and a few other
>> filetypes to the publishing directory. How can I do the same with
>> .htaccess? I tried adding "htaccess" to :base-extenstions, but that
>> unfortunately did nothing.
>
> Hi Jeff,
>
>
>
> use the property :include :
>
>  (setq org-publish-project-alist
>     '(("org-htaccess"
>         :base-directory "~/org/"
>         :recursive t
>         :base-extension "xxx"    ;; non-exestent
>         :include (".htaccess")
>         :publishing-directory "~/public_html/"
>         :publishing-function org-publish-attachment)
>  ...
>
>
> and make "org-htaccess" part of your compound project.
>
>
>
>  Sebastian
>



-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

http://www.failuretorefrain.com/jeff/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Publishing htaccess files with a project
  2010-10-20  4:53   ` Jeff Horn
@ 2010-10-20 16:14     ` Sebastian Rose
  2010-10-20 16:27       ` Jeff Horn
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Rose @ 2010-10-20 16:14 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Org-mode ml

Jeff Horn <jrhorn424@gmail.com> writes:
> We had a bit of a discussion off list, but I still haven't been able
> to get the behavior I am after. See below.
>
> <snip>
> When I make the change as you have suggested above, I get the original
> file not found error.
>
> From the *Messages* buffer:
> ------------------------------------------------------------------------------
> Select command:
> Publishing file /Users/jeffreyhorn/org/ftr/.htaccess using
> `org-publish-attachment'
> org-publish-attachment: Opening input file: No such file or directory,
> /Users/jeffreyhorn/org/ftr/.htaccess
> ------------------------------------------------------------------------------
>
> This is my project definition as it stands now:
> ------------------------------------------------------------------------------
> ("ftr-htaccess"
>         :base-directory "~/org/ftr/"
>         :publishing-directory "~/Sites/FTR/"
>         :recursive t
>         :base-extension "org"
>         :exclude ".org"
>         :include (".htaccess")
>         :publishing-function org-publish-attachment)
> ------------------------------------------------------------------------------
> </snip>
>
> With this configuration, Sebastian and I were expecting the
> org-publish-attachment function to pick up the .htaccess file and push
> it to the publishing-directory. Instead, publishing exits with very
> little information (and no Backtrace is triggered). The information I
> have available is quoted above.


The problem is, that `org-publish-get-base-files' seems to put basenames
into `org-publish-temp-files' instead of absolute paths.

I'm currently working on it  (probably my fault anyway).


  Sebastian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Publishing htaccess files with a project
  2010-10-20 16:14     ` Sebastian Rose
@ 2010-10-20 16:27       ` Jeff Horn
  2010-10-20 17:28         ` Sebastian Rose
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Horn @ 2010-10-20 16:27 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Org-mode ml

> The problem is, that `org-publish-get-base-files' seems to put basenames
> into `org-publish-temp-files' instead of absolute paths.

Ah. Thanks for the info. That makes sense.

> I'm currently working on it  (probably my fault anyway).

I really appreciate your help, and I don't blame anyone for the
problems I run into using org-mode. It's constantly being developed,
so bugs are annoying but expected. I can tell you org-mode has done
more for me despite the minor annoyances than most highly-polished
commercial software for my Mac.

Best,
Jeff

-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

http://www.failuretorefrain.com/jeff/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Publishing htaccess files with a project
  2010-10-20 16:27       ` Jeff Horn
@ 2010-10-20 17:28         ` Sebastian Rose
  2010-10-20 20:21           ` Jeff Horn
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Rose @ 2010-10-20 17:28 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Org-mode ml

Jeff Horn <jrhorn424@gmail.com> writes:
>> The problem is, that `org-publish-get-base-files' seems to put basenames
>> into `org-publish-temp-files' instead of absolute paths.
>
> Ah. Thanks for the info. That makes sense.
>
>> I'm currently working on it  (probably my fault anyway).
>
> I really appreciate your help, and I don't blame anyone for the
> problems I run into using org-mode. It's constantly being developed,
> so bugs are annoying but expected. I can tell you org-mode has done
> more for me despite the minor annoyances than most highly-polished
> commercial software for my Mac.



OK.  Not to forget the things learned or reading the documentation might
have helped... 


  C-h v org-publish-project-alist

says:


    The :include property may be used to include extra files.  Its value
    may be a list of filenames to include. The filenames are considered
    relative to the base directory.



(setq org-publish-project-alist
      '(("test-htaccess"
         :base-directory "~/org/"
         :base-extension "org"
         :exclude ".org"
         :include ("subdir/one/.htaccess" "subdir/two/.htaccess")
         :publishing-directory "~/public_html/"
         :recursive t
         :publishing-function org-publish-attachment)))



  Sebastian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Publishing htaccess files with a project
  2010-10-20 17:28         ` Sebastian Rose
@ 2010-10-20 20:21           ` Jeff Horn
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Horn @ 2010-10-20 20:21 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Org-mode ml

>    The :include property may be used to include extra files.  Its value
>    may be a list of filenames to include. The filenames are considered
>    relative to the base directory.

D'oh! Begging your pardon.

> (setq org-publish-project-alist
>      '(("test-htaccess"
>         :base-directory "~/org/"
>         :base-extension "org"
>         :exclude ".org"
>         :include ("subdir/one/.htaccess" "subdir/two/.htaccess")
>         :publishing-directory "~/public_html/"
>         :recursive t
>         :publishing-function org-publish-attachment)))

Works like a charm. Thanks for your persistence, and patience!

-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

http://www.failuretorefrain.com/jeff/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-20 20:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-16  1:01 Publishing htaccess files with a project Jeff Horn
2010-10-16 16:39 ` Sebastian Rose
2010-10-20  4:53   ` Jeff Horn
2010-10-20 16:14     ` Sebastian Rose
2010-10-20 16:27       ` Jeff Horn
2010-10-20 17:28         ` Sebastian Rose
2010-10-20 20:21           ` Jeff Horn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).