emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: ross@rosslaird.com (Ross A. Laird)
To: emacs-orgmode@gnu.org
Subject: Uniquely url-ify sentences?
Date: Sat, 05 Mar 2011 11:40:55 -0800	[thread overview]
Message-ID: <87ei6ltkos.fsf@rosslaird.com> (raw)

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 A. Laird, PhD

             reply	other threads:[~2011-03-05 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-05 19:40 Ross A. Laird [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-05 19:38 Ross A. Laird
2011-03-07 21:54 ` Jason Dunsmore
2011-03-17  9:50 ` Bastien

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:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ei6ltkos.fsf@rosslaird.com \
    --to=ross@rosslaird.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: Uniquely url-ify sentences?' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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


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).