Re: [Orgmode] List number resetting when using anchor tag in exported HTML
If I key in what you list below with the list numbers flush or indented only 1 space, then yes the line numbers reset to 4 5 in the org file, but if you export that to HTML, because the Anchor1 is not preceded by a comment mark, it shows up in the generated HTML as text. If the comment marker is put in place, the numbering resets but the anchor does not have any visible text, the generated a tag is wrapped in p tags and the enumeration is stopped/started around it. Is there a way to define the anchor so the numbering continues as desired in both org and generated HTML, but no text is visible in the generated HTML? --8---cut here---start-8--- * This is the first header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 Anchor1 4. This should be line number 4, but is reset by the anchor tag 5. This should be line number 5. --8---cut here---end---8--- ol li List item 1 /li li List item 2 /li li List item 3 a name=Anchor1 class=targetAnchor1/a /li li List item 4 /li li List item 5 /li /ol Table of Contents - 1 Header line 1 1 Header line 1 1. List item 1 2. List item 2 3. List item 3 Anchor1 4. List item 4 5. List item 5 On Wed, Jan 27, 2010 at 2:29 AM, Eric S Fraga ucec...@ucl.ac.uk wrote: At Tue, 26 Jan 2010 16:01:23 +, Eric S Fraga wrote: The following works just fine (at least for HTML export, not sure about anything else): --8---cut here---start-8--- * This is the first header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 Anchor1 1. This should be line number 4, but is reset by the anchor tag 2. This should be line number 5. --8---cut here---end---8--- Note the indentation in particular. (responding to my own post... sorry!) The above is a little misleading as it looks like org is confused with respect to list numbering. I should have said that the numbering above was incorrect only because I hadn't given org a chance to update the numbers. Hitting, for instance, C-cC-c on the last line gives: --8---cut here---start-8--- * This is the first header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 Anchor1 4. This should be line number 4, but is reset by the anchor tag 5. This should be line number 5. --8---cut here---end---8--- Apologies for any confusion caused! eric ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] List number resetting when using anchor tag in exported HTML
I came across an odd behavior while using org-mode to create some web pages where list numbers get reset if you insert anchor tags. Consider the following example document: * This is the first header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 #Anchor1 1. This should be line number 4, but is reset by the anchor tag 2. This should be line number 5. * This is the second header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 #+BEGIN_HTML a name='anchor2' #+END_HTML 1. This stays line number 4 2. This stays line number 5 The numbers associated with the list items are the numbers created as new items are added automatically with ALT-ENTER. After the #Anchor1 entry and the #+END_HTML, doing the Alt-Enter starts the list number back at 1. However, when this is exported to HTML, something else occurs. In the case of the #Anchor1 entry, the HTML also restarts the list number, whereas with the #+BEGIN_HTML it does not. The generated HTML looks like the below. Notice in the first section the ol tag is closed and the anchor is wrapped with paragraph tags, then ol reopens, so there is a space as well as re-starting number, but in the second case the anchor tag is inline. Further down is the actual generated HTML text. Shouldn't #anchor tags be treated in the same way as BEGIN_HTML/END_HTML? Table of Contents - 1 This is the first header line file:///tmp/burl31927GCc.html#sec-1 - 2 This is the second header line file:///tmp/burl31927GCc.html#sec-2 1 This is the first header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 1. This should be line number 4, but is reset by the anchor tag 2. This should be line number 5. 2 This is the second header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 4. This stays line number 4 5. This stays line number 5 div id=outline-container-1 class=outline-2 h2 id=sec-1span class=section-number-21/span This is the first header line /h2 div class=outline-text-2 id=text-1 ol li This is line number 1 /li li This is line number 2 /li li This is line number 3 /li /ol pa name=Anchor1 id=Anchor1/a /pol li This should be line number 4, but is reset by the anchor tag /li li This should be line number 5. ol /ol /li /ol /div /div div id=outline-container-2 class=outline-2 h2 id=sec-2span class=section-number-22/span This is the second header line /h2 div class=outline-text-2 id=text-2 ol li This is line number 1 /li li This is line number 2 /li li This is line number 3 a name='anchor2' /li li This stays line number 4 /li li This stays line number 5 /li /ol /div /div ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Error saving remember item in non org-mode buffer
Org-mode version: 6.27a I configured org-remember-templates to use a file named project.todo to hold todo entries for me. (setq org-remember-templates (Project ?p * TODO %?\n %u ~/org/project.todo bottom ))) I hadn't added the .todo extension to the auto-mode-alist so when it was loaded to be written to by the org-remember-handler, it came up by default in fundamental-mode, not org-mode. This generates an error condition that I tracked down in the org-remember.el file to line 887 in org-remember-handler: ((not (org-mode-p)) (if (eq heading 'top) (goto-char (point-min)) (goto-char (point-max)) (or (bolp) (newline))) (insert text-before-node-creation) ... The error is that text-before-node-creation apparently is a nil and the insert routine is generating an error because of it. This variable is set earlier in the handler at around line 845 but only if the text being inserted does not look like an org-outline-regexp: (unless (looking-at org-outline-regexp) ;; add a headline (setq text-before-node-creation (buffer-string)) Because my template actually does look like an org-outline-regexp (it starts with * TODO), that variable is never set and because the buffer is not in org-mode, this code is triggered using the text-buffer-node-creation. The simple work around was to add .todo files to the auto-mode-alist (or I could have changed the template), but I thought I would post a note about the problem. Jere ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Error saving remember item in non org-mode buffer
Oh, I'm familiar with the file variables and all, thanks for the tip. Since the org-remember code is written to support files that are not in org-mode as targets of remember items, it just seemed to me it shouldn't then switch back to assuming it was an org mode file simply because the text being inserted resembles a particular type of regexp. (gotta remember to hit reply-all) On Fri, Jun 19, 2009 at 4:55 AM, Sebastian Rose sebastian_r...@gmx.dewrote: As Carsten posted yesterday: http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html First line of project.todo: -*- mode: org-mode; -*- Sebastian Jere McDevitt jere.mcdev...@gmail.com writes: Org-mode version: 6.27a I configured org-remember-templates to use a file named project.todo to hold todo entries for me. (setq org-remember-templates (Project ?p * TODO %?\n %u ~/org/project.todo bottom ))) I hadn't added the .todo extension to the auto-mode-alist so when it was loaded to be written to by the org-remember-handler, it came up by default in fundamental-mode, not org-mode. This generates an error condition that I tracked down in the org-remember.el file to line 887 in org-remember-handler: ((not (org-mode-p)) (if (eq heading 'top) (goto-char (point-min)) (goto-char (point-max)) (or (bolp) (newline))) (insert text-before-node-creation) ... The error is that text-before-node-creation apparently is a nil and the insert routine is generating an error because of it. This variable is set earlier in the handler at around line 845 but only if the text being inserted does not look like an org-outline-regexp: (unless (looking-at org-outline-regexp) ;; add a headline (setq text-before-node-creation (buffer-string)) Because my template actually does look like an org-outline-regexp (it starts with * TODO), that variable is never set and because the buffer is not in org-mode, this code is triggered using the text-buffer-node-creation. The simple work around was to add .todo files to the auto-mode-alist (or I could have changed the template), but I thought I would post a note about the problem. Jere ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover Tel.: +49 (0)511 - 36 58 472 Fax: +49 (0)1805 - 233633 - 11044 mobil: +49 (0)173 - 83 93 417 Email: s.r...@emma-stil.de, sebastian_r...@gmx.de Http: www.emma-stil.de ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Use environment variable for location of templates?
I think the issue is that you need to supply a function to be invoked to create the file name. I tested your approach and found if you change the line to use a lambda function (Work Tasks ?t * TODO %U %?\n\n %i\n %a (lambda() (concat org-directory tasks.org))) seems to work. Make sure that your environment variable ends in a / so the path is constructed correctly. Jere On Fri, Jun 19, 2009 at 12:39 PM, Nathan Neff nathan.n...@gmail.com wrote: Hello, I'm a beginner at lisp/emacs, and realize this is a basic question. I would like to use an environment variable WORKDIR to specify the directory whereOh, I'm familiar with the file variables and all, thanks for the tip. Since the org-remember code is written to support files that are not in org-mode as targets of remember items, it just seemed to me it shouldn't then switch back to assuming it was an org mode file simply because the text being inserted resembles a particular type of regexp. my remember templates are located. I would like to have a template located in WORKDIR/tasks.org Using the code below, when I invoke remember-mode and press t, I get the default remember template instead of the WORKDIR/tasks.org. ;; I can get the value of WORKDIR successfully (setq org-directory (getenv WORKDIR)) (setq org-remember-templates '( (Personal ?p * %U %?\n\n %i\n %a ~/Documents/personal/ notes.org) (Work Tasks ?t * TODO %U %?\n\n %i\n %a (concat org-directory tasks.org)) )) Any help would be appreciated. Thanks, --Nate ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] In response to: .emacs works on Mac but not on Ubuntu
Apologize for having to start a new thread, but I just signed up to the mailing list and since I didn't have the original message to reply to. What may be happening is that Ubuntu has a default version of org-mode pre-installed in the primary load path directories, so that is what is being picked up and not your latest version. To check that, type dpkg --list | grep org and see if org mode was installed by the package manager. If so, just do a normal remove and see if that doesn't take care of it. Jere http://news.gmane.org/find-root.php?message_id=%3c2c75873c0906161257v9f2ad99pa80364ebb0febb50%40mail.gmail.com%3e ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Error when saving remember entries in non org-mode file types.
Org-mode version: 6.27a I configured org-remember-templates to use a file named project.todo to hold todo entries for me. (setq org-remember-templates (Project ?p * TODO %?\n %u ~/org/project.todo bottom ))) I hadn't added the .todo extension to the auto-mode-alist so when it was loaded to be written to by the org-remember-handler, it came up by default in fundamental-mode, not org-mode. This generates an error condition that I tracked down in the org-remember.el file to line 887 in the org-remember-handler function: ((not (org-mode-p)) (if (eq heading 'top) (goto-char (point-min)) (goto-char (point-max)) (or (bolp) (newline))) (insert text-before-node-creation) ... The error is that text-before-node-creation apparently is a nil and the insert routine is generating an error because of it. This variable is set earlier in the handler at around line 845 but only if the text being inserted does not look like an org-outline-regexp: (unless (looking-at org-outline-regexp) ;; add a headline (setq text-before-node-creation (buffer-string)) Because my template actually does look like an org-outline-regexp (it starts with * TODO), that variable is never set and because the buffer is not in org-mode, this code is triggered using the text-buffer-node-creation. The simple work around was to add .todo files to the auto-mode-alist (or I could have changed the template), but I thought I would post a note about it. Jere ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode