Re: [Emacs-orgmode] configurable link export
Hi Austin, On May 19, 2006, at 21:33, Austin Frank wrote: I'd like to suggest a configuration option that influences the way links are exported in the org-export-as-* functions. [...] I think you are raising a very valid point here. This is something that needs to be handled in an appropriate way. Anybody knows how Emacs Wiki and Muse deal with such things? Anyway, I have been thinking about your argumentation and come to the conclusion that this is an issue I would like to push almost entirely onto Davids table. David, are you listening? :-) Validation of links is really related to publishing. From the point of "exporting", somefile.html is simply a different representation of something.org, by default this exported file lives in the same directory, so all file links, be they absolute or relative should work just fine. However, publishing is about moving files to a publishing directory, and here the issue of validating links becomes really important. The way I would like to go about implementing this is the following: The org-publish functions should pass a special property to the html exporter. The value of this property should be a function that can be used to validate a file link. I would like to be able to call this function with a file name as the argument and maybe the directory of the original org file as an additional argument (might be unnecessary). This function should then return if it will be safe to link to this file, and maybe even return a modified path to this file. Org-publish would then be responsible to create the right function, and the user could even write her own function. Besides minimizing the work for me :-), this would have obvious advantages. Org-publish is fully aware of the entire structure of a project, so it will know which files will also be exported, to what locations, and it can therefore make a very accurate determination on if and how a given file will be accessible from the publishing location. There are many ways org-publish could go about doing this. One would be the way you, Austin, proposed, through special configuration setting - not variables, but properties then. Another, more elegant way, would be that the structure and content of org-publish-project-alist is used to fully automatically determine the validity of a link. not trivial to implement, but possible and a nice challenge. David, what do you think? Austin, do you think this could be a viable way? - Carsten When I create local org files, I link to whatever files on my disk are relevant and useful. When I publish those org files, some of the org links (like to other published org files) still work and make sense as html links. Others (like links to local documents or directories) don't make any sense when published-- the resources they pointed to on the local system aren't on the remote filesystem that hosts the html pages. To be more specific, I maintain a directory ~/notes/ and a directory ~/blog/, each with a bunch of org files underneath it. I then use org-publish to generate the html files, which are then uploaded to my website. Crucially, this same directory structure is mirrored at my website, so local org links between those files work perfectly as html links when they are published and uploaded. I'd love to be able to specify that I want all org links of [file:///home/aufrank/notes/*] and [file:///home/aufrank/blog/*] to be exported as full html links, and exclude org links to any other files on my filesystem at export time. I think that David has established a good system for including and excluding files during publishing. Org-publish first generates a list of files to publish based on regex matching of the extensions of files in a directory. These are filtered through a regex-based exclude list, and then individual files can be added back in with an include list. Applying this strategy to link export, I might want to have something like the following in my org-config.el: (setq org-export-links-extension "org\\|txt" org-export-links-exclude "~/*" org-export-links-include ("~/notes/", "~/blog/")) This would result in exporting all of the .org and .txt files in ~/notes/ and ~/blog/ as working links in html files, but would ignore links in org files to anything else in my home directory during export. There's certainly a question about how org links that are not exported as html links should be handled. I would actually be fine with just exporting the double-bracketed notation, but I bet there are better ideas out there. Thanks again for the org suite, /au ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477 ___
Re: [Emacs-orgmode] third export request
This is no problem. I will probably not make separate variables for this, but allow an alist value for org-publishing-directory that can look like this: (setq org-publishing-directory '((:html . "./html/") (:ascii . "../text/") (:xoxo . "html/"))) Something along those lines. I have too many publishing options already - I should have done this with property lists from the beginning, but unfortunately did not think of this possibility. Sort of too late now. - Carsten On May 19, 2006, at 22:22, Austin Frank wrote: Last one on this topic, I think :) I don't know if this is more of an org-export or an org-publish request, but I'd like to be able to do something like (setq org-export-as-ascii-directory "~/notes/text/") and have any org-export-as-ascii files sent to that directory. Likewise for the other org-export-as-* functions. It'd be nice to be able to configure where the ical files end up when they're exported, as well. Allowing exports to be written to specific directories seems like it might provide a sensible default for the :publishing-directory plist entry in org-publish-projects-alist, but I admit I haven't thought that through very thoroughly. Thanks again for reading, /au ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477 ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Emacs-orgmode] configurable link export
Carsten Dominik <[EMAIL PROTECTED]> writes: > Anyway, I have been thinking about your argumentation and come to the > conclusion that this is an issue I would like to push almost entirely > onto Davids table. David, are you listening? :-) Yes :-) > way, would be that the structure and content of > org-publish-project-alist is used to fully automatically determine the > validity of a link. not trivial to implement, but possible and a nice > challenge. I have been thinking about inter-file links in preparation for implementing some of the more advanced features for org-publish (page rewriting, sitemap generation, etc) and I think this will be very simple to straighten out. All we need is for people to specify a property called :link-base that is the prefix for a URL. For example, if :publishing-directory is "/ssh:[EMAIL PROTECTED]:~/public_html/images", the user should probably set the :link-base to "/images" or "http://foosite.org/images"; Given this one extra piece of information, then it is a simple matter for the :link-transform function to actually generate proper URLs (instead of simply validating them.) This would free projects from the requirement that the web server must have the exact same directory layout as your local project files. This would allow, as you say, for link targets to be validated and transformed automatically, given just the structure and contents of org-publish-project-alist. I will work on this and let you know how it goes. Austin--- how does this sound? >> When I create local org files, I link to whatever files on my disk >> are relevant and useful. When I publish those org files, some of >> the org links (like to other published org files) still work and >> make sense as html links. Others (like links to local documents or >> directories) don't make any sense when published-- the resources >> they pointed to on the local system aren't on the remote filesystem >> that hosts the html pages. >> >> To be more specific, I maintain a directory ~/notes/ and a directory >> ~/blog/, each with a bunch of org files underneath it. I then use >> org-publish to generate the html files, which are then uploaded to >> my website. Crucially, this same directory structure is mirrored at >> my website, so local org links between those files work perfectly as >> html links when they are published and uploaded. >> >> I'd love to be able to specify that I want all org links of >> [file:///home/aufrank/notes/*] and [file:///home/aufrank/blog/*] to >> be exported as full html links, and exclude org links to any other >> files on my filesystem at export time. >> >> I think that David has established a good system for including and >> excluding files during publishing. Org-publish first generates a >> list of files to publish based on regex matching of the extensions >> of files in a directory. These are filtered through a regex-based >> exclude list, and then individual files can be added back in with an >> include list. >> >> Applying this strategy to link export, I might want to have >> something like the following in my org-config.el: >> >> (setq org-export-links-extension "org\\|txt" >> org-export-links-exclude "~/*" >> org-export-links-include ("~/notes/", "~/blog/")) >> >> This would result in exporting all of the .org and .txt files in >> ~/notes/ and ~/blog/ as working links in html files, but would >> ignore links in org files to anything else in my home directory >> during export. >> >> There's certainly a question about how org links that are not >> exported as html links should be handled. I would actually be fine >> with just exporting the double-bracketed notation, but I bet there >> are better ideas out there. >> >> Thanks again for the org suite, >> /au >> >> >> ___ >> Emacs-orgmode mailing list >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> > > -- > Carsten Dominik > Sterrenkundig Instituut "Anton Pannekoek" > Universiteit van Amsterdam > Kruislaan 403 > NL-1098SJ Amsterdam > phone: +31 20 525 7477 > > > > ___ > Emacs-orgmode mailing list > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- Dave O'Toole [EMAIL PROTECTED] ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] Wishlist Item: KBD navigation through list items:
I'm looking for a way to move through list items with a single keystroke, e.g. M-n and M-p or something similar. I didn't find a convenient org-next-item and org-previous-item command, would it be possible to add these? -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] Request: use call-interactively in org-shiftmetaup and friends?
This is a request for making speech-enabling some of org-mode's wizard commands easier from Emacspeak At present org-shiftmetaup and friends call the correct interactive command based on context -- this is very nice. To provide the right spoken message, the ideal points to advice in emacspeak are the context specific commands, e.g. org-move-item-up etc. To keep the advice safe, I usually protect the code in the advice fragment with a (when (interactive-p) ...) so that the advice doesn't fire when the command is called from within other functions. I'm having to break this rule right now because org-shiftmetaup etc call the appropriate interactive command e.g. org-move-item-up as a function; could you change these to use call-interactively -- would make my life on the advice side much easier. -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] org-demote leaves point in the wrong place?
this is especially noticeable when editting lists and createing sublists. Start a new item, hit M-shift-right and the new bullet indents; continue typing and text ends up at the beginning of the line, rather than where you want it. -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] org-metaright and org-shiftmetaright
These two commands appear to do practically the same thing, I'm confused as to why they are distict. -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Emacs-orgmode] org-demote leaves point in the wrong place?
Fixed, thanks. - Carsten On May 20, 2006, at 19:40, T. V. Raman wrote: this is especially noticeable when editting lists and createing sublists. Start a new item, hit M-shift-right and the new bullet indents; continue typing and text ends up at the beginning of the line, rather than where you want it. -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477 ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Emacs-orgmode] Wishlist Item: KBD navigation through list items:
On May 20, 2006, at 19:15, T. V. Raman wrote: I'm looking for a way to move through list items with a single keystroke, e.g. M-n and M-p or something similar. I didn't find a convenient org-next-item and org-previous-item command, would it be possible to add these? Are you talking about outline headings, or about plain list items? - Carsten ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] HTML question
I am trying to improve the HTML representation of the new checkboxes in items. I found out that I could use to get a pretty checkbox, but that of course gives a checkbox that is actually active, so users can select and deselect them - unwanted in this case. I would like a checkbox that shows the state, but cannot be changed. Is there an easy way to do this? Thanks. - Carsten ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] Re: HTML question
Carsten Dominik <[EMAIL PROTECTED]> writes: > this case. I would like a checkbox that shows the state, but cannot > be changed. Is there an easy way to do this? The following appears to work in Firefox. Permanently Checked Permanently Unchecked Todd ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Emacs-orgmode] Wishlist Item: KBD navigation through list items:
Plain list items. I already know how to move amongst outline headings using outline mode navigation. > "Carsten" == Carsten Dominik <[EMAIL PROTECTED]> writes: Carsten> On May 20, 2006, at 19:15, T. V. Raman wrote: Carsten> >> > > I'm looking for a way to move through list items with a single >> keystroke, e.g. M-n and M-p or something similar. >> >> I didn't find a convenient org-next-item and >> org-previous-item command, would it be possible to add >> these? Carsten> Carsten> Carsten> Are you talking about outline headings, or about Carsten> plain list items? Carsten> Carsten> - Carsten -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] HTML question
the bigger issue with this is that legal HTML and XHTML does not allow you to have a free floating checkbox item outside an html form element. XForms does allow this, but is probably not what you're looking for. > "Carsten" == Carsten Dominik <[EMAIL PROTECTED]> writes: Carsten> I am trying to improve the HTML representation of Carsten> the new checkboxes in items. I found out that I Carsten> could use Carsten> Carsten> Carsten> Carsten> to get a pretty checkbox, but that of course gives a Carsten> checkbox that is actually active, so users can Carsten> select and deselect them - unwanted in this case. I Carsten> would like a checkbox that shows the state, but Carsten> cannot be changed. Is there an easy way to do this? Carsten> Carsten> Thanks. Carsten> Carsten> - Carsten Carsten> Carsten> Carsten> Carsten> ___ Carsten> Emacs-orgmode mailing list Emacs-orgmode@gnu.org Carsten> http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] cannot store link to an info ode?
I was mildly surprized/disappointed when C-c l org-store-link raised an error in an info buffer. How about teaching org about info: links? -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] Re: cannot store link to an info ode?
"T. V. Raman" <[EMAIL PROTECTED]> writes: --- ../org.el 2006-05-20 23:28:27.491989152 -0400 +++ org.el 2006-05-20 23:23:37.445082984 -0400 @@ -2666,7 +2666,7 @@ (defconst org-non-link-chars "]\t\n\r<>") (defconst org-link-types '("https?" "ftp" "mailto" "file" "news" "bbdb" "vm" - "wl" "mhe" "rmail" "gnus" "shell")) + "wl" "mhe" "rmail" "gnus" "shell" "info")) (defconst org-link-re-with-space (concat " > I was mildly surprized/disappointed when C-c l org-store-link > raised an error in an info buffer. > How about teaching org about info: links? > > -- > Best Regards, > --raman Here is a patch to do this. I haven't tested it too much and there may be a better way, but it works for me. Todd ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Emacs-orgmode] Re: cannot store link to an info ode?
Applied your patch, works like a charm! Thanks, and hope this gets into the next update to org-mode.el -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Emacs-orgmode] HTML question
On May 21, 2006, at 1:01, T. V. Raman wrote: the bigger issue with this is that legal HTML and XHTML does not allow you to have a free floating checkbox item outside an html form element. XForms does allow this, but is probably not what you're looking for. Hmmm, this is a problem indeed. I can of course just leave "[ ]" and "[X]", but these do not have the same width and look not pretty. Does anyone know how to make a space as wide as "X"? - Carsten "Carsten" == Carsten Dominik <[EMAIL PROTECTED]> writes: Carsten> I am trying to improve the HTML representation of Carsten> the new checkboxes in items. I found out that I Carsten> could use Carsten> Carsten> Carsten> Carsten> to get a pretty checkbox, but that of course gives a Carsten> checkbox that is actually active, so users can Carsten> select and deselect them - unwanted in this case. I Carsten> would like a checkbox that shows the state, but Carsten> cannot be changed. Is there an easy way to do this? Carsten> Carsten> Thanks. Carsten> Carsten> - Carsten Carsten> Carsten> Carsten> Carsten> ___ Carsten> Emacs-orgmode mailing list Emacs-orgmode@gnu.org Carsten> http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Best Regards, --raman Email: [EMAIL PROTECTED] WWW:http://emacspeak.sf.net/raman/ AIM:emacspeak GTalk: [EMAIL PROTECTED] PGP:http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC:irc://irc.freenode.net/#emacs -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477 ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Emacs-orgmode] HTML question
On Date: Sun, 21 May 2006 08:09:46 +0200, Carsten Dominik <[EMAIL PROTECTED]> wrote: > > On May 21, 2006, at 1:01, T. V. Raman wrote: > > > > > the bigger issue with this is that legal HTML and XHTML does not > > allow you to have a free floating checkbox item outside an html > > form element. XForms does allow this, but is probably not what > > you're looking for. > > > Hmmm, this is a problem indeed. I can of course just leave "[ ]" and > "[X]", but these do not have the same width and look not pretty. Does > anyone know how to make a space as wide as "X"? This is one way: [X] [X] Dave ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Emacs-orgmode] HTML question
That works, great, thanks. - Carsten On May 21, 2006, at 8:42, David Emery wrote: X -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477 ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode