NOTES 127 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276
  1. # -*- mode:org -*-
  2. #+Options: ^:nil
  3. #+CATEGORY: bugpile
  4. A collection of working notes.
  5. * Notes
  6. ** proposed org-export integration
  7. From: Nicolas Goaziou <n.goaziou@gmail.com>
  8. Subject: Re: Requesting feedback on proposed iorg (interactive web export for Org) implementation and org-element integration
  9. To: Eric Schulte <eric.schulte@gmx.com>
  10. Cc: Bastien <bzg@gnu.org>, Thorsten Jolitz <tjolitz@googlemail.com>
  11. Date: Tue, 12 Jun 2012 14:15:35 +0200 (1 hour, 29 minutes, 45 seconds ago)
  12. Hello,
  13. Eric Schulte <eric.schulte@gmx.com> writes:
  14. > After it was decided in the beginning of this week that the iOrg web
  15. > framework (my GSoC 2012 project based on Org-mode and Elnode [1]) will
  16. > use the new Org export engine, we (Eric and me) had a deeper look at it
  17. > and tried to figure out where to interact with the exporter.
  18. Nice. I'll try to help as much as I can.
  19. > In one sentence, our goal is to let the user specifiy via headline tags
  20. > and properties which elements of the Org buffer he wants to export as
  21. > HTML form fields (like <input..., <select... etc) with related HTML
  22. > attributes instead of simply as static HTML.
  23. >
  24. > Although there is still quite a bit of guessing involved, we developed
  25. > an implementation plan, but we would really like to hear your opinion,
  26. > if you think its a sane and feasible approach, or if there are other
  27. > more natural options.
  28. >
  29. > What we want:
  30. >
  31. > During the export process, the exporter should have access to all the
  32. > iOrg related info (stored in headline tags and properties) to decide
  33. > for each Org buffer element if a post-process filter function that
  34. > turns the static HTML into an HTML form field is applied of not.
  35. A transcoder function has access to full parse tree anyway. A set of
  36. topology functions is defined in org-export.el (i.e.
  37. `org-export-get-parent', `org-export-get-parent-headline'...) to do the
  38. job.
  39. > The filter function should then have access to all iOrg info related
  40. > to the HTML element to be post-processed, to be able to set all its
  41. > HTML attributes as specified by the user (e.g. the action=URL
  42. > attribute for the form element, or rows= and cols= attributes for a
  43. > <textarea... field).
  44. In org-export's lingo, a filter is a set of functions applied on output
  45. data (in this case HTML code). That's definitely not what you want since
  46. you would lose every contextual information in the process. For example,
  47. a filter applied to a paragraph can't access to its surrounding
  48. elements.
  49. > How we think it could be done:
  50. >
  51. > Imagine an Org headline like the following.
  52. >
  53. > #+begin_src org
  54. > *** TODO Make me a HTML-form with checkboxes :iorg:
  55. > :PROPERTIES:
  56. > :html-form: http://localhost:8000/make-me-interactive-html
  57. > :html-button-value: Send edits
  58. > :END:
  59. >
  60. > - [X] Should this entry be wrapped into a HTML-form?
  61. > - [X] Does the :iorg: tag tell the exporter to apply a filter?
  62. > - [X] Are there two buttons, submit and reset, at the bottom-right?
  63. > - [ ] Should this checkbox be opt-out like the ones above?
  64. >
  65. > some text some text some text some text some text some text
  66. > some text some text some text some text some text some text
  67. > some text some text some text some text some text some text
  68. > some text some text some text some text some text some text
  69. > #+end_source
  70. >
  71. > The :iorg: tag tells the exporter to apply post-process filters to
  72. > this entry and its contents resulting in an HTML form with a checkbox
  73. > group and a text area and a button named "Send edits".
  74. >
  75. > Is there something analogous to tags/properties which could be applied
  76. > below the subtree level e.g., to only tag a particular list or
  77. > paragraph inside of a subtree for iorg processing?
  78. You may add HTML attributes to a paragraph or a list:
  79. #+begin_src org
  80. #+ATTR_HTML: :form http://localhost:8000/make-me-interactive.html
  81. #+ATTR_HTML: :button-value "Send edits"
  82. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
  83. tempor incididunt ut labore et dolore magna aliqua. Ut enimad minim
  84. veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
  85. commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
  86. velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
  87. occaecat cupidatat non proident, sunt in culpa qui officia deserunt
  88. mollit anim id est laborum.
  89. #+end_src
  90. > We imagine two options for integrating iorg processing with the
  91. > existing org-e-html exporter.
  92. If I understand correctly, you want to add a layer of syntax in order to
  93. integrate <form> tags in e-html output. In this case, I think the most
  94. appropriate way to do so is to define a new back-end, `iorg', derived
  95. from `e-html' with `org-export-define-derived-backend' macro.
  96. Assuming, for the example's sake, that you only want to make headlines
  97. into forms, lists into radio and paragraphs into textarea, you only have
  98. to define a transcoder function for each of them. Here is an example,
  99. producing cheesy HTML:
  100. #+begin_src emacs-lisp
  101. (org-export-define-derived-backend iorg e-html
  102. :translate-alist ((headline . org-iorg-headline)
  103. (item . org-iorg-item)
  104. (paragraph . org-iorg-paragraph)
  105. (plain-list . org-iorg-plain-list)
  106. (section . org-iorg-section)))
  107. (defun org-iorg-headline (headline contents info)
  108. "Transcode element HEADLINE into HTML syntax.
  109. CONTENTS is the contents of the headline. INFO is a plist used
  110. as a communication channel."
  111. (if (not (member "iorg" (org-export-get-tags headline info)))
  112. ;; Fallback to regular HTML.
  113. (funcall (assq 'headline org-e-html-translate-alist)
  114. headline contents info)
  115. ;; Otherwise, build <form> template.
  116. (let ((action (org-element-property :html-form headline))
  117. (submit (org-element-property :html-button-value headline)))
  118. (concat (format "<form method=post action=\"%s\">\n" action)
  119. "<table border=0>\n"
  120. contents
  121. "<tr>\n"
  122. (format "<td><input type=\"reset\"></td>\n")
  123. (format "<td><input type=\"submit\" value=\"%s\"></td>\n" submit)
  124. "</tr>\n"
  125. "</table>\n"
  126. "</form>"))))
  127. (defun org-iorg-section (section contents info)
  128. "Transcode element HEADLINE into HTML syntax.
  129. CONTENTS is the contents of the headline. INFO is a plist used
  130. as a communication channel."
  131. (let ((headline (org-export-get-parent section)))
  132. (if (or (not headline)
  133. (not (member "iorg"
  134. (org-export-get-tags headline info))))
  135. ;; Fallback to regular HTML.
  136. (funcall (assq 'section org-e-html-translate-alist)
  137. section contents info)
  138. ;; Otherwise, export CONTENTS as-is.
  139. contents)))
  140. (defun org-iorg-paragraph (paragraph contents info)
  141. "Transcode element PARAGRAPH into HTML syntax.
  142. CONTENTS is the contents of the paragraph. INFO is a plist used
  143. as a communication channel."
  144. (let ((headline (org-export-get-parent-headline paragraph)))
  145. (if (or (not headline)
  146. (not (member "iorg" (org-export-get-tags headline info))))
  147. ;; Fallback to regular HTML.
  148. (funcall (assq 'paragraph org-e-html-translate-alist)
  149. paragraph contents info)
  150. (let ((attributes (org-export-read-attribute :attr_html paragraph)))
  151. (cond
  152. ;; If the paragraph is contained within an item, do not make
  153. ;; it a textarea.
  154. ((catch 'item-found
  155. (mapc (lambda (parent)
  156. (when (eq (org-element-type parent) 'item)
  157. (throw 'item-found t)))
  158. (org-export-get-genealogy paragraph))
  159. nil)
  160. contents)
  161. ;; If paragraph has no special attribute, consider it
  162. ;; is plain text.
  163. ((not attributes)
  164. (format "<tr>\n<td colspan=2>\n%s</td>\n</tr>" contents))
  165. ;; Otherwise build <textarea> template.
  166. (t (format "<tr>
  167. <td>%s</td>
  168. <td>
  169. <textarea%s>\n%s</textarea>
  170. </td>
  171. </tr>"
  172. (or (plist-get attributes :title) "")
  173. (let (options)
  174. (mapc
  175. (lambda (prop)
  176. (let ((value (plist-get attributes prop)))
  177. (when value
  178. (setq options
  179. (concat options
  180. (format " %s=\"%s\""
  181. (substring (symbol-name prop)
  182. 1)
  183. value))))))
  184. '(:cols :rows :name :readonly :value))
  185. options)
  186. contents)))
  187. ))))
  188. (defun org-iorg-plain-list (plain-list contents info)
  189. "Transcode element PLAIN-LIST into HTML syntax.
  190. CONTENTS is the contents of the plain-list. INFO is a plist used
  191. as a communication channel."
  192. (let ((headline (org-export-get-parent-headline plain-list)))
  193. (if (or (not headline)
  194. (not (member "iorg" (org-export-get-tags headline info))))
  195. ;; Fallback to regular HTML.
  196. (funcall (assq 'plain-list org-e-html-translate-alist)
  197. plain-list contents info)
  198. ;; If plain-list is descriptive make it a select menu, otherwise
  199. ;; simply return CONTENTS as-is.
  200. (let ((attributes (org-export-read-attribute :attr_html plain-list)))
  201. (if (eq (org-element-property :type plain-list) 'descriptive)
  202. (format "<tr>
  203. <td>%s</td>
  204. <td>
  205. <select name=\"%s\">\n%s</select>
  206. </td>
  207. </tr>"
  208. (or (plist-get attributes :name) "")
  209. contents)
  210. contents)))))
  211. (defun org-iorg-item (item contents info)
  212. "Transcode element ITEM into HTML syntax.
  213. CONTENTS is the contents of the ITEM. INFO is a plist used as
  214. a communication channel."
  215. (let ((headline (org-export-get-parent-headline item)))
  216. (if (or (not headline)
  217. (not (member "iorg" (org-export-get-tags headline info))))
  218. ;; Fallback to regular HTML.
  219. (funcall (assq 'item org-e-html-translate-alist) item contents info)
  220. ;; Otherwise find appropriate input type and build tag.
  221. ;; Attributes are read from parent plain-list since items have
  222. ;; no affiliated keyword attached to them.
  223. (let ((plain-list (org-export-get-parent item)))
  224. ;; List is descriptive: item is an option line whose value is
  225. ;; item's tag.
  226. (if (eq (org-element-property :type plain-list) 'descriptive)
  227. (format "<option value=\"%s\">%s</option>"
  228. (org-export-data (org-element-property :tag item) info)
  229. (org-trim contents)))
  230. ;; Otherwise build appropriate input type. Assume item's
  231. ;; contents is the text before the input tag.
  232. (let* ((attributes (org-export-read-attribute :attr_html plain-list))
  233. (checkboxp (org-element-property :checkbox item))
  234. (type (if checkboxp 'checkbox (plist-get attributes :type))))
  235. (format "<tr>
  236. <td>%s</td>
  237. <td><input type=%s name=\"%s\"%s></td>
  238. </tr>"
  239. contents
  240. type
  241. (or (plist-get attributes :name) "")
  242. (cond ((not (eq type 'checkbox)) "")
  243. ((eq checkboxp 'on) " checked")
  244. (t " unchecked"))))))))
  245. #+end_src
  246. It will export an Org buffer to string with:
  247. (org-export-as 'iorg)
  248. You can wrap this into a file, for example with:
  249. #+begin_src org
  250. (defun org-iorg-export-to-html
  251. (&optional subtreep visible-only body-only ext-plist pub-dir)
  252. "Export current buffer to a HTML file.
  253. If narrowing is active in the current buffer, only export its
  254. narrowed part.
  255. If a region is active, export that region.
  256. When optional argument SUBTREEP is non-nil, export the sub-tree
  257. at point, extracting information from the headline properties
  258. first.
  259. When optional argument VISIBLE-ONLY is non-nil, don't export
  260. contents of hidden elements.
  261. When optional argument BODY-ONLY is non-nil, only write code
  262. between \"<body>\" and \"</body>\".
  263. xo
  264. EXT-PLIST, when provided, is a property list with external
  265. parameters overriding Org default settings, but still inferior to
  266. file-local settings.
  267. When optional argument PUB-DIR is set, use it as the publishing
  268. directory.
  269. Return output file's name."
  270. (interactive)
  271. (let* ((extension (concat "." org-e-html-extension))
  272. (file (org-export-output-file-name extension subtreep pub-dir))
  273. (org-export-coding-system org-e-html-coding-system))
  274. (org-export-to-file 'iorg file subtreep visible-only body-only ext-plist)))
  275. #+end_src
  276. One problem is that I'm not sure how to set value for <input> items
  277. since attributes can only be applied to a plain list and not to
  278. items. Perhaps one could use a description list and use the tag as the
  279. value?
  280. Let me know if you have any question.
  281. Regards,
  282. --
  283. Nicolas Goaziou
  284. ** Torvalds on bug trackers
  285. http://yarchive.net/comp/linux/bug_tracking.html
  286. #+begin_quote
  287. The thing is, bugzilla is totally broken because it's designed to help
  288. track bugs, but it's *not* designed to actually handle the much harder
  289. problem, which is to actually get the *right* developers to be aware
  290. of the *right* bugs!
  291. #+end_quote
  292. ** suggestion for auth issues
  293. From =#emacs= WRT: how we can handle authentication issues moving forward.
  294. : 10:44 < nicferrier> _schulte_: I think you should ignore the auth issues and just use a
  295. : client side cookie. that interface can always be improved.
  296. : 10:44 < _schulte_> nicferrier: I vigorously agree
  297. ** GSoC mid-term/final evaluations
  298. *** How do evaluations work?
  299. Quote from GSoC [[http://www.google-melange.com/document/show/gsoc_program/google/gsoc2012/faqs][faq]]:
  300. #+begin_quote
  301. Google will pre-publish the evaluation questions for both students
  302. and mentors. Mentors will fill out mid-term and final evaluations
  303. for their students via the Google Summer of Code 2012 site. These
  304. evaluations will be visible in the system to the mentor and the
  305. mentoring organization's administrator(s). Students will fill out a
  306. mid-term and final evaluation of their mentors online as well, and
  307. their evaluations will only be visible in the system to the
  308. mentoring organization's administrator(s). Program administrators
  309. from Google will have access to all evaluation data.
  310. Any student who does not submit an evaluation by the evaluation
  311. deadline will fail that evaluation, regardless of the grade the
  312. mentor gives the student. If a student submits his or her evaluation
  313. on time but the mentor does not, then the student is in an
  314. "undecided" state until the program administrators can speak to the
  315. mentor and determine the student's grade.
  316. Students who fail the mid-term are immediately removed from the
  317. program: it's not possible to fail the mid-term, stay in the
  318. program, and then have a final evaluation.
  319. In almost all cases, students will never see their mentor's
  320. evaluation of their progress, nor will a mentor see a student's
  321. evaluation of her/his mentorship. However, in the case where the
  322. mentoring organization's administrator and a student's mentor are
  323. one and the same, the student's evaluation will be shared with the
  324. mentor. If you are a student in a situation where your mentor is
  325. also your organization's administrator and you would like to discuss
  326. an issue with the program, please contact the Google Summer of Code
  327. program administrators. Organization administrators are expected to
  328. review mid-term and final evaluations and to provide course
  329. corrections where necessary.
  330. In some cases, Google's program administrators may need to share the
  331. results of evaluations with the student and mentor, such as to
  332. arbitrate when payment should not be made. Should this need arise,
  333. all parties will be notified in advance.
  334. In the unlikely event that a mentor and organization administrator
  335. do not agree on a student's grade for any evaluation, the decision
  336. of the organization administrator is the final one.
  337. In the also unlikely event that a student does not agree with a
  338. mentoring organization's evaluation decision at either the midterm
  339. or the final, the student may choose to submit his/her entire
  340. project plan, timeline and code sample to Google's program
  341. administrators. Google will choose an independent engineer to review
  342. the code and arbitrate the decision. The decision of Google's
  343. independent engineer is final.
  344. Finally, any mentor who misses a deadline for an evaluation of his/
  345. her student without notifying the program administrators beforehand
  346. will not be allowed to attend the Google Summer of Code mentor
  347. summit. Timely evaluations of Google Summer of Code students are
  348. crucial to us.
  349. #+end_quote
  350. ** HTML
  351. *** Buttons
  352. button
  353. +----------------------------------------------------------------------------------------------------------------------------------------+
  354. | Bedeutung |Erzeugt einen Klick-Button - siehe Seite Beschreibung. |
  355. |--------------+-------------------------------------------------------------------------------------------------------------------------|
  356. |HTML-Varianten|Erlaubt in den Varianten Seite Strict, Transitional, Frameset |
  357. |--------------+-------------------------------------------------------------------------------------------------------------------------|
  358. |Elternelemente|Darf innerhalb der folgenden HTML-Elemente vorkommen: |
  359. | |[Block-Elemente] | [Inline-Elemente] (außer button) |
  360. |--------------+-------------------------------------------------------------------------------------------------------------------------|
  361. | |Darf #PCDATA und folgende andere HTML-Elemente enthalten: |
  362. | Kindelemente |abbr | acronym | address | applet | b | basefont | bdo | big | blockquote | br | center | cite | code | dfn | dl | dir | |
  363. | |div | em | font | h1-6 | hr | i | img | kbd | map | menu | noframes | noscript | object | ol | p | pre | q | samp | |
  364. | |script | small | span | strong | sub | sup | table | tt | ul | var |
  365. |--------------+-------------------------------------------------------------------------------------------------------------------------|
  366. | Attribute |siehe Seite Attribute |
  367. +----------------------------------------------------------------------------------------------------------------------------------------+
  368. button
  369. +----------------------------------------------------------------------------------------------------------------------------------------+
  370. | Bedeutung |Erzeugt einen Klick-Button - siehe Seite Beschreibung. |
  371. |--------------+-------------------------------------------------------------------------------------------------------------------------|
  372. | Attribut | Wert | HTML-Varianten |erforderlich?| Bedeutung |
  373. |--------------+---------+------------------------------------+-------------+------------------------------------------------------------|
  374. |accesskey |#CDATA |Erlaubt in den Varianten Seite |nein |bestimmt ein einzelnes Zeichen als Hotkey für den |
  375. | | |Strict, Transitional, Frameset | |Tastaturzugriff auf den Button |
  376. |--------------+---------+------------------------------------+-------------+------------------------------------------------------------|
  377. | |disabled |Erlaubt in den Varianten Seite | | |
  378. |disabled |(leeres |Strict, Transitional, Frameset |nein |bestimmt, dass der Button nicht betätigt werden kann |
  379. | |Attribut)| | | |
  380. |--------------+---------+------------------------------------+-------------+------------------------------------------------------------|
  381. |name |#CDATA |Erlaubt in den Varianten Seite |nein |bestimmt einen Namen für den Button |
  382. | | |Strict, Transitional, Frameset | | |
  383. |--------------+---------+------------------------------------+-------------+------------------------------------------------------------|
  384. |onblur |#CDATA |Erlaubt in den Varianten Seite |nein |beim Verlassen des verweis-sensitiven Bereichs... |
  385. | | |Strict, Transitional, Frameset | |(Script-Code) |
  386. |--------------+---------+------------------------------------+-------------+------------------------------------------------------------|
  387. |onfocus |#CDATA |Erlaubt in den Varianten Seite |nein |wenn verweis-sensitiver Bereich den Fokus hat... |
  388. | | |Strict, Transitional, Frameset | |(Script-Code) |
  389. |--------------+---------+------------------------------------+-------------+------------------------------------------------------------|
  390. |tabindex |[Zahl] |Erlaubt in den Varianten Seite |nein |bestimmt die Tabulator-Reihenfolge für Buttons durch Angabe |
  391. | | |Strict, Transitional, Frameset | |einer Zahl |
  392. |--------------+---------+------------------------------------+-------------+------------------------------------------------------------|
  393. | |button | |Erlaubt in den Varianten Seite |nein | |
  394. |type |submit | |Strict, Transitional, Frameset |(Default: |bestimmt den Typ des Buttons |
  395. | |reset | |submit) | |
  396. |--------------+---------+------------------------------------+-------------+------------------------------------------------------------|
  397. |value |#CDATA |Erlaubt in den Varianten Seite |nein |bestimmt den Absendewert des Buttons |
  398. | | |Strict, Transitional, Frameset | | |
  399. |----------------------------------------------------------------------------------------------------------------------------------------|
  400. |[Universalattribute] |
  401. |----------------------------------------------------------------------------------------------------------------------------------------|
  402. |Abhängigkeiten|siehe Seite Elemente |
  403. +----------------------------------------------------------------------------------------------------------------------------------------+
  404. ** Libraries
  405. *** Elnode
  406. **** Starting an elnode server
  407. =nicferrier= suggests this script to launch an elnode server.
  408. https://gist.github.com/2628802
  409. **** Setup elnode
  410. :PROPERTIES:
  411. :results: silent
  412. :END:
  413. An abbreviated version of the instructions from
  414. https://github.com/nicferrier/elnode.
  415. 1. clone locally to somewhere on the =load-path=.
  416. #+begin_src sh
  417. git clone git://github.com/nicferrier/elnode.git
  418. #+end_src
  419. 2. load up elnode
  420. #+begin_src emacs-lisp
  421. (require 'elnode)
  422. #+end_src
  423. 3. define a simple handler function
  424. #+begin_src emacs-lisp
  425. (defun simple-handler (httpcon)
  426. (elnode-http-start httpcon "200" '("Content-type" . "text/html"))
  427. (elnode-http-return httpcon "<html><b>HELLO!</b></html>"))
  428. #+end_src
  429. 4. start the server
  430. #+begin_src emacs-lisp
  431. (elnode-start 'simple-handler :port 3333 :host "localhost")
  432. #+end_src
  433. 5. point your browser at elnode http://localhost:3333/
  434. 6. stop the server
  435. #+begin_src emacs-lisp
  436. (elnode-stop 3333)
  437. #+end_src
  438. **** API
  439. #+begin_src emacs-lisp
  440. 136 matches for "(def" in buffer: elnode.el
  441. 59:(defconst ELNODE-FORM-DATA-TYPE "application/x-www-form-urlencoded"
  442. 62:(defgroup elnode nil
  443. 66:(defvar elnode-server-socket nil
  444. 76:(defun elnode-trunc (data)
  445. 82:(defun elnode-trim (str)
  446. 89:(defcustom elnode-log-files-directory "~/.elnodelogs"
  447. 98:(defvar elnode-log-buffer-position-written 0
  448. 104:(defvar elnode-log-buffer-max-size 1000
  449. 107:(defvar elnode-log-buffer-datetime-format "%Y%m%d%H%M%S"
  450. 110:(defun elnode-log-buffer-log (text buffer-or-name &optional filename)
  451. 150:(defcustom elnode-error-log-to-messages t
  452. 155:(defvar elnode-server-error-log "*elnode-server-error*"
  453. 158:(defvar elnode--do-error-logging t
  454. 161:(defun elnode--get-error-log-buffer ()
  455. 165:(defun elnode-error (msg &rest args)
  456. 182:(defun elnode--log-filename (logname)
  457. 193:(defun elnode-log-access (logname httpcon)
  458. 217:(defvar elnode--deferred '()
  459. 220:(defun elnode-defer-now (handler)
  460. 230:(defmacro elnode-defer-or-do (guard &rest body)
  461. 243:(defun elnode--deferred-add (httpcon handler)
  462. 248:(defun elnode--deferred-processor ()
  463. 269:(defvar elnode--defer-timer nil
  464. 274:(defun elnode--init-deferring ()
  465. 281:(defun elnode-deferred-queue (arg)
  466. 292:(defun elnode-deferred-queue-stop ()
  467. 301:(defcustom elnode-default-response-table
  468. 323:(defun elnode--format-response (status &optional msg)
  469. 333:(defun elnode--sentinel (process status)
  470. 361:(defun elnode--process-send-string (proc data)
  471. 371:(defun elnode--process-send-eof (proc)
  472. 384:(defun elnode--http-parse (httpcon)
  473. 438:(defun elnode--http-make-hdr (method resource &rest headers)
  474. 480:(defun elnode--get-server-prop (process key)
  475. 490:(defun elnode--make-send-string ()
  476. 497:(defun elnode--make-send-eof ()
  477. 504:(defun elnode--filter (process data)
  478. 578:(defmacro with-elnode-mock-server (handler &rest body)
  479. 599:(defun* elnode-test-call (path
  480. 698:(defun elnode-test-handler (httpcon)
  481. 707:(defun elnode--log-fn (server con msg)
  482. 713:(defvar elnode-handler-history '()
  483. 716:(defvar elnode-port-history '()
  484. 719:(defvar elnode-host-history '()
  485. 723:(defun* elnode-start (request-handler
  486. 742:(defun nic-server (httpcon)
  487. 799:(defun elnode-stop (port)
  488. 819:(defun elnode-list-buffers ()
  489. 835:(defun elnode-time-encode (time-str)
  490. 842:(defun elnode--http-hdr (httpcon)
  491. 850:(defun elnode-http-header (httpcon name &optional convert)
  492. 877:(defun elnode-http-cookie (httpcon name)
  493. 899:(defun elnode--http-parse-status (httpcon &optional property)
  494. 913:(defun elnode--http-parse-resource (httpcon &optional property)
  495. 938:(defun elnode-http-pathinfo (httpcon)
  496. 944:(defun elnode-http-query (httpcon)
  497. 950:(defun elnode--http-param-part-decode (param-thing)
  498. 977:(defun elnode--http-query-to-alist (query)
  499. 993:(defun elnode--alist-merge (a b &optional operator)
  500. 1017:(defun elnode--http-post-to-alist (httpcon)
  501. 1029:(defun elnode-http-params (httpcon)
  502. 1061:(defun elnode-http-param (httpcon name)
  503. 1070:(defun elnode-http-method (httpcon)
  504. 1076:(defun elnode-http-version (httpcon)
  505. 1082:(defun elnode-http-send-string (httpcon str)
  506. 1096:(defvar elnode-http-codes-alist
  507. 1110:(defun elnode--http-result-header (hdr-alist)
  508. 1131:(defun elnode-http-start (httpcon status &rest header)
  509. 1165:(defun elnode--http-end (httpcon)
  510. 1179:(defun elnode-http-return (httpcon &optional data)
  511. 1198:(defun elnode-send-json (httpcon data &optional content-type)
  512. 1209:(defun elnode-send-status (httpcon status &optional msg)
  513. 1221:(defun elnode-send-404 (httpcon &optional msg)
  514. 1227:(defun elnode-send-400 (httpcon &optional msg)
  515. 1233:(defun elnode-send-500 (httpcon &optional msg)
  516. 1240:(defun elnode-send-redirect (httpcon location &optional type)
  517. 1251:(defun elnode-normalize-path (httpcon handler)
  518. 1268:(defun elnode--mapper-find-mapping (match-path mapping-table)
  519. 1274:(defun elnode--mapper-find (httpcon path mapping-table)
  520. 1314:(defun elnode-http-mapping (httpcon &optional part)
  521. 1344:(defun elnode-get-targetfile (httpcon docroot)
  522. 1367:(defvar elnode--do-access-logging-on-dispatch t
  523. 1370:(defun* elnode--dispatch-proc (httpcon
  524. 1397:(defun elnode-dispatcher (httpcon url-mapping-table &optional function-404)
  525. 1415:(defun my-server (httpcon)
  526. 1434:(defun* elnode-hostpath-dispatcher (httpcon
  527. 1468:(defcustom elnode-hostpath-default-table
  528. 1485:(defun elnode-hostpath-default-handler (httpcon)
  529. 1496:(defcustom elnode-log-worker-elisp nil
  530. 1503:(defcustom elnode-log-worker-responses nil
  531. 1510:(defun elnode--worker-filter-helper (process
  532. 1549:(defun elnode--worker-lisp-helper (child-lisp)
  533. 1558:(defmacro elnode-worker-elisp (output-stream bindings &rest body)
  534. 1709:(defun elnode-worker-last-code ()
  535. 1723:(defun elnode-wait-for-exit (process)
  536. 1730:(defun elnode--child-process-sentinel (process status)
  537. 1766:(defun elnode--child-process-filter (process data)
  538. 1784:(defun elnode-child-process (httpcon program &rest args)
  539. 1816:(defun elnode-auth (httpcon)
  540. 1819:(defcustom elnode-send-file-program "/bin/cat"
  541. 1827:(defun elnode--buffer-template (file-buf replacements)
  542. 1867:(defvar elnode-webserver-visit-file nil
  543. 1873:(defun* elnode-send-file (httpcon targetfile
  544. 1936:(defmacro elnode-method (&rest method-mappings)
  545. 1962:(defun elnode-make-redirecter (location &optional type)
  546. 1971:(defun* elnode-make-send-file (filename &key preamble mime-types )
  547. 1990:(defun elnode--under-docroot-p (target-file doc-root)
  548. 1999:(defun elnode-not-found (httpcon target-file)
  549. 2006:(defun elnode-cached-p (httpcon target-file)
  550. 2017:(defun elnode-cached (httpcon)
  551. 2023:(defmacro elnode-docroot-for (doc-root with target-file-var
  552. 2071:(defcustom elnode-webserver-docroot "~/public_html"
  553. 2079:(defcustom elnode-webserver-extra-mimetypes '(("text/plain" . "creole")
  554. 2088:(defcustom elnode-webserver-index '("index.html" "index.htm")
  555. 2096:(defun elnode-url-encode-path (path)
  556. 2112:(defcustom elnode-webserver-index-page-template "<html>
  557. 2132:(defcustom elnode-webserver-index-file-template "<a href='%s'>%s</a><br/>\r\n"
  558. 2139:(defun elnode--webserver-index (docroot targetfile pathinfo)
  559. 2164:(defun elnode--webserver-handler-proc (httpcon docroot mime-types)
  560. 2195:(defun elnode-webserver-handler-maker (&optional docroot extra-mime-types)
  561. 2217:(defun elnode-webserver (httpcon)
  562. 2238:(defgroup elnode-wikiserver nil
  563. 2242:(defcustom elnode-wikiserver-wikiroot "~/wiki"
  564. 2247:(defcustom elnode-wikiserver-body-header
  565. 2253:(defcustom elnode-wikiserver-body-footer
  566. 2271:(defun elnode--wiki-call (out-buf page-text page)
  567. 2302:(defun elnode-wiki-send (httpcon wikipage &optional pageinfo)
  568. 2324:(defun elnode-wiki-handler (httpcon wikiroot)
  569. 2372:(defun elnode-wikiserver-test ()
  570. 2377:(defun elnode-wikiserver (httpcon)
  571. 2392:(defcustom elnode-init-port 8000
  572. 2396:(defcustom elnode-init-host "localhost\"
  573. 2401:(defun elnode-init ()
  574. 2426:(defcustom elnode-do-init 't
  575. 2441:(defvar elnode--inited nil
  576. #+end_src
  577. *** Org-export
  578. **** API
  579. #+begin_src emacs-lisp
  580. 186 matches for "(def" in buffer: org-export.el
  581. 110:(defconst org-export-max-depth 19
  582. 113:(defconst org-export-option-alist
  583. 174:(defconst org-export-special-keywords
  584. 181:(defconst org-export-filters-alist
  585. 249:(defconst org-export-default-inline-image-rule
  586. 273:(defgroup org-export nil
  587. 278:(defgroup org-export-general nil
  588. 283:(defcustom org-export-with-archived-trees 'headline
  589. 299:(defcustom org-export-with-author t
  590. 306:(defcustom org-export-with-clocks nil
  591. 313:(defcustom org-export-with-creator 'comment
  592. 326:(defcustom org-export-creator-string
  593. 334:(defcustom org-export-with-drawers t
  594. 350:(defcustom org-export-with-email nil
  595. 357:(defcustom org-export-with-emphasize t
  596. 368:(defcustom org-export-exclude-tags '("noexport")
  597. 380:(defcustom org-export-with-fixed-width t
  598. 395:(defcustom org-export-with-footnotes t
  599. 402:(defcustom org-export-headline-levels 3
  600. 413:(defcustom org-export-default-language "en"
  601. 420:(defcustom org-export-preserve-breaks nil
  602. 430:(defcustom org-export-with-entities t
  603. 444:(defcustom org-export-with-planning nil
  604. 451:(defcustom org-export-with-priority nil
  605. 461:(defcustom org-export-with-section-numbers t
  606. 472:(defcustom org-export-select-tags '("export")
  607. 485:(defcustom org-export-with-special-strings t
  608. 502:(defcustom org-export-with-sub-superscripts t
  609. 531:(defcustom org-export-with-toc t
  610. 549:(defcustom org-export-with-tables t
  611. 561:(defcustom org-export-with-tags t
  612. 576:(defcustom org-export-with-tasks t
  613. 593:(defcustom org-export-time-stamp-file t
  614. 602:(defcustom org-export-with-timestamps t
  615. 618:(defcustom org-export-with-todo-keywords t
  616. 624:(defcustom org-export-allow-BIND 'confirm
  617. 634:(defcustom org-export-snippet-translation-alist nil
  618. 648:(defcustom org-export-coding-system nil
  619. 653:(defcustom org-export-copy-to-kill-ring t
  620. 658:(defcustom org-export-initial-scope 'buffer
  621. 666:(defcustom org-export-show-temporary-export-buffer t
  622. 676:(defcustom org-export-dispatch-use-expert-ui nil
  623. 956:(defun org-export-get-environment (&optional backend subtreep ext-plist)
  624. 990:(defun org-export-parse-option-keyword (options &optional backend)
  625. 1019:(defun org-export-get-subtree-options ()
  626. 1046:(defun org-export-get-inbuffer-options (&optional backend files)
  627. 1174:(defun org-export-get-buffer-attributes ()
  628. 1200:(defun org-export-get-global-options (&optional backend)
  629. 1219:(defun org-export-store-footnote-definitions (info)
  630. 1260:(defvar org-export-allow-BIND-local nil)
  631. 1261:(defun org-export-confirm-letbind ()
  632. 1272:(defun org-export-install-letbind-maybe ()
  633. 1302:(defun org-export-collect-tree-properties (data info)
  634. 1366:(defun org-export-get-min-level (data options)
  635. 1384:(defun org-export-collect-headline-numbering (data options)
  636. 1408:(defun org-export-populate-ignore-list (data options)
  637. 1440:(defun org-export--selected-trees (data info)
  638. 1467:(defun org-export--skip-p (blob options select-tags)
  639. 1547:(defun org-export-transcoder (blob info)
  640. 1557:(defun org-export-data (data info)
  641. 1647:(defun org-export-interpret-p (blob info)
  642. 1671:(defsubst org-export-expand (blob contents)
  643. 1679:(defun org-export-ignore-element (element info)
  644. 1726:(defvar org-export-before-parsing-hook nil
  645. 1736:(defvar org-export-filter-parse-tree-functions nil
  646. 1743:(defvar org-export-filter-final-output-functions nil
  647. 1750:(defvar org-export-filter-plain-text-functions nil
  648. 1760:(defvar org-export-filter-center-block-functions nil
  649. 1766:(defvar org-export-filter-clock-functions nil
  650. 1772:(defvar org-export-filter-drawer-functions nil
  651. 1778:(defvar org-export-filter-dynamic-block-functions nil
  652. 1784:(defvar org-export-filter-headline-functions nil
  653. 1790:(defvar org-export-filter-inlinetask-functions nil
  654. 1796:(defvar org-export-filter-plain-list-functions nil
  655. 1802:(defvar org-export-filter-item-functions nil
  656. 1808:(defvar org-export-filter-comment-functions nil
  657. 1814:(defvar org-export-filter-comment-block-functions nil
  658. 1820:(defvar org-export-filter-example-block-functions nil
  659. 1826:(defvar org-export-filter-export-block-functions nil
  660. 1832:(defvar org-export-filter-fixed-width-functions nil
  661. 1838:(defvar org-export-filter-footnote-definition-functions nil
  662. 1844:(defvar org-export-filter-horizontal-rule-functions nil
  663. 1850:(defvar org-export-filter-keyword-functions nil
  664. 1856:(defvar org-export-filter-latex-environment-functions nil
  665. 1862:(defvar org-export-filter-babel-call-functions nil
  666. 1868:(defvar org-export-filter-paragraph-functions nil
  667. 1874:(defvar org-export-filter-planning-functions nil
  668. 1880:(defvar org-export-filter-property-drawer-functions nil
  669. 1886:(defvar org-export-filter-quote-block-functions nil
  670. 1893:(defvar org-export-filter-quote-section-functions nil
  671. 1899:(defvar org-export-filter-section-functions nil
  672. 1905:(defvar org-export-filter-special-block-functions nil
  673. 1911:(defvar org-export-filter-src-block-functions nil
  674. 1917:(defvar org-export-filter-table-functions nil
  675. 1923:(defvar org-export-filter-table-cell-functions nil
  676. 1929:(defvar org-export-filter-table-row-functions nil
  677. 1935:(defvar org-export-filter-verse-block-functions nil
  678. 1944:(defvar org-export-filter-bold-functions nil
  679. 1950:(defvar org-export-filter-code-functions nil
  680. 1956:(defvar org-export-filter-entity-functions nil
  681. 1962:(defvar org-export-filter-export-snippet-functions nil
  682. 1968:(defvar org-export-filter-footnote-reference-functions nil
  683. 1974:(defvar org-export-filter-inline-babel-call-functions nil
  684. 1980:(defvar org-export-filter-inline-src-block-functions nil
  685. 1986:(defvar org-export-filter-italic-functions nil
  686. 1992:(defvar org-export-filter-latex-fragment-functions nil
  687. 1998:(defvar org-export-filter-line-break-functions nil
  688. 2004:(defvar org-export-filter-link-functions nil
  689. 2010:(defvar org-export-filter-macro-functions nil
  690. 2016:(defvar org-export-filter-radio-target-functions nil
  691. 2022:(defvar org-export-filter-statistics-cookie-functions nil
  692. 2028:(defvar org-export-filter-strike-through-functions nil
  693. 2034:(defvar org-export-filter-subscript-functions nil
  694. 2040:(defvar org-export-filter-superscript-functions nil
  695. 2046:(defvar org-export-filter-target-functions nil
  696. 2052:(defvar org-export-filter-timestamp-functions nil
  697. 2058:(defvar org-export-filter-underline-functions nil
  698. 2064:(defvar org-export-filter-verbatim-functions nil
  699. 2070:(defun org-export-filter-apply-functions (filters value info)
  700. 2080:(defun org-export-install-filters (info)
  701. 2135:(defun org-export-as
  702. 2220:(defun org-export-to-buffer
  703. 2243:(defun org-export-to-file
  704. 2268:(defun org-export-output-file-name (extension &optional subtreep pub-dir)
  705. 2315:(defmacro org-export-with-current-buffer-copy (&rest body)
  706. 2345:(defun org-export-expand-include-keyword (&optional included dir)
  707. 2428:(defun org-export-prepare-file-contents (file &optional lines ind minlevel)
  708. 2519:(defun org-export-snippet-backend (export-snippet)
  709. 2544:(defun org-export-collect-footnote-definitions (data info)
  710. 2577:(defun org-export-footnote-first-reference-p (footnote-reference info)
  711. 2609:(defun org-export-get-footnote-definition (footnote-reference info)
  712. 2616:(defun org-export-get-footnote-number (footnote info)
  713. 2676:(defun org-export-get-relative-level (headline info)
  714. 2682:(defun org-export-low-level-p (headline info)
  715. 2697:(defun org-export-get-headline-number (headline info)
  716. 2702:(defun org-export-numbered-headline-p (headline info)
  717. 2709:(defun org-export-number-to-roman (n)
  718. 2725:(defun org-export-first-sibling-p (headline info)
  719. 2731:(defun org-export-last-sibling-p (headline info)
  720. 2760:(defun org-export-solidify-link-text (s)
  721. 2765:(defun org-export-get-coderef-format (path desc)
  722. 2774:(defun org-export-inline-image-p (link &optional rules)
  723. 2798:(defun org-export-resolve-fuzzy-link (link info)
  724. 2867:(defun org-export-resolve-id-link (link info)
  725. 2883:(defun org-export-resolve-coderef (ref info)
  726. 2916:(defun org-export-expand-macro (macro info)
  727. 2944:(defun org-export-get-ordinal (element info &optional types predicate)
  728. 3028:(defun org-export-get-loc (element info)
  729. 3057:(defun org-export-unravel-code (element)
  730. 3108:(defun org-export-format-code (code fun &optional num-lines ref-alist)
  731. 3137:(defun org-export-format-code-default (element info)
  732. 3201:(defun org-export-table-has-special-column-p (table)
  733. 3222:(defun org-export-table-has-header-p (table info)
  734. 3240:(defun org-export-table-row-is-special-p (table-row info)
  735. 3276:(defun org-export-table-row-group (table-row info)
  736. 3298:(defun org-export-table-cell-width (table-cell info)
  737. 3333:(defun org-export-table-cell-alignment (table-cell info)
  738. 3392:(defun org-export-table-cell-borders (table-cell info)
  739. 3482:(defun org-export-table-cell-starts-colgroup-p (table-cell info)
  740. 3494:(defun org-export-table-cell-ends-colgroup-p (table-cell info)
  741. 3504:(defun org-export-table-row-starts-rowgroup-p (table-row info)
  742. 3513:(defun org-export-table-row-ends-rowgroup-p (table-row info)
  743. 3522:(defun org-export-table-row-starts-header-p (table-row info)
  744. 3530:(defun org-export-table-row-ends-header-p (table-row info)
  745. 3538:(defun org-export-table-dimensions (table info)
  746. 3559:(defun org-export-table-cell-address (table-cell info)
  747. 3593:(defun org-export-get-table-cell-at (address table info)
  748. 3631:(defun org-export-collect-headlines (info &optional n)
  749. 3649:(defun org-export-collect-elements (type info &optional predicate)
  750. 3671:(defun org-export-collect-tables (info)
  751. 3680:(defun org-export-collect-figures (info predicate)
  752. 3695:(defun org-export-collect-listings (info)
  753. 3719:(defun org-export-get-genealogy (blob info)
  754. 3751:(defun org-export-get-parent (blob info)
  755. 3757:(defun org-export-get-parent-headline (blob info)
  756. 3767:(defun org-export-get-parent-paragraph (object info)
  757. 3777:(defun org-export-get-parent-table (object info)
  758. 3787:(defun org-export-get-previous-element (blob info)
  759. 3797:(defun org-export-get-next-element (blob info)
  760. 3816:(defun org-export-dispatch ()
  761. 3904:(defun org-export-dispatch-ui (options expertp)
  762. #+end_src
  763. *** Org-e-html
  764. #+begin_src emacs-lisp
  765. 165 matches for "(def" in buffer: org-e-html.el
  766. 49:(defvar org-element-string-restrictions)
  767. 50:(defvar org-element-object-restrictions)
  768. 92:(defconst org-e-html-option-alist
  769. 139:(defconst org-e-html-cvt-link-fn
  770. 150:(defvar org-e-html-format-table-no-css)
  771. 151:(defvar htmlize-buffer-places) ; from htmlize.el
  772. 152:(defvar body-only) ; dynamically scoped into this.
  773. 158:(defgroup org-export-e-html nil
  774. 165:(defcustom org-e-html-pretty-output nil
  775. 173:(defcustom org-e-html-extension "html"
  776. 178:(defcustom org-e-html-xml-declaration
  777. 198:(defvar org-e-html-content-div "content"
  778. 204:(defcustom org-e-html-divs '("preamble" "content" "postamble")
  779. 218:(defconst org-e-html-style-default
  780. 274:(defcustom org-e-html-style-include-default t
  781. 284:(defcustom org-e-html-style ""
  782. 316:(defcustom org-e-html-style-extra ""
  783. 327:(defcustom org-e-html-mathjax-options
  784. 363:(defcustom org-e-html-style-include-scripts t
  785. 370:(defconst org-e-html-scripts
  786. 398:(defcustom org-e-html-mathjax-template
  787. 447:(defcustom org-e-html-preamble t
  788. 465:(defcustom org-e-html-preamble-format '(("en" ""))
  789. 478:(defcustom org-e-html-home/up-format
  790. 494:(defcustom org-e-html-postamble 'auto
  791. 515:(defcustom org-e-html-postamble-format
  792. 534:(defcustom org-e-html-validation-link
  793. 544:(defcustom org-e-html-protect-char-alist
  794. 553:(defconst org-e-html-special-string-regexps
  795. 563:(defcustom org-e-html-todo-kwd-class-prefix ""
  796. 575:(defcustom org-e-html-tag-class-prefix ""
  797. 591:(defcustom org-e-html-inline-images 'maybe
  798. 602:(defcustom org-e-html-inline-image-extensions
  799. 622:(defcustom org-e-html-footnotes-section "<div id=\"footnotes\">
  800. 635:(defcustom org-e-html-footnote-format "<sup>%s</sup>"
  801. 641:(defcustom org-e-html-footnote-separator "<sup>, </sup>"
  802. 671:(defgroup org-export-e-htmlize nil
  803. 676:(defcustom org-export-e-htmlize-output-type 'inline-css
  804. 695:(defcustom org-export-e-htmlize-css-font-prefix "org-"
  805. 700:(defcustom org-export-e-htmlized-org-css-url nil
  806. 717:(defcustom org-e-html-table-tag
  807. 725:(defcustom org-e-html-table-header-tags '("<th scope=\"%s\"%s>" . "</th>")
  808. 735:(defcustom org-e-html-table-data-tags '("<td%s>" . "</td>")
  809. 744:(defcustom org-e-html-table-row-tags '("<tr>" . "</tr>")
  810. 771:(defcustom org-e-html-table-align-individual-fields t
  811. 779:(defcustom org-e-html-table-use-header-tags-for-first-column nil
  812. 793:(defcustom org-e-html-toplevel-hlevel 2
  813. 810:(defcustom org-e-html-link-org-files-as-html t
  814. 831:(defcustom org-e-html-date-format
  815. 839:(defcustom org-e-html-format-headline-function nil
  816. 868:(defcustom org-e-html-text-markup-alist
  817. 891:(defcustom org-e-html-footnote-separator "<sup>, </sup>"
  818. 899:(defcustom org-e-html-active-timestamp-format "\\textit{%s}"
  819. 904:(defcustom org-e-html-inactive-timestamp-format "\\textit{%s}"
  820. 909:(defcustom org-e-html-diary-timestamp-format "\\textit{%s}\"
  821. 917:(defcustom org-e-html-inline-image-rules
  822. 938:(defcustom org-e-html-table-caption-above t
  823. 946:(defcustom org-e-html-format-drawer-function nil
  824. 967:(defcustom org-e-html-format-inlinetask-function nil
  825. 1009:(defcustom org-e-html-quotes
  826. 1047:(defun org-e-html-cvt-org-as-html (opt-plist type path)
  827. 1063:(defun org-e-html-format-org-link (opt-plist type-1 path fragment desc attr
  828. 1140:(defun org-e-html-format-inline-image (src &optional
  829. 1164:(defun org-e-html-bibliography ()
  830. 1184:(defun org-e-html-format-table (lines olines)
  831. 1188:(defun org-e-html-splice-attributes (tag attributes)
  832. 1204:(defun org-export-splice-style (style extra)
  833. 1214:(defun org-export-e-htmlize-region-for-paste (beg end)
  834. 1228:(defun org-export-e-htmlize-generate-css ()
  835. 1262:(defun org-e-html-make-string (n string)
  836. 1265:(defun org-e-html-toc-text (toc-entries)
  837. 1288:(defun* org-e-html-format-toc-headline
  838. 1300:(defun org-e-html-toc (depth info)
  839. 1329:(defun org-e-html-fix-class-name (kwd) ; audit callers of this function
  840. 1337:(defun org-e-html-format-footnote-reference (n def refcnt)
  841. 1344:(defun org-e-html-format-footnotes-section (section-name definitions)
  842. 1348:(defun org-e-html-format-footnote-definition (fn)
  843. 1357:(defun org-e-html-footnote-section (info)
  844. 1376:(defun org-e-html-format-date (info)
  845. 1388:(defun org-e-html--caption/label-string (caption label info)
  846. 1417:(defun org-e-html--find-verb-separator (s)
  847. 1425:(defun org-e-html--quotation-marks (text info)
  848. 1439:(defun org-e-html--wrap-label (element output)
  849. 1453:(defun org-e-html-meta-info (info)
  850. 1477:(defun org-e-html-style (info)
  851. 1486:(defun org-e-html-mathjax-config (info)
  852. 1517:(defun org-e-html-preamble (info)
  853. 1553:(defun org-e-html-postamble (info)
  854. 1618:(defun org-e-html-template (contents info)
  855. 1700:(defun org-e-html--todo (todo)
  856. 1709:(defun org-e-html--tags (tags)
  857. 1722:(defun* org-e-html-format-headline
  858. 1736:(defun org-e-html-fontify-code (code lang)
  859. 1777:(defun org-e-html-do-format-code
  860. 1808:(defun org-e-html-format-code (element info)
  861. 1832:(defun org-e-html-bold (bold contents info)
  862. 1842:(defun org-e-html-center-block (center-block contents info)
  863. 1853:(defun org-e-html-clock (clock contents info)
  864. 1870:(defun org-e-html-code (code contents info)
  865. 1890:(defun org-e-html-drawer (drawer contents info)
  866. 1906:(defun org-e-html-dynamic-block (dynamic-block contents info)
  867. 1915:(defun org-e-html-entity (entity contents info)
  868. 1924:(defun org-e-html-example-block (example-block contents info)
  869. 1954:(defun org-e-html-export-snippet (export-snippet contents info)
  870. 1963:(defun org-e-html-export-block (export-block contents info)
  871. 1972:(defun org-e-html-fixed-width (fixed-width contents info)
  872. 1990:(defun org-e-html-footnote-reference (footnote-reference contents info)
  873. 2016:(defun org-e-html-format-headline--wrap (headline info
  874. 2053:(defun org-e-html-headline (headline contents info)
  875. 2118:(defun org-e-html-horizontal-rule (horizontal-rule contents info)
  876. 2134:(defun org-e-html-inline-src-block (inline-src-block contents info)
  877. 2146:(defun org-e-html-format-section (text class &optional id)
  878. 2150:(defun org-e-html-inlinetask (inlinetask contents info)
  879. 2177:(defun org-e-html-italic (italic contents info)
  880. 2186:(defun org-e-html-checkbox (checkbox)
  881. 2192:(defun org-e-html-format-list-item (contents type checkbox
  882. 2218:(defun org-e-html-item (item contents info)
  883. 2234:(defun org-e-html-keyword (keyword contents info)
  884. 2263:(defun org-e-html-format-latex (latex-frag processing-type)
  885. 2276:(defun org-e-html-latex-environment (latex-environment contents info)
  886. 2305:(defun org-e-html-latex-fragment (latex-fragment contents info)
  887. 2324:(defun org-e-html-line-break (line-break contents info)
  888. 2332:(defun org-e-html-link--inline-image (link desc info)
  889. 2362:(defvar org-e-html-standalone-image-predicate)
  890. 2363:(defun org-e-html-standalone-image-p (element info &optional predicate)
  891. 2408:(defun org-e-html-link (link desc info)
  892. 2521:(defun org-e-html-macro (macro contents info)
  893. 2530:(defun org-e-html-paragraph (paragraph contents info)
  894. 2553:(defun org-e-html-begin-plain-list (type &optional arg1)
  895. 2562:(defun org-e-html-end-plain-list (type)
  896. 2568:(defun org-e-html-plain-list (plain-list contents info)
  897. 2584:(defun org-e-html-convert-special-strings (string)
  898. 2594:(defun org-e-html-encode-plain-text (s)
  899. 2605:(defun org-e-html-plain-text (text info)
  900. 2643:(defun org-e-html-planning (planning contents info)
  901. 2671:(defun org-e-html-property-drawer (property-drawer contents info)
  902. 2682:(defun org-e-html-quote-block (quote-block contents info)
  903. 2692:(defun org-e-html-quote-section (quote-section contents info)
  904. 2702:(defun org-e-html-section (section contents info) ; FIXME
  905. 2722:(defun org-e-html-radio-target (radio-target text info)
  906. 2733:(defun org-e-html-special-block (special-block contents info)
  907. 2745:(defun org-e-html-src-block (src-block contents info)
  908. 2779:(defun org-e-html-statistics-cookie (statistics-cookie contents info)
  909. 2788:(defun org-e-html-strike-through (strike-through contents info)
  910. 2798:(defun org-e-html-subscript (subscript contents info)
  911. 2807:(defun org-e-html-superscript (superscript contents info)
  912. 2816:(defun org-e-html-table-cell (table-cell contents info)
  913. 2845:(defun org-e-html-table-row (table-row contents info)
  914. 2878:(defun org-e-html-table-first-row-data-cells (table info)
  915. 2889:(defun org-e-html-table--table.el-table (table info)
  916. 2904:(defun org-e-html-table (table contents info)
  917. 2959:(defun org-e-html-target (target contents info)
  918. 2970:(defun org-e-html-timestamp (timestamp contents info)
  919. 2981:(defun org-e-html-underline (underline contents info)
  920. 2991:(defun org-e-html-verbatim (verbatim contents info)
  921. 3001:(defun org-e-html-verse-block (verse-block contents info)
  922. 3028:(defconst org-e-html-filters-alist
  923. 3036:(defun org-e-html-final-function (contents backend info)
  924. 3047:(defun org-e-html-export-to-html
  925. #+end_src
  926. *** Org-element
  927. **** Introduction
  928. Location: http://article.gmane.org/gmane.emacs.orgmode/49416
  929. Picon
  930. From: Nicolas Goaziou <n.goaziou <at> gmail.com>
  931. Subject: [ANN] Org Elements in contrib
  932. Newsgroups: gmane.emacs.orgmode
  933. Date: 2011-11-21 18:50:29 GMT (28 weeks, 2 days, 4 hours and 6 minutes
  934. ago)
  935. Hello,
  936. I've added org-element.el in contrib directory. It is a complete parser
  937. and interpreter for Org syntax.
  938. While it was written to be extensible, it is also an attempt to
  939. normalize current syntax and provide guidance for its evolution.
  940. Org syntax can be divided into three categories: "Greater elements",
  941. "Elements" and "Objects".
  942. An object can be defined anywhere on a line. It may span over more than
  943. a line but never contains a blank one. Objects belong to the following
  944. types: `emphasis', `entity', `export-snippet', `footnote-reference',
  945. `inline-babel-call', `inline-src-block', `latex-fragment', `line-break',
  946. `link', `macro', `radio-target', `statistics-cookie', `subscript',
  947. `superscript', `target', `time-stamp' and `verbatim'.
  948. An element always starts and ends at the beginning of a line. The only
  949. element's type containing objects is called a `paragraph'. Other types
  950. are: `comment', `comment-block', `example-block', `export-block',
  951. `fixed-width', `horizontal-rule', `keyword', `latex-environment',
  952. `babel-call', `property-drawer', `quote-section', `src-block', `table'
  953. and `verse-block'.
  954. Elements containing paragraphs are called greater elements. Concerned
  955. types are: `center-block', `drawer', `dynamic-block',
  956. `footnote-definition', `headline', `inlinetask', `item', `plain-list',
  957. `quote-block' and `special-block'.
  958. Greater elements (excepted `headline' and `item' types) and elements
  959. (excepted `keyword', `babel-call', and `property-drawer' types) can have
  960. a fixed set of keywords as attributes. Those are called "affiliated
  961. keywords", to distinguish them from others keywords, which are
  962. full-fledged elements. In particular, the "name" affiliated keyword
  963. allows to label almost any element in an Org buffer.
  964. Notwithstanding affiliated keywords, each greater element, element and
  965. object has a fixed set of properties attached to it. Among them, three
  966. are shared by all types: `:begin' and `:end', which refer to the
  967. beginning and ending buffer positions of the considered element or
  968. object, and `:post-blank', which holds the number of blank lines, or
  969. white spaces, at its end.
  970. Some elements also have special properties whose value can hold objects
  971. themselves (i.e. an item tag, an headline name, a table cell). Such
  972. values are called "secondary strings".
  973. Lisp-wise, an element or an object can be represented as a list. It
  974. follows the pattern (TYPE PROPERTIES CONTENTS), where: TYPE is a symbol
  975. describing the Org element or object. PROPERTIES is the property list
  976. attached to it. See docstring of appropriate parsing function to get an
  977. exhaustive list. CONTENTS is a list of elements, objects or raw strings
  978. contained in the current element or object, when applicable.
  979. An Org buffer is a nested list of such elements and objects, whose type
  980. is `org-data' and properties is nil.
  981. The first part of this file implements a parser and an interpreter for
  982. each type of Org syntax.
  983. The next two parts introduce two accessors and a function retrieving the
  984. smallest element containing point (respectively
  985. `org-element-get-property', `org-element-get-contents' and
  986. `org-element-at-point').
  987. The following part creates a fully recursive buffer parser. It also
  988. provides a tool to map a function to elements or objects matching some
  989. criteria in the parse tree. Functions of interest are
  990. `org-element-parse-buffer', `org-element-map' and, to a lesser extent,
  991. `org-element-parse-secondary-string'.
  992. The penultimate part is the cradle of an interpreter for the obtained
  993. parse tree: `org-element-interpret-data' (and its relative,
  994. `org-element-interpret-secondary').
  995. The library ends by furnishing a set of interactive tools for element's
  996. navigation and manipulation.
  997. More specifically, that last part includes some tools like
  998. `org-element-forward', `org-element-backward',
  999. `org-element-drag-forward', `org-element-drag-backward',
  1000. `org-element-mark-element', `org-element-up',
  1001. `org-element-unindent-buffer'...
  1002. For the impatient (well, not quite as you're still reading this), you
  1003. can evaluate the following examples in an Org buffer :
  1004. (org-element-parse-buffer)
  1005. (org-element-parse-buffer 'headline)
  1006. (org-element-parse-buffer 'headline 'visible-only)
  1007. Also, the following code will parse the buffer, interpret the parsed
  1008. tree, and create a canonical copy of it (no indentation, lowercased
  1009. blocks, standard keywords):
  1010. #+begin_src org
  1011. (let ((out (org-element-interpret-data (org-element-parse-buffer))))
  1012. (switch-to-buffer (get-buffer-create "*Bijectivep*"))
  1013. (erase-buffer)
  1014. (insert out)
  1015. (goto-char (point-min))
  1016. (org-mode))
  1017. #+end_src
  1018. Beside allowing to add keywords like "#+name:", "#+caption:" or
  1019. "#+attr_latex:" to almost any Org element, it also introduces two less
  1020. noticable changes:
  1021. 1. "#+label:" keywords are deprecated in favor of "#+name:". Though,
  1022. for now, "label" is still considered as a synonym of "name".
  1023. 2. Protected HTML snippets (like @<b>) are no longer supported, as
  1024. they were too specific.
  1025. Instead, a general mechanism to inline back-end specific commands
  1026. is created. Thus, the HTML back-end will see "<b>some text<\b>"
  1027. while the LaTeX one will only see "some text" if the buffer
  1028. contains:
  1029. @html{<b>}some text <at> html{<\b>}
  1030. Syntax is heavier, but a configurable variable allows to define
  1031. shortcuts, allowing to reduce it to, for example, @h{<b>}. No
  1032. shortcut is provided by default.
  1033. Also, the syntax is experimental, and may change if proven to be
  1034. inadequate.
  1035. I will commit a generic exporter built on top of Elements, along with
  1036. a LaTeX back-end, in a couple of days.
  1037. Feedback is welcome.
  1038. Regards,
  1039. --
  1040. Nicolas Goaziou
  1041. **** API
  1042. #+begin_src emacs-lisp
  1043. 165 matches for "(def" in buffer: org-element.el
  1044. 152:(defun org-element-center-block-parser ()
  1045. 181:(defun org-element-center-block-interpreter (center-block contents)
  1046. 189:(defun org-element-drawer-parser ()
  1047. 220:(defun org-element-drawer-interpreter (drawer contents)
  1048. 230:(defun org-element-dynamic-block-parser ()
  1049. 264:(defun org-element-dynamic-block-interpreter (dynamic-block contents)
  1050. 276:(defun org-element-footnote-definition-parser ()
  1051. 311:(defun org-element-footnote-definition-interpreter (footnote-definition contents)
  1052. 321:(defun org-element-headline-parser (&optional raw-secondary-p)
  1053. 425:(defun org-element-headline-interpreter (headline contents)
  1054. 474:(defun org-element-inlinetask-parser (&optional raw-secondary-p)
  1055. 552:(defun org-element-inlinetask-interpreter (inlinetask contents)
  1056. 593:(defun org-element-item-parser (struct &optional raw-secondary-p)
  1057. 663:(defun org-element-item-interpreter (item contents)
  1058. 703:(defun org-element-plain-list-parser (&optional structure)
  1059. 742:(defun org-element-plain-list-interpreter (plain-list contents)
  1060. 750:(defun org-element-quote-block-parser ()
  1061. 778:(defun org-element-quote-block-interpreter (quote-block contents)
  1062. 786:(defun org-element-section-parser ()
  1063. 812:(defun org-element-section-interpreter (section contents)
  1064. 820:(defun org-element-special-block-parser ()
  1065. 852:(defun org-element-special-block-interpreter (special-block contents)
  1066. 876:(defun org-element-babel-call-parser ()
  1067. 896:(defun org-element-babel-call-interpreter (babel-call contents)
  1068. 911:(defun org-element-clock-parser ()
  1069. 940:(defun org-element-clock-interpreter (clock contents)
  1070. 955:(defun org-element-comment-parser ()
  1071. 994:(defun org-element-comment-interpreter (comment contents)
  1072. 1004:(defun org-element-comment-block-parser ()
  1073. 1033:(defun org-element-comment-block-interpreter (comment-block contents)
  1074. 1042:(defun org-element-example-block-parser ()
  1075. 1099:(defun org-element-example-block-interpreter (example-block contents)
  1076. 1111:(defun org-element-export-block-parser ()
  1077. 1143:(defun org-element-export-block-interpreter (export-block contents)
  1078. 1154:(defun org-element-fixed-width-parser ()
  1079. 1190:(defun org-element-fixed-width-interpreter (fixed-width contents)
  1080. 1199:(defun org-element-horizontal-rule-parser ()
  1081. 1216:(defun org-element-horizontal-rule-interpreter (horizontal-rule contents)
  1082. 1224:(defun org-element-keyword-parser ()
  1083. 1248:(defun org-element-keyword-interpreter (keyword contents)
  1084. 1258:(defun org-element-latex-environment-parser ()
  1085. 1284:(defun org-element-latex-environment-interpreter (latex-environment contents)
  1086. 1292:(defun org-element-paragraph-parser ()
  1087. 1320:(defun org-element-paragraph-interpreter (paragraph contents)
  1088. 1328:(defun org-element-planning-parser ()
  1089. 1361:(defun org-element-planning-interpreter (planning contents)
  1090. 1378:(defun org-element-property-drawer-parser ()
  1091. 1414:(defun org-element-property-drawer-interpreter (property-drawer contents)
  1092. 1428:(defun org-element-quote-section-parser ()
  1093. 1449:(defun org-element-quote-section-interpreter (quote-section contents)
  1094. 1457:(defun org-element-src-block-parser ()
  1095. 1541:(defun org-element-src-block-interpreter (src-block contents)
  1096. 1569:(defun org-element-table-parser ()
  1097. 1606:(defun org-element-table-interpreter (table contents)
  1098. 1620:(defun org-element-table-row-parser ()
  1099. 1648:(defun org-element-table-row-interpreter (table-row contents)
  1100. 1657:(defun org-element-verse-block-parser ()
  1101. 1687:(defun org-element-verse-block-interpreter (verse-block contents)
  1102. 1722:(defun org-element-bold-parser ()
  1103. 1746:(defun org-element-bold-interpreter (bold contents)
  1104. 1751:(defun org-element-text-markup-successor (limit)
  1105. 1776:(defun org-element-code-parser ()
  1106. 1797:(defun org-element-code-interpreter (code contents)
  1107. 1805:(defun org-element-entity-parser ()
  1108. 1836:(defun org-element-entity-interpreter (entity contents)
  1109. 1843:(defun org-element-latex-or-entity-successor (limit)
  1110. 1880:(defun org-element-export-snippet-parser ()
  1111. 1909:(defun org-element-export-snippet-interpreter (export-snippet contents)
  1112. 1916:(defun org-element-export-snippet-successor (limit)
  1113. 1937:(defun org-element-footnote-reference-parser ()
  1114. 1974:(defun org-element-footnote-reference-interpreter (footnote-reference contents)
  1115. 1985:(defun org-element-footnote-reference-successor (limit)
  1116. 2007:(defun org-element-inline-babel-call-parser ()
  1117. 2028:(defun org-element-inline-babel-call-interpreter (inline-babel-call contents)
  1118. 2042:(defun org-element-inline-babel-call-successor (limit)
  1119. 2060:(defun org-element-inline-src-block-parser ()
  1120. 2086:(defun org-element-inline-src-block-interpreter (inline-src-block contents)
  1121. 2097:(defun org-element-inline-src-block-successor (limit)
  1122. 2110:(defun org-element-italic-parser ()
  1123. 2134:(defun org-element-italic-interpreter (italic contents)
  1124. 2142:(defun org-element-latex-fragment-parser ()
  1125. 2175:(defun org-element-latex-fragment-interpreter (latex-fragment contents)
  1126. 2182:(defun org-element-line-break-parser ()
  1127. 2193:(defun org-element-line-break-interpreter (line-break contents)
  1128. 2198:(defun org-element-line-break-successor (limit)
  1129. 2215:(defun org-element-link-parser ()
  1130. 2291:(defun org-element-link-interpreter (link contents)
  1131. 2301:(defun org-element-link-successor (limit)
  1132. 2318:(defun org-element-macro-parser ()
  1133. 2353:(defun org-element-macro-interpreter (macro contents)
  1134. 2358:(defun org-element-macro-successor (limit)
  1135. 2374:(defun org-element-radio-target-parser ()
  1136. 2399:(defun org-element-radio-target-interpreter (target contents)
  1137. 2404:(defun org-element-radio-target-successor (limit)
  1138. 2418:(defun org-element-statistics-cookie-parser ()
  1139. 2439:(defun org-element-statistics-cookie-interpreter (statistics-cookie contents)
  1140. 2444:(defun org-element-statistics-cookie-successor (limit)
  1141. 2458:(defun org-element-strike-through-parser ()
  1142. 2482:(defun org-element-strike-through-interpreter (strike-through contents)
  1143. 2490:(defun org-element-subscript-parser ()
  1144. 2518:(defun org-element-subscript-interpreter (subscript contents)
  1145. 2525:(defun org-element-sub/superscript-successor (limit)
  1146. 2540:(defun org-element-superscript-parser ()
  1147. 2567:(defun org-element-superscript-interpreter (superscript contents)
  1148. 2577:(defun org-element-table-cell-parser ()
  1149. 2595:(defun org-element-table-cell-interpreter (table-cell contents)
  1150. 2600:(defun org-element-table-cell-successor (limit)
  1151. 2612:(defun org-element-target-parser ()
  1152. 2632:(defun org-element-target-interpreter (target contents)
  1153. 2637:(defun org-element-target-successor (limit)
  1154. 2651:(defun org-element-timestamp-parser ()
  1155. 2682:(defun org-element-timestamp-interpreter (timestamp contents)
  1156. 2687:(defun org-element-timestamp-successor (limit)
  1157. 2707:(defun org-element-underline-parser ()
  1158. 2731:(defun org-element-underline-interpreter (underline contents)
  1159. 2739:(defun org-element-verbatim-parser ()
  1160. 2760:(defun org-element-verbatim-interpreter (verbatim contents)
  1161. 2775:(defconst org-element-paragraph-separate
  1162. 2799:(defconst org-element-all-elements
  1163. 2808:(defconst org-element-greater-elements
  1164. 2813:(defconst org-element-all-successors
  1165. 2820:(defconst org-element-object-successor-alist
  1166. 2831:(defconst org-element-all-objects
  1167. 2838:(defconst org-element-recursive-objects
  1168. 2843:(defconst org-element-block-name-alist
  1169. 2859:(defconst org-element-affiliated-keywords
  1170. 2865:(defconst org-element-keyword-translation-alist
  1171. 2873:(defconst org-element-multiple-keywords
  1172. 2883:(defconst org-element-parsed-keywords '("AUTHOR" "CAPTION" "TITLE")
  1173. 2892:(defconst org-element-dual-keywords '("CAPTION" "RESULTS")
  1174. 2904:(defconst org-element-object-restrictions
  1175. 2955:(defconst org-element-secondary-value-alist
  1176. 2969:(defun org-element-type (element)
  1177. 2981:(defun org-element-property (property element)
  1178. 2985:(defun org-element-contents (element)
  1179. 2989:(defun org-element-restriction (element)
  1180. 3010:(defun org-element-current-element (&optional granularity special structure)
  1181. 3153:(defconst org-element--affiliated-re
  1182. 3170:(defun org-element-collect-affiliated-keywords
  1183. 3261:(defun org-element-parse-buffer (&optional granularity visible-only)
  1184. 3290:(defun org-element-parse-secondary-string (string restriction)
  1185. 3299:(defun org-element-map (data types fun &optional info first-match no-recursion)
  1186. 3404:(defun org-element-parse-elements
  1187. 3477:(defun org-element-parse-objects (beg end acc restriction)
  1188. 3538:(defun org-element-get-next-object-candidates (limit restriction objects)
  1189. 3584:(defun org-element-interpret-data (data &optional parent)
  1190. 3650:(defun org-element-interpret--affiliated-keywords (element)
  1191. 3697:(defun org-element-normalize-string (s)
  1192. 3709:(defun org-element-normalize-contents (element &optional ignore-first)
  1193. 3799:(defun org-element-at-point (&optional keep-trail)
  1194. 3891:(defsubst org-element-nested-p (elem-A elem-B)
  1195. 3900:(defun org-element-swap-A-B (elem-A elem-B)
  1196. 3944:(defun org-element-forward ()
  1197. 3966:(defun org-element-backward ()
  1198. 3989:(defun org-element-up ()
  1199. 4006:(defun org-element-down ()
  1200. 4020:(defun org-element-drag-backward ()
  1201. 4036:(defun org-element-drag-forward ()
  1202. 4070:(defun org-element-mark-element ()
  1203. 4089:(defun org-narrow-to-element ()
  1204. 4107:(defun org-element-transpose ()
  1205. 4116:(defun org-element-unindent-buffer ()
  1206. 4141:(defun org-element-fill-paragraph (&optional justify)
  1207. #+end_src
  1208. * Scratch (temporary holding pen for quick notes)
  1209. This subtree is a temporary holding place for on-the-fly notes.
  1210. Anything of importance should be given a home in the "NOTES" subtree
  1211. above.
  1212. *** Bug in elnode-dispatcher(..)
  1213. Action:
  1214. - open simple.org
  1215. - M-x iorg-launch
  1216. - open webbrower at http://localhost:8032
  1217. => NOT FOUND
  1218. The culprit for not serving the pages is here:
  1219. L 563 in elnode.el
  1220. elnode--filter(..)
  1221. ,--------------------------
  1222. | (funcall handler process)
  1223. `--------------------------
  1224. handler is simple-dispatcher-handler and is a function. Its called
  1225. with a process, but in the docs, all handlers get 'httpcon'. Therefore
  1226. process=httpcon?
  1227. Errors:
  1228. ,------------------------------------------------------
  1229. | 20120606174401:
  1230. | filter: calling handler on *elnode-webserver-proc*<3>
  1231. | <127.0.0.1:33375>
  1232. |
  1233. | 20120606174628:
  1234. | elnode--sentinel connection broken by for process
  1235. | *elnode-webserver-proc*<3> <127.0.0.1:33375>
  1236. |
  1237. | 20120606174628:
  1238. | Elnode connection dropped *elnode-webserver-proc*<3>
  1239. | <127.0.0.1:33375>
  1240. `------------------------------------------------------
  1241. Backtrace:
  1242. ,-----------------------------------------------------------------------
  1243. | If FUNCTION-404 is non-nil then it is called when no regexp is
  1244. | matched."
  1245. | (elnode-normalize-path httpcon (lambda (httpcon) (let
  1246. | ((pathinfo (elnode-http-pathinfo httpcon))) (elnode--dispatch-proc
  1247. | httpcon pathinfo url-mapping-table function-404))))) 4)
  1248. |
  1249. | elnode-dispatcher(#<process *elnode-webserver-proc*<3>
  1250. | <127.0.0.1:33392>> (("^$" . iorg-initialize-simple-handler) ("^todo/$"
  1251. | . iorg-change-state-handler)) :function-404 t)
  1252. | (progn
  1253. | (elnode-log-access "simple" httpcon) (elnode-dispatcher httpcon
  1254. | simple-urls :function-404 (elnode-send-404 httpcon)))
  1255. |
  1256. | simple-dispatcher-handler(#<process *elnode-webserver-proc*<3>
  1257. | <127.0.0.1:33392>>) funcall(simple-dispatcher-handler #<process
  1258. | *elnode-webserver-proc*<3> <127.0.0.1:33392>>)
  1259. `-----------------------------------------------------------------------
  1260. *** How to identify the Org file to act on
  1261. Each object and scene must have a unique ID, and these IDs must be
  1262. included programmatically into the name of the html form element (e.g.
  1263. the button).
  1264. All objects (instances) of one class are found as top-level entries in
  1265. one .org file, therefore the object name identifies the .org file (by
  1266. the files name, e.g.
  1267. ,-------------------------------
  1268. | bugpile-<<class-name>>-obj.org
  1269. `-------------------------------
  1270. With scenes (one scene = one .org-file) this is probably easy too,
  1271. since each scene is part of a use-case with its own controller elisp
  1272. file and one handler-method for each user action (-> and every user
  1273. action is associated with one scene), therefore the handler is
  1274. specialised to work on one .org file only and this information is
  1275. already included in the handlers name and the html-form's action-url.
  1276. *** How to identify the org-element to work on?
  1277. Since there are many instances (objects) of one class (e.g. 3456 bugs
  1278. as top-level entries in the bugpile-bugs-obj.org file), a handler (or
  1279. logic) function needs to know on which one it should act (implemented
  1280. by CUSTOM-ID attribute or headline tag?)
  1281. With regards to the web-frontend, the org-element is identified by
  1282. 'id' and/or 'class' information in the html file (or TYPE and/or
  1283. ATTRIBUTES in the parse tree). This info must be included
  1284. programmatically into the name of the html form element (e.g. the
  1285. button) for the handler to know where to act in the underlying .org file.
  1286. *** TODO Find elements by ID
  1287. Write (alternative) functions that write IDs for each Org element and
  1288. find elements by ID.
  1289. *** TODO Look for code in Erics mails how to limit line-lenght to 79
  1290. *** while-visiting-file from util.el
  1291. Question:
  1292. (save-buffer) in body saves file under its name (overwriting the
  1293. content)?
  1294. If yes, rewrite iorg-change-state-handler using while-visiting-file.
  1295. *** Further todos
  1296. Actually its ugly to put buttons behind many org elements to enable
  1297. interaction from the webinterface. I see two reasonable ways to edit a
  1298. page:
  1299. 1. Put one edit button/link on the page that trigger that the page is
  1300. newly loaded, this time each editable org-element wrapped into a
  1301. html-form&input-elem due to postprocessing. Adecuate forms are
  1302. textfields for headline text, textareas for outline text,
  1303. html-choice for todo-states (and evtl. for tags, if the allowed tag
  1304. values are predefinedm html-checkboxes for selection lists.
  1305. 2. Put a little edit symbol behind each editable element (maybe a
  1306. pen). pressing the symbol trigger a Ajax JS call, that wraps the
  1307. html element (and only this one) into a html form and sends the
  1308. replacing html without reloading the page.
  1309. *** How to deal with one html-form with many input/select Elements?
  1310. A typical html formular has many input/select fields, but only one
  1311. submit and/or rest button. Thus, the single action url points to one
  1312. single handler function that then must take care of all fields. This
  1313. would be the typical design for the 'edit bug' use case - with no
  1314. JavaScript. It would be very unusual to have a button for each field
  1315. in such a case.
  1316. With JS, each input/select field could probably send a
  1317. request 'onchange' and would be updated immediately (PicoLisp as an
  1318. example here).
  1319. *** Working on the parse tree? :iorg:
  1320. :PROPERTIES:
  1321. :html-form: http://localhost:8000/working-on-parse-tree
  1322. :html-send: POST
  1323. :html-send_ALL: POST GET # should be http-send, but that will only confuse
  1324. :html-radio_ALL: plain-list-dash plain-list-asteriks plain-list-plus plain-list-num-point plain-list-num-parenth
  1325. :html-checkbox_ALL: checkbox
  1326. :html-area_ALL: text source example quote verse center latex html ascii
  1327. :html-text_ALL: headline tags_FREE properties_FREE
  1328. :html-button_ALL: button submit reset
  1329. :html-button-pos_ALL: top-left top-right bottom-left bottom-right
  1330. :html-select_ALL: todo tags_ALIST properties_ALL
  1331. :html-checkbox: checkbox
  1332. :html-text: headline tags_FREE
  1333. :html-area: text
  1334. :html-button: submit reset
  1335. :html-button-pos: bottom-right
  1336. :html-button-value: Send edits
  1337. :END:
  1338. I still don't have a clear idea of how this could work [UPDATE: after
  1339. having written this entry, I now have a quite clear idea, I think the
  1340. approach used here looks quite promising]. Maybe something like the
  1341. use of org properties and tags as examplified in this entry?
  1342. But:
  1343. 1. org-properties and only work for outline headlines, so they must
  1344. declare what to do for the whole subtree
  1345. 2. iorg should not force a different use of org-mode elements, but
  1346. rather adapt to the common and natural use.
  1347. Therefore, check all items you agree with:
  1348. - [ ] Combine Org properties and tags for declarative iOrg programming
  1349. - [ ] Tag headlines with :iorg: for the iorg exporter (ignored
  1350. without tag)
  1351. - [ ] do not use attribute inheritance as default (the containment
  1352. relation between entries gives all the necessary info)
  1353. The order of properties is relevant, e.g. html-label belongs to the closest
  1354. html-field property on top of it. Some html attritutes like 'name' or
  1355. 'ID' can be set automatically, but for others we would need additional
  1356. user properties like:
  1357. :html-area-rows:
  1358. :html-area-cols:
  1359. :html-button-value:
  1360. etc.
  1361. A bugpage would be delivered as a static webpage (SCENE 1) with only one button
  1362. 'Edit' first (if the user is in a group that has
  1363. bug-edit-permissions). After pressing the button, the associated
  1364. handler-functions either exports another Org file with all the
  1365. necessary :html-attributes: and tags or adds these org-elements to the
  1366. existing Org view file (SCENE 2). The user is then presented a html
  1367. formular with all specified elements wrapped into input/select fields and
  1368. submit/reset buttons. The system stores the edited info and delivers
  1369. the edited page again (SCENE 1).
  1370. It seems easier to work on one file with always up-to-date content and
  1371. programmatically change the properties and tags for different scenes.
  1372. **** use Org syntax to tag Org elements
  1373. :PROPERTIES:
  1374. :html-radio: plain-list-dash
  1375. :html-label: Org Syntax?
  1376. :END:
  1377. probably properties, since we need values for action and other
  1378. properties (names can be automatically produced)
  1379. - either only properties
  1380. - or combining properties and tags
  1381. **** add functionality to the e-html export backend
  1382. :PROPERTIES:
  1383. :html-radio: plain-list-num-parenth
  1384. :html-label: New Functionality?
  1385. :END:
  1386. add new semantic export rules to the e-html backend that not only look
  1387. at the org-element type, but also at the content of the associated
  1388. org-properties.
  1389. 1) give choices: let the user define for each entry, what org-element
  1390. will be exported to which html-field
  1391. 2) be strict: decide beforehand about the org-element/html-field
  1392. association
  1393. I would say: both. Different types of plain-lists could be wrapped
  1394. into a set of radio buttons (only one selection allowed), so give the
  1395. user the choice. On the other hand, I would only allow Org checkboxes
  1396. as html checkboxes since everything else would cause confusion.
  1397. PS:
  1398. - this list will not be processed by iOrg
  1399. - while the list above will be converted into two connected
  1400. html-radio-buttons.
  1401. **** attribute inheritance
  1402. :PROPERTIES:
  1403. :html-area: text
  1404. :END:
  1405. one :iorg: tag for a top-level entry means all sub-level entries are
  1406. processed by iOrg too. the next entry will be ignored due to
  1407. the :noiorg: tag.
  1408. **** this entry will not be processed by iOrg :noiorg:
  1409. :PROPERTIES:
  1410. :CUSTOM_ID: only-static-export
  1411. :END:
  1412. What about conflicts between :html-xyz: properties and the :noiorg: tag?
  1413. I'd give priority to the :noiorg: tag.
  1414. *** Question: multivalued properties
  1415. There is a non-interactive API function to set multivalued properties,
  1416. shouldn't this function be interactive?
  1417. Are multivalued properties
  1418. supposed to look like this:
  1419. :prop: val1 val2
  1420. (once I have set _ALL for a property, I can't enter more than one
  1421. value anymore in the minibuffer)
  1422. or like this:
  1423. :prop: val1
  1424. :prop+: val2
  1425. ?
  1426. *** Question: item tags
  1427. As far as I understand org-element.el, items are list items - but what
  1428. is an item tag?
  1429. ,-----------------------------------------------------------------
  1430. | Some elements also have special properties whose value can hold
  1431. | objects themselves (i.e. an item tag or an headline name). Such
  1432. `-----------------------------------------------------------------
  1433. Tags are only possible on headlines - right?
  1434. *** org-element findings
  1435. Most of the information needed by iOrg is included in the 'headline'
  1436. element. The function
  1437. ,---------------------------------------------------------------------
  1438. | (defun org-element-parse-buffer (&optional granularity visible-only)
  1439. | "Recursively parse the buffer and return structure.
  1440. | If narrowing is in effect, only parse the visible part of the
  1441. | buffer.
  1442. |
  1443. | Optional argument GRANULARITY determines the depth of the
  1444. | recursion. It can be set to the following symbols:
  1445. |
  1446. | `headline' Only parse headlines.
  1447. | `greater-element' Don't recurse into greater elements excepted
  1448. | headlines and sections. Thus, elements
  1449. | parsed are the top-level ones.
  1450. | `element' Parse everything but objects and plain text.
  1451. | `object' Parse the complete buffer (default).
  1452. |
  1453. | When VISIBLE-ONLY is non-nil, don't parse contents of hidden
  1454. | elements.
  1455. |
  1456. | Assume buffer is in Org mode."
  1457. `---------------------------------------------------------------------
  1458. will be very usefull to get this info, especially with GRANULARITY
  1459. headline.
  1460. The function
  1461. ,--------------------------------------------------------------------------------
  1462. | (defun org-element-map (data types fun &optional info first-match no-recursion)
  1463. | "Map a function on selected elements or objects.
  1464. |
  1465. | DATA is the parsed tree, as returned by, i.e,
  1466. | `org-element-parse-buffer'. TYPES is a symbol or list of symbols
  1467. | of elements or objects types. FUN is the function called on the
  1468. | matching element or object. It must accept one arguments: the
  1469. | element or object itself.
  1470. |
  1471. | When optional argument INFO is non-nil, it should be a plist
  1472. | holding export options. In that case, parts of the parse tree
  1473. | not exportable according to that property list will be skipped.
  1474. |
  1475. | When optional argument FIRST-MATCH is non-nil, stop at the first
  1476. | match for which FUN doesn't return nil, and return that value.
  1477. |
  1478. | Optional argument NO-RECURSION is a symbol or a list of symbols
  1479. | representing elements or objects types. `org-element-map' won't
  1480. | enter any recursive element or object whose type belongs to that
  1481. | list. Though, FUN can still be applied on them.
  1482. |
  1483. | Nil values returned from FUN do not appear in the results."
  1484. `--------------------------------------------------------------------------------
  1485. Will be usefull to act on the parsed headline information.
  1486. *** Looking at the parse-tree
  1487. **** (org-element-parse-buffer)
  1488. Applied to the simple.org buffer:
  1489. #+begin_src emacs-lisp
  1490. ;;(message "%s" simple-org-parsed) (pp-buffer)
  1491. (org-data nil
  1492. (section
  1493. (:begin 1 :end 42 :contents-begin 1 :contents-end 41 :post-blank 1)
  1494. (keyword
  1495. (:key TITLE :value A simple example Org-mode file :begin 1 :end 41 :post-blank 0)))
  1496. (headline
  1497. (:raw-value This file has a top level heading :title
  1498. (This file has a top level heading)
  1499. :begin 42 :end 2038 :pre-blank 0 :hiddenp nil :contents-begin 120 :contents-end 2038 :level 1 :priority nil :tags
  1500. (bar)
  1501. :todo-keyword TODO :todo-type todo :scheduled nil :deadline nil :timestamp nil :clock nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp nil :iorg-property foo :category simple)
  1502. (section
  1503. (:begin 120 :end 2038 :contents-begin 120 :contents-end 2038 :post-blank 0)
  1504. (property-drawer
  1505. (:begin 120 :end 166 :hiddenp nil :properties
  1506. ((iorg-property . foo))
  1507. :post-blank 1))
  1508. (paragraph
  1509. (:begin 166 :end 261 :contents-begin 166 :contents-end 260 :post-blank 0)
  1510. This heading has five components. Lets see if we can edit all five
  1511. through the web interface.)
  1512. (plain-list
  1513. (:type ordered :begin 261 :end 591 :contents-begin 261 :contents-end 590 :structure
  1514. ((261 0 1. nil nil nil 327)
  1515. (327 0 2. nil nil nil 397)
  1516. (397 0 3. nil nil nil 441)
  1517. (441 0 4. nil nil nil 521)
  1518. (521 0 5. nil nil nil 590))
  1519. :post-blank 1)
  1520. (item
  1521. (:bullet 1. :begin 261 :end 327 :contents-begin 264 :contents-end 327 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1522. ((261 0 1. nil nil nil 327)
  1523. (327 0 2. nil nil nil 397)
  1524. (397 0 3. nil nil nil 441)
  1525. (441 0 4. nil nil nil 521)
  1526. (521 0 5. nil nil nil 590))
  1527. :post-blank 0)
  1528. (paragraph
  1529. (:begin 264 :end 327 :contents-begin 264 :contents-end 326 :post-blank 0)
  1530. task state, currently this is
  1531. (verbatim
  1532. (:value TODO :begin 294 :end 301 :post-blank 1))
  1533. lets change it to
  1534. (verbatim
  1535. (:value DONE :begin 319 :end 325 :post-blank 0))
  1536. .))
  1537. (item
  1538. (:bullet 2. :begin 327 :end 397 :contents-begin 330 :contents-end 397 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1539. ((261 0 1. nil nil nil 327)
  1540. (327 0 2. nil nil nil 397)
  1541. (397 0 3. nil nil nil 441)
  1542. (441 0 4. nil nil nil 521)
  1543. (521 0 5. nil nil nil 590))
  1544. :post-blank 0)
  1545. (paragraph
  1546. (:begin 330 :end 397 :contents-begin 330 :contents-end 396 :post-blank 0)
  1547. a property, try to change the
  1548. (verbatim
  1549. (:value iorg-property :begin 360 :end 376 :post-blank 1))
  1550. from
  1551. (verbatim
  1552. (:value foo :begin 381 :end 387 :post-blank 1))
  1553. to
  1554. (verbatim
  1555. (:value bar :begin 390 :end 395 :post-blank 0))
  1556. .))
  1557. (item
  1558. (:bullet 3. :begin 397 :end 441 :contents-begin 400 :contents-end 441 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1559. ((261 0 1. nil nil nil 327)
  1560. (327 0 2. nil nil nil 397)
  1561. (397 0 3. nil nil nil 441)
  1562. (441 0 4. nil nil nil 521)
  1563. (521 0 5. nil nil nil 590))
  1564. :post-blank 0)
  1565. (paragraph
  1566. (:begin 400 :end 441 :contents-begin 400 :contents-end 440 :post-blank 0)
  1567. tag, change the tag from
  1568. (verbatim
  1569. (:value bar :begin 425 :end 431 :post-blank 1))
  1570. to
  1571. (verbatim
  1572. (:value foo :begin 434 :end 439 :post-blank 0))
  1573. .))
  1574. (item
  1575. (:bullet 4. :begin 441 :end 521 :contents-begin 444 :contents-end 521 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1576. ((261 0 1. nil nil nil 327)
  1577. (327 0 2. nil nil nil 397)
  1578. (397 0 3. nil nil nil 441)
  1579. (441 0 4. nil nil nil 521)
  1580. (521 0 5. nil nil nil 590))
  1581. :post-blank 0)
  1582. (paragraph
  1583. (:begin 444 :end 521 :contents-begin 444 :contents-end 520 :post-blank 0)
  1584. heading text, allow the heading text to be edited through the web interface.))
  1585. (item
  1586. (:bullet 5. :begin 521 :end 590 :contents-begin 524 :contents-end 590 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1587. ((261 0 1. nil nil nil 327)
  1588. (327 0 2. nil nil nil 397)
  1589. (397 0 3. nil nil nil 441)
  1590. (441 0 4. nil nil nil 521)
  1591. (521 0 5. nil nil nil 590))
  1592. :post-blank 0)
  1593. (paragraph
  1594. (:begin 524 :end 590 :contents-begin 524 :contents-end 589 :post-blank 0)
  1595. body text, allow this text to be edited through the web interface)))
  1596. (paragraph
  1597. (:begin 591 :end 998 :contents-begin 591 :contents-end 997 :post-blank 0)
  1598. The five items listed about should be in rough order of difficulty.
  1599. So lets work through them in order. The simplest should be changing
  1600. the task state. We can start with a simple button on the final html
  1601. page next to the headline, the text of this button can be \"finish\",
  1602. and pressing it will change the TODO state in this Org-mode file on
  1603. the server to DONE. The implementation should look like this...)
  1604. (plain-list
  1605. (:type unordered :begin 998 :end 1469 :contents-begin 998 :contents-end 1468 :structure
  1606. ((998 0 - nil nil nil 1179)
  1607. (1179 0 - nil nil nil 1369)
  1608. (1369 0 - nil nil nil 1468))
  1609. :post-blank 1)
  1610. (item
  1611. (:bullet - :begin 998 :end 1179 :contents-begin 1000 :contents-end 1179 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1612. ((998 0 - nil nil nil 1179)
  1613. (1179 0 - nil nil nil 1369)
  1614. (1369 0 - nil nil nil 1468))
  1615. :post-blank 0)
  1616. (paragraph
  1617. (:begin 1000 :end 1179 :contents-begin 1000 :contents-end 1178 :post-blank 0)
  1618. add a function to the `org-export-html-final-hook' which will scan
  1619. through the resulting HTML and will add the html/JS necessary to
  1620. include this button on the final web page.))
  1621. (item
  1622. (:bullet - :begin 1179 :end 1369 :contents-begin 1181 :contents-end 1369 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1623. ((998 0 - nil nil nil 1179)
  1624. (1179 0 - nil nil nil 1369)
  1625. (1369 0 - nil nil nil 1468))
  1626. :post-blank 0)
  1627. (paragraph
  1628. (:begin 1181 :end 1369 :contents-begin 1181 :contents-end 1368 :post-blank 0)
  1629. start an elnode server and add two different handlers, one will
  1630. serve up this web page
  1631. (with the above hook)
  1632. , and the second will
  1633. handle the form data returned by the \"finish\" button.))
  1634. (item
  1635. (:bullet - :begin 1369 :end 1468 :contents-begin 1371 :contents-end 1468 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1636. ((998 0 - nil nil nil 1179)
  1637. (1179 0 - nil nil nil 1369)
  1638. (1369 0 - nil nil nil 1468))
  1639. :post-blank 0)
  1640. (paragraph
  1641. (:begin 1371 :end 1468 :contents-begin 1371 :contents-end 1467 :post-blank 0)
  1642. the second handler will use the `org-todo' function to change the
  1643. actual state of the heading.)))
  1644. (paragraph
  1645. (:begin 1469 :end 1708 :contents-begin 1469 :contents-end 1706 :post-blank 1)
  1646. Once this is working we should have a much better idea of what is
  1647. required to make this process work end-to-end. With luck we may have
  1648. some initial functionality by the end of next week
  1649. (some number of the
  1650. above 5 parts being editable)
  1651. .)
  1652. (paragraph
  1653. (:begin 1708 :end 1948 :contents-begin 1708 :contents-end 1946 :post-blank 1)
  1654. Lets keep all of the code implementing this in
  1655. (link
  1656. (:type file :path simple.el :raw-link file:simple.el :begin 1755 :end 1769 :contents-begin nil :contents-end nil :post-blank 0))
  1657. , once it
  1658. is written we can see what it look like and decide how to better
  1659. organize it into a directory structure which we'll want to keep for
  1660. the remainder of the iorg project.)
  1661. (paragraph
  1662. (:begin 1948 :end 2038 :contents-begin 1948 :contents-end 2037 :post-blank 0)
  1663. I've stubbed out a few functions in
  1664. (link
  1665. (:type file :path simple.el :raw-link file:simple.el :begin 1984 :end 1998 :contents-begin nil :contents-end nil :post-blank 0))
  1666. , add new functions
  1667. as they are needed.))))
  1668. #+end_src
  1669. Except for the headline section and with a keyword, all other elements
  1670. in the simple.org buffer are subelements of the greater element
  1671. headline, i.e. there are several paragraphs as subelements which
  1672. themselves contain other elements like sections, list items, verbatim
  1673. blocks, and links.
  1674. #+begin_src emacs-lisp
  1675. 34 matches for "([^:][a-z]+$" in buffer: tmp (parse-tree of simple.org)
  1676. 3:(section
  1677. 5:(keyword
  1678. 7:(headline
  1679. 13:(section
  1680. 19:(paragraph
  1681. 31:(item
  1682. 39:(paragraph
  1683. 42:(verbatim
  1684. 45:(verbatim
  1685. 48:(item
  1686. 56:(paragraph
  1687. 59:(verbatim
  1688. 62:(verbatim
  1689. 65:(verbatim
  1690. 68:(item
  1691. 76:(paragraph
  1692. 79:(verbatim
  1693. 82:(verbatim
  1694. 85:(item
  1695. 93:(paragraph
  1696. 96:(item
  1697. 104:(paragraph
  1698. 107:(paragraph
  1699. 121:(item
  1700. 127:(paragraph
  1701. 132:(item
  1702. 138:(paragraph
  1703. 145:(item
  1704. 151:(paragraph
  1705. 155:(paragraph
  1706. 163:(paragraph
  1707. 166:(link
  1708. 172:(paragraph
  1709. 175:(link
  1710. #+end_src
  1711. **** (org-element-parse-buffer 'headlines)
  1712. Applied to the NOTES buffer, here is, as an example, the result for
  1713. headline "Working on the parse tree":
  1714. #+begin_src emacs-lisp
  1715. (headline
  1716. (
  1717. :raw-value Working on the parse tree?
  1718. :title Working on the parse tree?
  1719. :begin 59510
  1720. :end 64038
  1721. :pre-blank 0
  1722. :hiddenp outline
  1723. :contents-begin 59588
  1724. :contents-end 64037
  1725. :level 3
  1726. :priority nil
  1727. :tags (iorg)
  1728. :todo-keyword nil
  1729. :todo-type nil
  1730. :scheduled nil
  1731. :deadline nil
  1732. :timestamp nil
  1733. :clock nil
  1734. :post-blank 1
  1735. :footnote-section-p nil
  1736. :archivedp nil
  1737. :commentedp nil
  1738. :quotedp nil
  1739. :html-form http://localhost:8000/working-on-parse-tree
  1740. :html-send POST
  1741. # should be http-send, but that will only confuse
  1742. :html-send-all POST GET
  1743. :html-radio-all plain-list-dash plain-list-asteriks
  1744. plain-list-plus plain-list-num-point plain-list-num-parenth
  1745. :html-checkbox-all checkbox
  1746. :html-area-all text source example quote
  1747. verse center latex html ascii
  1748. :html-text-all headline tags_FREE properties_FREE
  1749. :html-button-all button submit reset
  1750. :html-button-pos-all top-left top-right bottom-left bottom-right
  1751. :html-select-all todo tags_ALIST properties_ALL
  1752. :html-checkbox checkbox
  1753. :html-text headline tags_FREE
  1754. :html-area text
  1755. :html-button submit reset
  1756. :html-button-pos bottom-right
  1757. :html-button-value Send edits
  1758. :category bugpile
  1759. ))
  1760. #+end_src
  1761. The elements of an Org buffer (from org-element.el):
  1762. #+begin_src emacs-lisp
  1763. (defconst org-element-all-elements
  1764. '(center-block clock comment comment-block drawer dynamic-block example-block
  1765. export-block fixed-width footnote-definition headline
  1766. horizontal-rule inlinetask item keyword latex-environment
  1767. babel-call paragraph plain-list planning property-drawer
  1768. quote-block quote-section section special-block src-block table
  1769. table-row verse-block)
  1770. "Complete list of element types.")
  1771. (defconst org-element-greater-elements
  1772. '(center-block drawer dynamic-block footnote-definition headline inlinetask
  1773. item plain-list quote-block section special-block table)
  1774. "List of recursive element types aka Greater Elements.")
  1775. (defconst org-element-all-successors
  1776. '(export-snippet footnote-reference inline-babel-call inline-src-block
  1777. latex-or-entity line-break link macro radio-target
  1778. statistics-cookie sub/superscript table-cell target
  1779. text-markup timestamp)
  1780. "Complete list of successors.")
  1781. #+end_src
  1782. **** communication channel for element headline (simple.org)
  1783. *Important finding:*
  1784. Almost all information that should be wrapped into
  1785. html form fields is better taken from the communication channel than
  1786. from the html-output. First, access is easier, second, in most cases
  1787. strings should be offered as editable text in html text-fields or
  1788. textareas in Org syntax (!) - not in html syntax.
  1789. Therefore, post-processing becomes much easier: simply mark and delete
  1790. the exported static html and replace it with something like this:
  1791. #+begin_src emacs-lisp
  1792. (concat
  1793. "<input type=text ...>"
  1794. ;TODO how to work with keyword args?
  1795. (comm-chan (headline :raw-value))
  1796. "</input>"
  1797. #+end_src
  1798. Does work -- note: the com-chan itself is a plist.
  1799. #+begin_src emacs-lisp
  1800. (plist-get com-chan :author) ;; => "Thorsten Jolitz"
  1801. ;;This is the comm-chan for element headline (simple.org):
  1802. ;; (message "%s" comm-chan)
  1803. (:author Thorsten Jolitz :creator Generated by Org mode 7.8.09 in Emacs 24.0.93.1. :date nil :description nil :email tjolitz@googlemail.com :exclude-tags
  1804. (noexport)
  1805. :headline-levels 3 :keywords nil :language en :preserve-breaks nil :section-numbers t :select-tags
  1806. (export)
  1807. :time-stamp-file t :title
  1808. (A simple example Org-mode file)
  1809. :with-archived-trees headline :with-author t :with-clocks nil :with-creator comment :with-drawers nil :with-email nil :with-emphasize t :with-entities t :with-fixed-width t :with-footnotes t :with-plannings nil :with-priority nil :with-special-strings t :with-sub-superscript nil :with-toc t :with-tables t :with-tags not-in-toc :with-tasks t :with-timestamps nil :with-todo-keywords t :agenda-style :convert-org-links t :inline-images maybe :style :style-extra :style-include-default t :style-include-scripts t :html-extension html :html-postamble auto :html-preamble t :html-table-tag <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> :xml-declaration
  1810. ((html . <?xml version="1.0" encoding="%s"?>)
  1811. (php . <?php echo "<?xml version=\"1.0\" encoding=\"%s\" ?>" ?>))
  1812. :LaTeX-fragments t :mathjax :input-file /home/tj/git/bugpile/simple/simple.org :macro-modification-time
  1813. (eval
  1814. (format-time-string "$1"
  1815. '(20437 64977)))
  1816. :macro-input-file simple.org :macro-date
  1817. (eval
  1818. (format-time-string "$1"))
  1819. :macro-time
  1820. (eval
  1821. (format-time-string "$1"))
  1822. :macro-property
  1823. (eval
  1824. (org-entry-get nil "$1" 'selective))
  1825. :back-end e-html :footnote-definition-alist nil :filter-bold nil :filter-babel-call nil :filter-center-block nil :filter-clock nil :filter-code nil :filter-comment nil :filter-comment-block nil :filter-drawer nil :filter-dynamic-block nil :filter-entity nil :filter-example-block nil :filter-export-block nil :filter-export-snippet nil :filter-final-output
  1826. (org-e-html-final-function)
  1827. :filter-fixed-width nil :filter-footnote-definition nil :filter-footnote-reference nil :filter-headline
  1828. (iorg-html-wrap-headline-content-in-textarea)
  1829. :filter-horizontal-rule nil :filter-inline-babel-call nil :filter-inline-src-block nil :filter-inlinetask nil :filter-italic nil :filter-item nil :filter-keyword nil :filter-latex-environment nil :filter-latex-fragment nil :filter-line-break nil :filter-link nil :filter-macro nil :filter-paragraph nil :filter-parse-tree nil :filter-plain-list nil :filter-plain-text nil :filter-planning nil :filter-property-drawer nil :filter-quote-block nil :filter-quote-section nil :filter-radio-target nil :filter-section nil :filter-special-block nil :filter-src-block nil :filter-statistics-cookie nil :filter-strike-through nil :filter-subscript nil :filter-superscript nil :filter-table nil :filter-table-cell nil :filter-table-row nil :filter-target nil :filter-timestamp nil :filter-underline nil :filter-verbatim nil :filter-verse-block nil :parse-tree
  1830. (org-data nil
  1831. (section
  1832. (:begin 1 :end 42 :contents-begin 1 :contents-end 41 :post-blank 1)
  1833. (keyword
  1834. (:key TITLE :value A simple example Org-mode file :begin 1 :end 41 :post-blank 0)))
  1835. (headline
  1836. (:raw-value This file has a top level heading :bar: # # :title
  1837. (This file has a top level heading :bar:)
  1838. :begin 42 :end 2042 :pre-blank 0 :hiddenp outline :contents-begin 124 :contents-end 2042 :level 1 :priority nil :tags nil :todo-keyword TODO :todo-type todo :scheduled nil :deadline nil :timestamp nil :clock nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp nil :iorg-property foo :category simple)
  1839. (section
  1840. (:begin 124 :end 2042 :contents-begin 124 :contents-end 2042 :post-blank 0)
  1841. (property-drawer
  1842. (:begin 124 :end 170 :hiddenp outline :properties
  1843. ((iorg-property . foo))
  1844. :post-blank 1))
  1845. (paragraph
  1846. (:begin 170 :end 265 :contents-begin 170 :contents-end 264 :post-blank 0)
  1847. This heading has five components. Lets see if we can edit all five
  1848. through the web interface.)
  1849. (plain-list
  1850. (:type ordered :begin 265 :end 595 :contents-begin 265 :contents-end 594 :structure
  1851. ((265 0 1. nil nil nil 331)
  1852. (331 0 2. nil nil nil 401)
  1853. (401 0 3. nil nil nil 445)
  1854. (445 0 4. nil nil nil 525)
  1855. (525 0 5. nil nil nil 594))
  1856. :post-blank 1)
  1857. (item
  1858. (:bullet 1. :begin 265 :end 331 :contents-begin 268 :contents-end 331 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1859. ((265 0 1. nil nil nil 331)
  1860. (331 0 2. nil nil nil 401)
  1861. (401 0 3. nil nil nil 445)
  1862. (445 0 4. nil nil nil 525)
  1863. (525 0 5. nil nil nil 594))
  1864. :post-blank 0)
  1865. (paragraph
  1866. (:begin 268 :end 331 :contents-begin 268 :contents-end 330 :post-blank 0)
  1867. task state, currently this is
  1868. (verbatim
  1869. (:value TODO :begin 298 :end 305 :post-blank 1))
  1870. lets change it to
  1871. (verbatim
  1872. (:value DONE :begin 323 :end 329 :post-blank 0))
  1873. .))
  1874. (item
  1875. (:bullet 2. :begin 331 :end 401 :contents-begin 334 :contents-end 401 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1876. ((265 0 1. nil nil nil 331)
  1877. (331 0 2. nil nil nil 401)
  1878. (401 0 3. nil nil nil 445)
  1879. (445 0 4. nil nil nil 525)
  1880. (525 0 5. nil nil nil 594))
  1881. :post-blank 0)
  1882. (paragraph
  1883. (:begin 334 :end 401 :contents-begin 334 :contents-end 400 :post-blank 0)
  1884. a property, try to change the
  1885. (verbatim
  1886. (:value iorg-property :begin 364 :end 380 :post-blank 1))
  1887. from
  1888. (verbatim
  1889. (:value foo :begin 385 :end 391 :post-blank 1))
  1890. to
  1891. (verbatim
  1892. (:value bar :begin 394 :end 399 :post-blank 0))
  1893. .))
  1894. (item
  1895. (:bullet 3. :begin 401 :end 445 :contents-begin 404 :contents-end 445 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1896. ((265 0 1. nil nil nil 331)
  1897. (331 0 2. nil nil nil 401)
  1898. (401 0 3. nil nil nil 445)
  1899. (445 0 4. nil nil nil 525)
  1900. (525 0 5. nil nil nil 594))
  1901. :post-blank 0)
  1902. (paragraph
  1903. (:begin 404 :end 445 :contents-begin 404 :contents-end 444 :post-blank 0)
  1904. tag, change the tag from
  1905. (verbatim
  1906. (:value bar :begin 429 :end 435 :post-blank 1))
  1907. to
  1908. (verbatim
  1909. (:value foo :begin 438 :end 443 :post-blank 0))
  1910. .))
  1911. (item
  1912. (:bullet 4. :begin 445 :end 525 :contents-begin 448 :contents-end 525 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1913. ((265 0 1. nil nil nil 331)
  1914. (331 0 2. nil nil nil 401)
  1915. (401 0 3. nil nil nil 445)
  1916. (445 0 4. nil nil nil 525)
  1917. (525 0 5. nil nil nil 594))
  1918. :post-blank 0)
  1919. (paragraph
  1920. (:begin 448 :end 525 :contents-begin 448 :contents-end 524 :post-blank 0)
  1921. heading text, allow the heading text to be edited through the web interface.))
  1922. (item
  1923. (:bullet 5. :begin 525 :end 594 :contents-begin 528 :contents-end 594 :checkbox nil :counter nil :tag nil :hiddenp nil :structure
  1924. ((265 0 1. nil nil nil 331)
  1925. (331 0 2. nil nil nil 401)
  1926. (401 0 3. nil nil nil 445)
  1927. (445 0 4. nil nil nil 525)
  1928. (525 0 5. nil nil nil 594))
  1929. :post-blank 0)
  1930. (paragraph
  1931. (:begin 528 :end 594 :contents-begin 528 :contents-end 593 :post-blank 0)
  1932. body text, allow this text to be edited through the web interface)))
  1933. (paragraph
  1934. (:begin 595 :end 1002 :contents-begin 595 :contents-end 1001 :post-blank 0)
  1935. The five items listed about should be in rough order of difficulty.
  1936. So lets work through them in order. The simplest should be changing
  1937. the task state. We can start with a simple button on the final html
  1938. page next to the headline, the text of this button can be "finish",
  1939. and pressing it will change the TODO state in this Org-mode file on
  1940. the server to DONE. The implementation should look like this...)
  1941. (plain-list
  1942. (:type unordered :begin 1002 :end 1473 :contents-begin 1002 :contents-end 1472 :structure
  1943. ((1002 0 - nil nil nil 1183)
  1944. (1183 0 - nil nil nil 1373)
  1945. (1373 0 - nil nil nil 1472))
  1946. :post-blank 1)
  1947. (item
  1948. (:bullet - :begin 1002 :end 1183 :contents-begin 1004 :contents-end 1183 :checkbox nil :counter nil :tag nil :hiddenp outline :structure
  1949. ((1002 0 - nil nil nil 1183)
  1950. (1183 0 - nil nil nil 1373)
  1951. (1373 0 - nil nil nil 1472))
  1952. :post-blank 0)
  1953. (paragraph
  1954. (:begin 1004 :end 1183 :contents-begin 1004 :contents-end 1182 :post-blank 0)
  1955. add a function to the `org-export-html-final-hook' which will scan
  1956. through the resulting HTML and will add the html/JS necessary to
  1957. include this button on the final web page.))
  1958. (item
  1959. (:bullet - :begin 1183 :end 1373 :contents-begin 1185 :contents-end 1373 :checkbox nil :counter nil :tag nil :hiddenp outline :structure
  1960. ((1002 0 - nil nil nil 1183)
  1961. (1183 0 - nil nil nil 1373)
  1962. (1373 0 - nil nil nil 1472))
  1963. :post-blank 0)
  1964. (paragraph
  1965. (:begin 1185 :end 1373 :contents-begin 1185 :contents-end 1372 :post-blank 0)
  1966. start an elnode server and add two different handlers, one will
  1967. serve up this web page
  1968. (with the above hook)
  1969. , and the second will
  1970. handle the form data returned by the "finish" button.))
  1971. (item
  1972. (:bullet - :begin 1373 :end 1472 :contents-begin 1375 :contents-end 1472 :checkbox nil :counter nil :tag nil :hiddenp outline :structure
  1973. ((1002 0 - nil nil nil 1183)
  1974. (1183 0 - nil nil nil 1373)
  1975. (1373 0 - nil nil nil 1472))
  1976. :post-blank 0)
  1977. (paragraph
  1978. (:begin 1375 :end 1472 :contents-begin 1375 :contents-end 1471 :post-blank 0)
  1979. the second handler will use the `org-todo' function to change the
  1980. actual state of the heading.)))
  1981. (paragraph
  1982. (:begin 1473 :end 1712 :contents-begin 1473 :contents-end 1710 :post-blank 1)
  1983. Once this is working we should have a much better idea of what is
  1984. required to make this process work end-to-end. With luck we may have
  1985. some initial functionality by the end of next week
  1986. (some number of the
  1987. above 5 parts being editable)
  1988. .)
  1989. (paragraph
  1990. (:begin 1712 :end 1952 :contents-begin 1712 :contents-end 1950 :post-blank 1)
  1991. Lets keep all of the code implementing this in
  1992. (link
  1993. (:type file :path simple.el :raw-link file:simple.el :begin 1759 :end 1773 :contents-begin nil :contents-end nil :post-blank 0))
  1994. , once it
  1995. is written we can see what it look like and decide how to better
  1996. organize it into a directory structure which we'll want to keep for
  1997. the remainder of the iorg project.)
  1998. (paragraph
  1999. (:begin 1952 :end 2042 :contents-begin 1952 :contents-end 2041 :post-blank 0)
  2000. I've stubbed out a few functions in
  2001. (link
  2002. (:type file :path simple.el :raw-link file:simple.el :begin 1988 :end 2002 :contents-begin nil :contents-end nil :post-blank 0))
  2003. , add new functions
  2004. as they are needed.))))
  2005. #+end_src
  2006. **** how to work with org-elements from the INFO argument
  2007. Here is and informative example from Org-e-html
  2008. #+begin_src emacs-lisp
  2009. (defun org-e-html-table-first-row-data-cells (table info)
  2010. (let ((table-row
  2011. (org-element-map
  2012. table 'table-row
  2013. (lambda (row)
  2014. (unless (eq (org-element-property :type row) 'rule) row))
  2015. info 'first-match))
  2016. (special-column-p (org-export-table-has-special-column-p table)))
  2017. (if (not special-column-p) (org-element-contents table-row)
  2018. (cdr (org-element-contents table-row)))))
  2019. #+end_src
  2020. **** Post-processed info/parse-tree of simple.org
  2021. #+begin_src emacs-lisp
  2022. (
  2023. :author "Thorsten Jolitz"
  2024. :creator "Generated by Org mode 7.8.09 in Emacs 24.0.93.1."
  2025. :date nil
  2026. :description nil
  2027. :email "tjolitz@googlemail.com"
  2028. :exclude-tags ("noexport")
  2029. :headline-levels 3
  2030. :keywords nil
  2031. :language "en"
  2032. :preserve-breaks nil
  2033. :section-numbers t
  2034. :select-tags ("export")
  2035. :time-stamp-file t
  2036. :title ("A simple example Org-mode file")
  2037. :with-archived-trees headline
  2038. :with-author t
  2039. :with-clocks nil
  2040. :with-creator comment
  2041. :with-drawers nil
  2042. :with-email nil
  2043. :with-emphasize t
  2044. :with-entities t
  2045. :with-fixed-width t
  2046. :with-footnotes t
  2047. :with-plannings nil
  2048. :with-priority nil
  2049. :with-special-strings t
  2050. :with-sub-superscript nil
  2051. :with-toc t
  2052. :with-tables t
  2053. :with-tags not-in-toc
  2054. :with-tasks t
  2055. :with-timestamps nil
  2056. :with-todo-keywords t
  2057. :agenda-style ""
  2058. :convert-org-links t
  2059. :inline-images maybe
  2060. :link-home ""
  2061. :link-up ""
  2062. :style ""
  2063. :style-extra ""
  2064. :style-include-default t
  2065. :style-include-scripts t
  2066. :html-extension "html"
  2067. :html-postamble auto
  2068. :html-preamble t
  2069. :html-table-tag "<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">"
  2070. :xml-declaration (("html" . "<?xml version=\"1.0\" encoding=\"%s\"?>") ("php" . "<?php echo \"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\" ?>\"; ?>"))
  2071. :LaTeX-fragments t
  2072. :mathjax ""
  2073. :input-file "/home/tj/git/bugpile/simple/simple.org"
  2074. :footnote-definition-alist nil
  2075. :id-alist nil
  2076. :macro-modification-time "(eval (format-time-string \"$1\" '(20443 7671)))"
  2077. :macro-input-file "simple.org"
  2078. :macro-date "(eval (format-time-string \"$1\"))"
  2079. :macro-time "(eval (format-time-string \"$1\"))"
  2080. :macro-property "(eval (org-entry-get nil \"$1\" 'selective))"
  2081. :back-end iorg
  2082. :translate-alist
  2083. (
  2084. (headline . org-iorg-b-headline)
  2085. (item . org-iorg-b-item)
  2086. (paragraph . org-iorg-b-paragraph)
  2087. (plain-list . org-iorg-b-plain-list)
  2088. (section . org-iorg-b-section)
  2089. (babel-call . org-e-html-babel-call)
  2090. (bold . org-e-html-bold)
  2091. (center-block . org-e-html-center-block)
  2092. (clock . org-e-html-clock)
  2093. (code . org-e-html-code)
  2094. (comment . org-e-html-comment)
  2095. (comment-block . org-e-html-comment-block)
  2096. (drawer . org-e-html-drawer)
  2097. (dynamic-block . org-e-html-dynamic-block)
  2098. (entity . org-e-html-entity)
  2099. (example-block . org-e-html-example-block)
  2100. (export-block . org-e-html-export-block)
  2101. (export-snippet . org-e-html-export-snippet)
  2102. (fixed-width . org-e-html-fixed-width)
  2103. (footnote-definition . org-e-html-footnote-definition)
  2104. (footnote-reference . org-e-html-footnote-reference)
  2105. (headline . org-e-html-headline)
  2106. (horizontal-rule . org-e-html-horizontal-rule)
  2107. (inline-babel-call . org-e-html-inline-babel-call)
  2108. (inline-src-block . org-e-html-inline-src-block)
  2109. (inlinetask . org-e-html-inlinetask)
  2110. (italic . org-e-html-italic)
  2111. (item . org-e-html-item)
  2112. (keyword . org-e-html-keyword)
  2113. (latex-environment . org-e-html-latex-environment)
  2114. (latex-fragment . org-e-html-latex-fragment)
  2115. (line-break . org-e-html-line-break)
  2116. (link . org-e-html-link)
  2117. (macro . org-e-html-macro)
  2118. (paragraph . org-e-html-paragraph)
  2119. (plain-list . org-e-html-plain-list)
  2120. (plain-text . org-e-html-plain-text)
  2121. (planning . org-e-html-planning)
  2122. (property-drawer . org-e-html-property-drawer)
  2123. (quote-block . org-e-html-quote-block)
  2124. (quote-section . org-e-html-quote-section)
  2125. (radio-target . org-e-html-radio-target)
  2126. (section . org-e-html-section)
  2127. (special-block . org-e-html-special-block)
  2128. (src-block . org-e-html-src-block)
  2129. (statistics-cookie . org-e-html-statistics-cookie)
  2130. (strike-through . org-e-html-strike-through)
  2131. (subscript . org-e-html-subscript)
  2132. (superscript . org-e-html-superscript)
  2133. (table . org-e-html-table)
  2134. (table-cell . org-e-html-table-cell)
  2135. (table-row . org-e-html-table-row)
  2136. (target . org-e-html-target)
  2137. (template . org-e-html-template)
  2138. (timestamp . org-e-html-timestamp)
  2139. (underline . org-e-html-underline)
  2140. (verbatim . org-e-html-verbatim)
  2141. (verse-block . org-e-html-verse-block))
  2142. :filter-bold nil
  2143. :filter-babel-call nil
  2144. :filter-center-block nil
  2145. :filter-clock nil
  2146. :filter-code nil
  2147. :filter-comment nil
  2148. :filter-comment-block nil
  2149. :filter-drawer nil
  2150. :filter-dynamic-block nil
  2151. :filter-entity nil
  2152. :filter-example-block nil
  2153. :filter-export-block nil
  2154. :filter-export-snippet nil
  2155. :filter-final-output (org-e-html-final-function)
  2156. :filter-fixed-width nil
  2157. :filter-footnote-definition nil
  2158. :filter-footnote-reference nil
  2159. :filter-headline nil
  2160. :filter-horizontal-rule nil
  2161. :filter-inline-babel-call nil
  2162. :filter-inline-src-block nil
  2163. :filter-inlinetask nil
  2164. :filter-italic nil
  2165. :filter-item nil
  2166. :filter-keyword nil
  2167. :filter-latex-environment nil
  2168. :filter-latex-fragment nil
  2169. :filter-line-break nil
  2170. :filter-link nil
  2171. :filter-macro nil
  2172. :filter-paragraph nil
  2173. :filter-parse-tree nil
  2174. :filter-plain-list nil
  2175. :filter-plain-text nil
  2176. :filter-planning nil
  2177. :filter-property-drawer nil
  2178. :filter-quote-block nil
  2179. :filter-quote-section nil
  2180. :filter-radio-target nil
  2181. :filter-section nil
  2182. :filter-special-block nil
  2183. :filter-src-block nil
  2184. :filter-statistics-cookie nil
  2185. :filter-strike-through nil
  2186. :filter-subscript nil
  2187. :filter-superscript nil
  2188. :filter-table nil
  2189. :filter-table-cell nil
  2190. :filter-table-row nil
  2191. :filter-target nil
  2192. :filter-timestamp nil
  2193. :filter-underline nil
  2194. :filter-verbatim nil
  2195. :filter-verse-block nil
  2196. :parse-tree
  2197. (org-data nil
  2198. (section (
  2199. :begin 1
  2200. :end 42
  2201. :contents-begin 1
  2202. :contents-end 41
  2203. :post-blank 1
  2204. :parent #1)
  2205. (keyword (
  2206. :key "TITLE"
  2207. :value "A simple example Org-mode file"
  2208. :begin 1
  2209. :end 41
  2210. :post-blank 0
  2211. :parent #2)))
  2212. (headline (
  2213. :raw-value "This file has a top level heading"
  2214. :title ("This file has a top level heading")
  2215. :begin 42
  2216. :end 2136
  2217. :pre-blank 0
  2218. :hiddenp outline
  2219. :contents-begin 120
  2220. :contents-end 2136
  2221. :level 1
  2222. :priority nil
  2223. :tags ("iorg" "bar")
  2224. :todo-keyword "TODO"
  2225. :todo-type todo
  2226. :scheduled nil
  2227. :deadline nil
  2228. :timestamp nil
  2229. :clock nil
  2230. :post-blank 0
  2231. :footnote-section-p nil
  2232. :archivedp nil
  2233. :commentedp nil
  2234. :quotedp nil
  2235. :iorg-property "foo"
  2236. :html-form "http
  2237. ://localhost
  2238. :8000/make-me-interactive-html"
  2239. :html-button-value "Send edits"
  2240. :category "???"
  2241. :parent #1)
  2242. (section (
  2243. :begin 120
  2244. :end 2136
  2245. :contents-begin 120
  2246. :contents-end 2136
  2247. :post-blank 0
  2248. :parent #2)
  2249. (property-drawer (
  2250. :begin 120
  2251. :end 264
  2252. :hiddenp outline
  2253. :properties (("html-button-value" . "Send edits") ("html-form" . "http
  2254. ://localhost
  2255. :8000/make-me-interactive-html") ("iorg-property" . "foo"))
  2256. :post-blank 1
  2257. :parent #3))
  2258. (paragraph (
  2259. :begin 264
  2260. :end 359
  2261. :contents-begin 264
  2262. :contents-end 358
  2263. :post-blank 0
  2264. :parent #3) "This heading has five components. Lets see if we can edit all five
  2265. through the web interface.")
  2266. (plain-list (
  2267. :type ordered
  2268. :begin 359
  2269. :end 689
  2270. :contents-begin 359
  2271. :contents-end 688
  2272. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2273. :post-blank 1
  2274. :parent #3)
  2275. (item (
  2276. :bullet "1. "
  2277. :begin 359
  2278. :end 425
  2279. :contents-begin 362
  2280. :contents-end 425
  2281. :checkbox nil
  2282. :counter nil
  2283. :tag nil
  2284. :hiddenp nil
  2285. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2286. :post-blank 0
  2287. :parent #4)
  2288. (paragraph (
  2289. :begin 362
  2290. :end 425
  2291. :contents-begin 362
  2292. :contents-end 424
  2293. :post-blank 0
  2294. :parent #5) "task state, currently this is " (verbatim (
  2295. :value "TODO"
  2296. :begin 392
  2297. :end 399
  2298. :post-blank 1
  2299. :parent #6)) "lets change it to " (verbatim (
  2300. :value "DONE"
  2301. :begin 417
  2302. :end 423
  2303. :post-blank 0
  2304. :parent #6)) "."))
  2305. (item (
  2306. :bullet "2. "
  2307. :begin 425
  2308. :end 495
  2309. :contents-begin 428
  2310. :contents-end 495
  2311. :checkbox nil
  2312. :counter nil
  2313. :tag nil
  2314. :hiddenp nil
  2315. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2316. :post-blank 0
  2317. :parent #4)
  2318. (paragraph (
  2319. :begin 428
  2320. :end 495
  2321. :contents-begin 428
  2322. :contents-end 494
  2323. :post-blank 0
  2324. :parent #5) "a property, try to change the " (verbatim (
  2325. :value "iorg-property"
  2326. :begin 458
  2327. :end 474
  2328. :post-blank 1
  2329. :parent #6)) "from " (verbatim (
  2330. :value "foo"
  2331. :begin 479
  2332. :end 485
  2333. :post-blank 1
  2334. :parent #6)) "to " (verbatim (
  2335. :value "bar"
  2336. :begin 488
  2337. :end 493
  2338. :post-blank 0
  2339. :parent #6)) "."))
  2340. (item (
  2341. :bullet "3. "
  2342. :begin 495
  2343. :end 539
  2344. :contents-begin 498
  2345. :contents-end 539
  2346. :checkbox nil
  2347. :counter nil
  2348. :tag nil
  2349. :hiddenp nil
  2350. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2351. :post-blank 0
  2352. :parent #4)
  2353. (paragraph (
  2354. :begin 498
  2355. :end 539
  2356. :contents-begin 498
  2357. :contents-end 538
  2358. :post-blank 0
  2359. :parent #5) "tag, change the tag from " (verbatim (
  2360. :value "bar"
  2361. :begin 523
  2362. :end 529
  2363. :post-blank 1
  2364. :parent #6)) "to " (verbatim (
  2365. :value "foo"
  2366. :begin 532
  2367. :end 537
  2368. :post-blank 0
  2369. :parent #6)) "."))
  2370. (item (
  2371. :bullet "4. "
  2372. :begin 539
  2373. :end 619
  2374. :contents-begin 542
  2375. :contents-end 619
  2376. :checkbox nil
  2377. :counter nil
  2378. :tag nil
  2379. :hiddenp nil
  2380. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2381. :post-blank 0
  2382. :parent #4)
  2383. (paragraph (
  2384. :begin 542
  2385. :end 619
  2386. :contents-begin 542
  2387. :contents-end 618
  2388. :post-blank 0
  2389. :parent #5) "heading text, allow the heading text to be edited through the web interface."))
  2390. (item (
  2391. :bullet "5. "
  2392. :begin 619
  2393. :end 688
  2394. :contents-begin 622
  2395. :contents-end 688
  2396. :checkbox nil
  2397. :counter nil
  2398. :tag nil
  2399. :hiddenp nil
  2400. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2401. :post-blank 0
  2402. :parent #4)
  2403. (paragraph (
  2404. :begin 622
  2405. :end 688
  2406. :contents-begin 622
  2407. :contents-end 687
  2408. :post-blank 0
  2409. :parent #5) "body text, allow this text to be edited through the web interface")))
  2410. (paragraph (
  2411. :begin 689
  2412. :end 1096
  2413. :contents-begin 689
  2414. :contents-end 1095
  2415. :post-blank 0
  2416. :parent #3) "The five items listed about should be in rough order of difficulty.
  2417. So lets work through them in order. The simplest should be changing
  2418. the task state. We can start with a simple button on the final html
  2419. page next to the headline, the text of this button can be \"finish\",
  2420. and pressing it will change the TODO state in this Org-mode file on
  2421. the server to DONE. The implementation should look like this...")
  2422. (plain-list (
  2423. :type unordered
  2424. :begin 1096
  2425. :end 1567
  2426. :contents-begin 1096
  2427. :contents-end 1566
  2428. :structure ((1096 0 "- " nil nil nil 1277) (1277 0 "- " nil nil nil 1467) (1467 0 "- " nil nil nil 1566))
  2429. :post-blank 1
  2430. :parent #3)
  2431. (item (
  2432. :bullet "- "
  2433. :begin 1096
  2434. :end 1277
  2435. :contents-begin 1098
  2436. :contents-end 1277
  2437. :checkbox nil
  2438. :counter nil
  2439. :tag nil
  2440. :hiddenp outline
  2441. :structure ((1096 0 "- " nil nil nil 1277) (1277 0 "- " nil nil nil 1467) (1467 0 "- " nil nil nil 1566))
  2442. :post-blank 0
  2443. :parent #4)
  2444. (paragraph (
  2445. :begin 1098
  2446. :end 1277
  2447. :contents-begin 1098
  2448. :contents-end 1276
  2449. :post-blank 0
  2450. :parent #5) "add a function to the `org-export-html-final-hook' which will scan
  2451. through the resulting HTML and will add the html/JS necessary to
  2452. include this button on the final web page."))
  2453. (item (
  2454. :bullet "- "
  2455. :begin 1277
  2456. :end 1467
  2457. :contents-begin 1279
  2458. :contents-end 1467
  2459. :checkbox nil
  2460. :counter nil
  2461. :tag nil
  2462. :hiddenp outline
  2463. :structure ((1096 0 "- " nil nil nil 1277) (1277 0 "- " nil nil nil 1467) (1467 0 "- " nil nil nil 1566))
  2464. :post-blank 0
  2465. :parent #4)
  2466. (paragraph (
  2467. :begin 1279
  2468. :end 1467
  2469. :contents-begin 1279
  2470. :contents-end 1466
  2471. :post-blank 0
  2472. :parent #5) "start an elnode server and add two different handlers, one will
  2473. serve up this web page (with the above hook), and the second will
  2474. handle the form data returned by the \"finish\" button."))
  2475. (item (
  2476. :bullet "- "
  2477. :begin 1467
  2478. :end 1566
  2479. :contents-begin 1469
  2480. :contents-end 1566
  2481. :checkbox nil
  2482. :counter nil
  2483. :tag nil
  2484. :hiddenp outline
  2485. :structure ((1096 0 "- " nil nil nil 1277) (1277 0 "- " nil nil nil 1467) (1467 0 "- " nil nil nil 1566))
  2486. :post-blank 0
  2487. :parent #4)
  2488. (paragraph (
  2489. :begin 1469
  2490. :end 1566
  2491. :contents-begin 1469
  2492. :contents-end 1565
  2493. :post-blank 0
  2494. :parent #5) "the second handler will use the `org-todo' function to change the
  2495. actual state of the heading.")))
  2496. (paragraph (
  2497. :begin 1567
  2498. :end 1806
  2499. :contents-begin 1567
  2500. :contents-end 1804
  2501. :post-blank 1
  2502. :parent #3) "Once this is working we should have a much better idea of what is
  2503. required to make this process work end-to-end. With luck we may have
  2504. some initial functionality by the end of next week (some number of the
  2505. above 5 parts being editable).")
  2506. (paragraph (
  2507. :begin 1806
  2508. :end 2046
  2509. :contents-begin 1806
  2510. :contents-end 2044
  2511. :post-blank 1
  2512. :parent #3) "Lets keep all of the code implementing this in " (link (
  2513. :type "file"
  2514. :path "simple.el"
  2515. :raw-link "file
  2516. :simple.el"
  2517. :begin 1853
  2518. :end 1867
  2519. :contents-begin nil
  2520. :contents-end nil
  2521. :post-blank 0
  2522. :parent #4)) ", once it
  2523. is written we can see what it look like and decide how to better
  2524. organize it into a directory structure which we'll want to keep for
  2525. the remainder of the iorg project.")
  2526. (paragraph (
  2527. :begin 2046
  2528. :end 2136
  2529. :contents-begin 2046
  2530. :contents-end 2135
  2531. :post-blank 0
  2532. :parent #3) "I've stubbed out a few functions in " (link (
  2533. :type "file"
  2534. :path "simple.el"
  2535. :raw-link "file
  2536. :simple.el"
  2537. :begin 2082
  2538. :end 2096
  2539. :contents-begin nil
  2540. :contents-end nil
  2541. :post-blank 0
  2542. :parent #4)) ", add new functions
  2543. as they are needed."))))
  2544. :ignore-list nil
  2545. :headline-offset 0
  2546. :target-list nil
  2547. :headline-numbering (((headline (
  2548. :raw-value "This file has a top level heading"
  2549. :title ("This file has a top level heading")
  2550. :begin 42
  2551. :end 2136
  2552. :pre-blank 0
  2553. :hiddenp outline
  2554. :contents-begin 120
  2555. :contents-end 2136
  2556. :level 1
  2557. :priority nil
  2558. :tags ("iorg" "bar")
  2559. :todo-keyword "TODO"
  2560. :todo-type todo
  2561. :scheduled nil
  2562. :deadline nil
  2563. :timestamp nil
  2564. :clock nil
  2565. :post-blank 0
  2566. :footnote-section-p nil
  2567. :archivedp nil
  2568. :commentedp nil
  2569. :quotedp nil
  2570. :iorg-property "foo"
  2571. :html-form "http
  2572. ://localhost
  2573. :8000/make-me-interactive-html"
  2574. :html-button-value "Send edits"
  2575. :category "???"
  2576. :parent (org-data nil (section (
  2577. :begin 1
  2578. :end 42
  2579. :contents-begin 1
  2580. :contents-end 41
  2581. :post-blank 1
  2582. :parent #5)
  2583. (keyword (
  2584. :key "TITLE"
  2585. :value "A simple example Org-mode file"
  2586. :begin 1
  2587. :end 41
  2588. :post-blank 0
  2589. :parent #6))) #3))
  2590. (section (
  2591. :begin 120
  2592. :end 2136
  2593. :contents-begin 120
  2594. :contents-end 2136
  2595. :post-blank 0
  2596. :parent #3)
  2597. (property-drawer (
  2598. :begin 120
  2599. :end 264
  2600. :hiddenp outline
  2601. :properties (("html-button-value" . "Send edits") ("html-form" . "http
  2602. ://localhost
  2603. :8000/make-me-interactive-html") ("iorg-property" . "foo"))
  2604. :post-blank 1
  2605. :parent #4))
  2606. (paragraph (
  2607. :begin 264
  2608. :end 359
  2609. :contents-begin 264
  2610. :contents-end 358
  2611. :post-blank 0
  2612. :parent #4) "This heading has five components. Lets see if we can edit all five
  2613. through the web interface.")
  2614. (plain-list (
  2615. :type ordered
  2616. :begin 359
  2617. :end 689
  2618. :contents-begin 359
  2619. :contents-end 688
  2620. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2621. :post-blank 1
  2622. :parent #4)
  2623. (item (
  2624. :bullet "1. "
  2625. :begin 359
  2626. :end 425
  2627. :contents-begin 362
  2628. :contents-end 425
  2629. :checkbox nil
  2630. :counter nil
  2631. :tag nil
  2632. :hiddenp nil
  2633. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2634. :post-blank 0
  2635. :parent #5)
  2636. (paragraph (
  2637. :begin 362
  2638. :end 425
  2639. :contents-begin 362
  2640. :contents-end 424
  2641. :post-blank 0
  2642. :parent #6) "task state, currently this is " (verbatim (
  2643. :value "TODO"
  2644. :begin 392
  2645. :end 399
  2646. :post-blank 1
  2647. :parent #7)) "lets change it to " (verbatim (
  2648. :value "DONE"
  2649. :begin 417
  2650. :end 423
  2651. :post-blank 0
  2652. :parent #7)) "."))
  2653. (item (
  2654. :bullet "2. "
  2655. :begin 425
  2656. :end 495
  2657. :contents-begin 428
  2658. :contents-end 495
  2659. :checkbox nil
  2660. :counter nil
  2661. :tag nil
  2662. :hiddenp nil
  2663. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2664. :post-blank 0
  2665. :parent #5)
  2666. (paragraph (
  2667. :begin 428
  2668. :end 495
  2669. :contents-begin 428
  2670. :contents-end 494
  2671. :post-blank 0
  2672. :parent #6) "a property, try to change the " (verbatim (
  2673. :value "iorg-property"
  2674. :begin 458
  2675. :end 474
  2676. :post-blank 1
  2677. :parent #7)) "from " (verbatim (
  2678. :value "foo"
  2679. :begin 479
  2680. :end 485
  2681. :post-blank 1
  2682. :parent #7)) "to " (verbatim (
  2683. :value "bar"
  2684. :begin 488
  2685. :end 493
  2686. :post-blank 0
  2687. :parent #7)) "."))
  2688. (item (
  2689. :bullet "3. "
  2690. :begin 495
  2691. :end 539
  2692. :contents-begin 498
  2693. :contents-end 539
  2694. :checkbox nil
  2695. :counter nil
  2696. :tag nil
  2697. :hiddenp nil
  2698. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2699. :post-blank 0
  2700. :parent #5)
  2701. (paragraph (
  2702. :begin 498
  2703. :end 539
  2704. :contents-begin 498
  2705. :contents-end 538
  2706. :post-blank 0
  2707. :parent #6) "tag, change the tag from " (verbatim (
  2708. :value "bar"
  2709. :begin 523
  2710. :end 529
  2711. :post-blank 1
  2712. :parent #7)) "to " (verbatim (
  2713. :value "foo"
  2714. :begin 532
  2715. :end 537
  2716. :post-blank 0
  2717. :parent #7)) "."))
  2718. (item (
  2719. :bullet "4. "
  2720. :begin 539
  2721. :end 619
  2722. :contents-begin 542
  2723. :contents-end 619
  2724. :checkbox nil
  2725. :counter nil
  2726. :tag nil
  2727. :hiddenp nil
  2728. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2729. :post-blank 0
  2730. :parent #5)
  2731. (paragraph (
  2732. :begin 542
  2733. :end 619
  2734. :contents-begin 542
  2735. :contents-end 618
  2736. :post-blank 0
  2737. :parent #6) "heading text, allow the heading text to be edited through the web interface."))
  2738. (item (
  2739. :bullet "5. "
  2740. :begin 619
  2741. :end 688
  2742. :contents-begin 622
  2743. :contents-end 688
  2744. :checkbox nil
  2745. :counter nil
  2746. :tag nil
  2747. :hiddenp nil
  2748. :structure ((359 0 "1. " nil nil nil 425) (425 0 "2. " nil nil nil 495) (495 0 "3. " nil nil nil 539) (539 0 "4. " nil nil nil 619) (619 0 "5. " nil nil nil 688))
  2749. :post-blank 0
  2750. :parent #5)
  2751. (paragraph (
  2752. :begin 622
  2753. :end 688
  2754. :contents-begin 622
  2755. :contents-end 687
  2756. :post-blank 0
  2757. :parent #6) "body text, allow this text to be edited through the web interface")))
  2758. (paragraph (
  2759. :begin 689
  2760. :end 1096
  2761. :contents-begin 689
  2762. :contents-end 1095
  2763. :post-blank 0
  2764. :parent #4) "The five items listed about should be in rough order of difficulty.
  2765. So lets work through them in order. The simplest should be changing
  2766. the task state. We can start with a simple button on the final html
  2767. page next to the headline, the text of this button can be \"finish\",
  2768. and pressing it will change the TODO state in this Org-mode file on
  2769. the server to DONE. The implementation should look like this...")
  2770. (plain-list (
  2771. :type unordered
  2772. :begin 1096
  2773. :end 1567
  2774. :contents-begin 1096
  2775. :contents-end 1566
  2776. :structure ((1096 0 "- " nil nil nil 1277) (1277 0 "- " nil nil nil 1467) (1467 0 "- " nil nil nil 1566))
  2777. :post-blank 1
  2778. :parent #4)
  2779. (item (
  2780. :bullet "- "
  2781. :begin 1096
  2782. :end 1277
  2783. :contents-begin 1098
  2784. :contents-end 1277
  2785. :checkbox nil
  2786. :counter nil
  2787. :tag nil
  2788. :hiddenp outline
  2789. :structure ((1096 0 "- " nil nil nil 1277) (1277 0 "- " nil nil nil 1467) (1467 0 "- " nil nil nil 1566))
  2790. :post-blank 0
  2791. :parent #5)
  2792. (paragraph (
  2793. :begin 1098
  2794. :end 1277
  2795. :contents-begin 1098
  2796. :contents-end 1276
  2797. :post-blank 0
  2798. :parent #6) "add a function to the `org-export-html-final-hook' which will scan
  2799. through the resulting HTML and will add the html/JS necessary to
  2800. include this button on the final web page."))
  2801. (item (
  2802. :bullet "- "
  2803. :begin 1277
  2804. :end 1467
  2805. :contents-begin 1279
  2806. :contents-end 1467
  2807. :checkbox nil
  2808. :counter nil
  2809. :tag nil
  2810. :hiddenp outline
  2811. :structure ((1096 0 "- " nil nil nil 1277) (1277 0 "- " nil nil nil 1467) (1467 0 "- " nil nil nil 1566))
  2812. :post-blank 0
  2813. :parent #5)
  2814. (paragraph (
  2815. :begin 1279
  2816. :end 1467
  2817. :contents-begin 1279
  2818. :contents-end 1466
  2819. :post-blank 0
  2820. :parent #6) "start an elnode server and add two different handlers, one will
  2821. serve up this web page (with the above hook), and the second will
  2822. handle the form data returned by the \"finish\" button."))
  2823. (item (
  2824. :bullet "- "
  2825. :begin 1467
  2826. :end 1566
  2827. :contents-begin 1469
  2828. :contents-end 1566
  2829. :checkbox nil
  2830. :counter nil
  2831. :tag nil
  2832. :hiddenp outline
  2833. :structure ((1096 0 "- " nil nil nil 1277) (1277 0 "- " nil nil nil 1467) (1467 0 "- " nil nil nil 1566))
  2834. :post-blank 0
  2835. :parent #5)
  2836. (paragraph (
  2837. :begin 1469
  2838. :end 1566
  2839. :contents-begin 1469
  2840. :contents-end 1565
  2841. :post-blank 0
  2842. :parent #6) "the second handler will use the `org-todo' function to change the
  2843. actual state of the heading.")))
  2844. (paragraph (
  2845. :begin 1567
  2846. :end 1806
  2847. :contents-begin 1567
  2848. :contents-end 1804
  2849. :post-blank 1
  2850. :parent #4) "Once this is working we should have a much better idea of what is
  2851. required to make this process work end-to-end. With luck we may have
  2852. some initial functionality by the end of next week (some number of the
  2853. above 5 parts being editable).")
  2854. (paragraph (
  2855. :begin 1806
  2856. :end 2046
  2857. :contents-begin 1806
  2858. :contents-end 2044
  2859. :post-blank 1
  2860. :parent #4) "Lets keep all of the code implementing this in " (link (
  2861. :type "file"
  2862. :path "simple.el"
  2863. :raw-link "file
  2864. :simple.el"
  2865. :begin 1853
  2866. :end 1867
  2867. :contents-begin nil
  2868. :contents-end nil
  2869. :post-blank 0
  2870. :parent #5)) ", once it
  2871. is written we can see what it look like and decide how to better
  2872. organize it into a directory structure which we'll want to keep for
  2873. the remainder of the iorg project.")
  2874. (paragraph (
  2875. :begin 2046
  2876. :end 2136
  2877. :contents-begin 2046
  2878. :contents-end 2135
  2879. :post-blank 0
  2880. :parent #4) "I've stubbed out a few functions in " (link (
  2881. :type "file"
  2882. :path "simple.el"
  2883. :raw-link "file
  2884. :simple.el"
  2885. :begin 2082
  2886. :end 2096
  2887. :contents-begin nil
  2888. :contents-end nil
  2889. :post-blank 0
  2890. :parent #5)) ", add new functions
  2891. as they are needed."))) 1)))
  2892. #+end_src
  2893. *** Export options for subtree
  2894. Add export the following option to the function below?
  2895. #+begin_src emacs-lisp
  2896. (when (setq prop (org-entry-get (point) "IORG"))
  2897. (setq plist (plist-put plist
  2898. :html-action prop
  2899. :html-send prop
  2900. :others prop)))
  2901. #+end_src
  2902. Probably not necessary, because all properties are stored in the
  2903. 'headline' element anyway.
  2904. #+begin_src emacs-lisp
  2905. (defun org-export-get-subtree-options ()
  2906. "Get export options in subtree at point.
  2907. Assume point is at subtree's beginning.
  2908. Return options as a plist."
  2909. (let (prop plist)
  2910. (when (setq prop (progn (looking-at org-todo-line-regexp)
  2911. (or (save-match-data
  2912. (org-entry-get (point) "EXPORT_TITLE"))
  2913. (org-match-string-no-properties 3))))
  2914. (setq plist
  2915. (plist-put
  2916. plist :title
  2917. (org-element-parse-secondary-string
  2918. prop
  2919. (cdr (assq 'keyword org-element-string-restrictions))))))
  2920. (when (setq prop (org-entry-get (point) "EXPORT_TEXT"))
  2921. (setq plist (plist-put plist :text prop)))
  2922. (when (setq prop (org-entry-get (point) "EXPORT_AUTHOR"))
  2923. (setq plist (plist-put plist :author prop)))
  2924. (when (setq prop (org-entry-get (point) "EXPORT_DATE"))
  2925. (setq plist (plist-put plist :date prop)))
  2926. (when (setq prop (org-entry-get (point) "EXPORT_OPTIONS"))
  2927. (setq plist (org-export-add-options-to-plist plist prop)))
  2928. plist))
  2929. #+end_src
  2930. *** Org Exporter: important read
  2931. [[http://orgmode.org/worg/dev/org-export-reference.html][Org Export Reference]]
  2932. *** Install customized formatting functions
  2933. If the new exporter would be perfectly modularisized, i.e. some generic
  2934. exporter functions calls a specific back-end function for each greater
  2935. element, that then calls an atomic transcoding function for each
  2936. subelement, things would be very easy for us. But it isn't.
  2937. For headline todos and tags, there are such atomic transcoding
  2938. functions in org-e-html, and it was quick to write iorg variants of them
  2939. (and the results, although not functional yet, look nice, see
  2940. simple.html in the repo).
  2941. Otherwise its quite difficult to figure out where those back-end
  2942. transcoding functions are called from the generic exporter. That would
  2943. be the place to put a switch: (if :iorg: then iorg-transcode() else
  2944. org-trancode()).
  2945. At least there are 3 possibilities to put customized formatting
  2946. functions:
  2947. ,---------------------------------------------------------
  2948. | 839:(defcustom org-e-html-format-headline-function nil
  2949. | 946:(defcustom org-e-html-format-drawer-function nil
  2950. | 967:(defcustom org-e-html-format-inlinetask-function nil
  2951. `---------------------------------------------------------
  2952. So with this I could install my own format headline function:
  2953. ,------------------------------------------------------------------------
  2954. | (setq org-e-html-format-headline-function 'iorg-e-html-format-headline)
  2955. `------------------------------------------------------------------------
  2956. *** Access the input Org file
  2957. Since inside a html textfield or textarea we want to present the
  2958. editable text in Org mode syntax (don't we?), I can access to the
  2959. original Org buffer that is being exported via the comm-chan
  2960. ,---------------------------------------------------
  2961. | :input-file /home/tj/git/bugpile/simple/simple.org
  2962. `---------------------------------------------------
  2963. Since the parse-tree holds the begin/end information for all
  2964. buffer-elements, I could just copy the relevant parts from the Org
  2965. buffer into the form field, e.g.
  2966. ,--------------------------------------------------------------------
  2967. | (format "<textarea>%s</textarea> (copy-region-as-kill BEG END))
  2968. `--------------------------------------------------------------------
  2969. *** Define derived backend (bug)
  2970. Bug in (org-export-define-derived-backend iorg e-html):
  2971. #+begin_src emacs-lisp
  2972. ;;Debugger entered--Lisp error:
  2973. (wrong-type-argument symbolp
  2974. (org-iorg-wrap org-e-html-paragraph))
  2975. fboundp((org-iorg-wrap org-e-html-paragraph))
  2976. (and
  2977. (fboundp transcoder)
  2978. transcoder)
  2979. (let
  2980. ((transcoder
  2981. (cdr
  2982. (assq type
  2983. (plist-get info :translate-alist)))))
  2984. (and
  2985. (fboundp transcoder)
  2986. transcoder))
  2987. (if
  2988. (eq type
  2989. (quote org-data))
  2990. (lambda
  2991. (blob contents info)
  2992. contents)
  2993. (let
  2994. ((transcoder
  2995. (cdr
  2996. (assq type
  2997. (plist-get info :translate-alist)))))
  2998. (and
  2999. (fboundp transcoder)
  3000. transcoder)))
  3001. (let
  3002. ((type
  3003. (org-element-type blob)))
  3004. (if
  3005. (eq type
  3006. (quote org-data))
  3007. (lambda
  3008. (blob contents info)
  3009. contents)
  3010. (let
  3011. ((transcoder
  3012. (cdr
  3013. (assq type
  3014. (plist-get info :translate-alist)))))
  3015. (and
  3016. (fboundp transcoder)
  3017. transcoder))))
  3018. org-export-transcoder((...
  3019. #+end_src
  3020. *** What are the elisp library structuring conventions?
  3021. E.g.:
  3022. #+begin_src emacs-lisp
  3023. ;;; Customisation group
  3024. (def ...)
  3025. ;;;; Generic Wrapper
  3026. (def ...)
  3027. #+end_src
  3028. - is it reverse system like in Org files, i.e. ;;;; is a parent of ;;;
  3029. is a parent of ;; is a parent of ; ?
  3030. - whats the conventional top-level (;;;; or ;;;)?
  3031. - where to put the =^L= - only top-level?