emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Uniquely url-ify sentences?


From: Ross A. Laird
Subject: [O] Uniquely url-ify sentences?
Date: Sat, 05 Mar 2011 11:40:55 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Although most users of orgmode and emacs seem to be members of the
programming world, a few professional writers also use these tools (and
I cannot imagine why everyone else uses Word...). As a writer and
non-programmer, I have a task that is probably very simple for a
programmer but seems a bit complicated to me. It's something that could
be done in many different ways, but I'd like to do it in orgmode/emacs with the
simplest possible workflow. Here's the situation:

I have a narrative manuscript. I'd like to post one sentence from this
manuscript every day as a tweet with a link back to the sentence (and
then show the previous and next paragraphs of the manuscript on the page
that is linked from the tweet). The manuscript is in an org file (I also
have a version in LaTeX). Given my limited knowledge, I imagine I
could do this with a macro in emacs:

1. From the beginning of the first sentence, search to dot-then-space
(or zap to dot, or something similar).

2. Insert line break (or move sentence into another buffer).

3. Go to end of sentence and insert unique link anchor (main url plus
incremented line number or part of sentence or something similar).

4. Use the list of sentences with links as daily tweets.

This type of macro workflow would probably work, with some fiddling, but
I find that with macros there is always something to mess up the
workflow at some point. For example, in this case, there may be some
situation in which dot-space does not define the sentence precisely
(ellipses, say, or a sentence that ends with an exclamation). I predict
this will happen (it seems to happen every time with macros), and I
wonder if I should try some other approach.

What do you think might be the best way to do this? Is there a way to
uniquely url-ify sentences? If so, I could just create a second version
of the manuscript and url-ify the whole thing in one step. All I really
need is to create a unique anchor (#) for each sentence. The main url
can be consistent through the whole thing.

Feedback and suggestions most welcome.

Ross

-- 
Ross A. Laird, PhD
www.rosslaird.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]