From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Smithline Subject: Re: Minimal overhead Org-mode blogging system Date: Sun, 20 May 2012 17:48:04 -0400 Message-ID: <4FB96694.3040602@neilsmithline.com> References: <2011-12-04T17-22-10@devnull.Karl-Voit.at> <4FB2F970.5050903@neilsmithline.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWDz1-0004oF-Kw for emacs-orgmode@gnu.org; Sun, 20 May 2012 17:48:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWDyz-0005RP-AL for emacs-orgmode@gnu.org; Sun, 20 May 2012 17:48:11 -0400 Received: from mail-qa0-f41.google.com ([209.85.216.41]:55555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWDyz-0005RJ-5U for emacs-orgmode@gnu.org; Sun, 20 May 2012 17:48:09 -0400 Received: by qabg27 with SMTP id g27so1331523qab.0 for ; Sun, 20 May 2012 14:48:07 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jude DaShiell Cc: emacs-orgmode@gnu.org First, the only way to learn is to do. That said, I do understand that RL gets in the way of fun. Regarding the implementation, if you skip the index system, which is definitely an elegant solution, and modify my symbolic link solution for agendas to keep track of files with blog entries. The symlink solution is only a pseudo index and is not automated, but it is trivial to use. Just replace every use of the word "agenda" in my code to "blog" and then bind `org-add-blog-file' to some convenient key sequence. Then use selective exporting ([[info:elisp#Char%20Classes][info:elisp#Char Classes]]) when publishing your blog. You would assign `org-export-select-tags' to a tag like :blog:. Then you just need to define a custom export function to change the value of `org-export-select-tags'. I just cobbled it together (that's secret code for "haven't tested") the custom export function at https://gist.github.com/2759661. I think that should get you most of the way. Neil Smithline http://www.neilsmithline.com Proud GNU Emacs user since 1986, v. 18.24. On Wed May 16 05:51:33 2012, Jude DaShiell wrote: > I don't know enough lisp to implement this indexing system. On Tue, 15 > May 2012, Neil Smithline wrote: > >> I like your indexing idea. I use a less-complex system involving symbolic >> links for my agenda files. Yours sounds better. >> >> This is what I use for my agendas: >> >> (setq org-agenda-files >> (list (expand-file-name "~/Documents/+OrgAgendas"))) >> >> (defun org-add-agenda-file () >> (interactive) >> (make-symbolic-link (buffer-file-name) "~/Documents/+OrgAgendas")) >> >> It is just a quick-and-dirty solution. If I remove or move a file, I get >> errors. Also, if I stop using a file for agenda items I must manually unlink >> the symlink. >> >> Have you implemented your indexing system Jude or just designed it? I'd love >> to see it if you have something working. I imagine it could be used for todos, >> cross-referencing tags, properties, etc... >> >> And to prevent Carsten from yelling at me :-D, I would insist that, by >> default, Emacs would not create the cross-referencing database. You'd have to >> explicitly enable it. >> >> Neil >> >> On Mon May 14 22:24:08 2012, Jude DaShiell wrote: >>> Understand, I use update here in the sense of some file modification >>> that subsequently gets saved. If files to be modified get archived into >>> org-mode's revision control system, the blog tag and associated done tag >>> could be searched for within the save process and an org database could >>> build with file name and then tripplets of date stamp, line number for >>> blog tag, line number for done tag and each tripplet would hold another >>> blog entry in that unique file which is the first field in the data >>> base. So you want to find a blog entry? Search the org-generated data >>> base for a date stamp and you come up with the file and the range of >>> line numbers holding that blog entry. Search one file and go to >>> specific location in second file. That if it's done or gets done will >>> keep file searching to a nice minimum permanently. >>> >>> On Sun, 13 May 2012, Neil Smithline wrote: >>> >>>> >>>> Karl Voit Karl-Voit.at> writes: >>>>> Therefore I sat down and thought about a workflow that should be >>>>> enough for writing simple weblog entries: >>>>> >>>>> - create an Org-mode heading (anywhere!) >>>>> - make sure that there is an (uniq) :ID: property >>>>> - add the tag :blog: to heading >>>>> - >>>>> - change state of top-heading to DONE >>>>> - this enables blog entries ?in the queue? >>>>> - (manually) invoke generation-script >>>>> >>>>> This enables me quick blogging with a list of advantages: >>>>> >>>>> - a blog entry can be located anywhere in all of my Orgmode files >>>>> - no extra formatting steps >>>>> - very small (almost non-existent) overhead to create a blog entry >>>>> - no duplicate information >>>>> - updates only in Orgmode, not HTML or any in-between format >>>>> - static (fast) pages >>>>> - self-hosting without any fancy services behind like RDBS >>>>> Karl, >>>> >>>> I'm wondering if you've played around with this at all? I happen to really >>>> like >>>> the idea but I wonder about its performance. >>>> >>>> Unless I'm mistaken, and I very likely may be, won't you have to scan all >>>> of >>>> your .org files to look for the special tags/properties/todo >>>> states/whatever? >>>> >>>> If not, I'd love to have a pointer to how you can accomplish this without >>>> scanning every .org file. That would be cool. >>>> >>>> >>>> >>> >>> ---------------------------------------------------------------- >>> Jude >>> >>> >> >> > > ---------------------------------------------------------------- > Jude > >