Re: [O] Org expert mode?
Thanks all for this great discussion. I close this thread now: there is a nice consensus on not taking the direction of an expert mode, and that notion was ill-defined anyway. Reading all this feedback, I feel confident that the community will be vigilant and tell me if any new feature somehow disrupts the balance we have between usability / feature-richness. Best, -- Bastien
Re: [O] dates before 1970
Hi, Nick Dokos nicholas.do...@hp.com writes: So I'd guess raising an exception might be the simplest way to deal with this. Here's a patch to try out: This patch has side-effects that Carsten have been recently exploring a bit. Those side-effects seem to depend on how Emacs has been compiled. For now it's best to stick to this restriction. Best, -- Bastien
Re: [O] if: Wrong type argument: stringp, \.\.\.
Hi Markus, Markus Heller helle...@gmail.com writes: yes, there is/was an issue with a missing :END: in that particular file. I kept adding it, but for some weird reason, it was automatically removed again. If you find a way of reproducing cases where :END: is removed without you noticing it, that'd be helpful. Thanks! -- Bastien
Re: [O] [Patch] HTML export -- Allow to change the name of the global DIV
Hi Sébastien, Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Here is a patch which allows one to change the (currently) hard-coded DIV name in which the page contents is being inserted. It currently is content, but some prefer container or wrapper. If accepted, my next patch will be to make this a per-project variable. Are there other hardcoded HTML classes/ids that the user might want to customize? If so, can we think about a simple way to define all of them at once? Thanks! -- Bastien
Re: [O] [Org-contacts] 3 2 1 go?
Hi Michael, Julien Danjou jul...@danjou.info writes: F1) csv export When writing bulk letters with LaTeX, all I need is a file with the recipients addresses in some predefined order. So it would be nice to have some export option where I can choose the properties and contacts I'd like to export and get a csv file. I think it's more an Org problem than an org-contacts one. :) Have a look at EXPERIMENTAL/org-export.el and the use of this library in EXPERIMENTAL/org-mediawiki.el: org-export.el has a filtering mechanism that allows the user to select what subtree will be exported. This can be useful in your case. HTH, -- Bastien
Re: [O] regexp link on windows problem
Hi Rafal, Rafal Florek r...@irmak.com.pl writes: The `org-insert-link' function destroys my regexp by changing all backslashes to slashes. Can you give an example? (I construct the regexp like this: (concat token1 [ \\t]* token2)) It happens only under windows, under linux it is ok. The culprit is the `expand-file-name' function, eg. for a C source line - a_struct.a_field = 1; on linux: (expand-file-name ~/file.h::/a_struct[ \\t]*\\.[ \\t]*a_field[ \\t]*=[ \\t]*1[ \\t]*;/)) becomes: /home/user/file.h::/a_struct[ \t]*\.[ \t]*a_field[ \t]*=[ \t]*1[ \t]*;/ on windows: d:/Profiles/user/Application Data/file.h::/a_struct[ /t]*/.[ /t]*a_field[ /t]*=[ /t]*1[ /t]*;/ AFAIK expand-file-name doesn't take a regexp as its argument. HTH, -- Bastien
Re: [O] dates before 1970
On Mar 11, 2011, at 9:31 AM, Bastien wrote: Hi, Nick Dokos nicholas.do...@hp.com writes: So I'd guess raising an exception might be the simplest way to deal with this. Here's a patch to try out: This patch has side-effects that Carsten have been recently exploring a bit. Those side-effects seem to depend on how Emacs has been compiled. For now it's best to stick to this restriction. But beeping or so to alert the user that a date is being changed behind his back might be a good idea. I think we should ask on emacs-devel what the official position of Emacs development is regarding non-representable times. - Carsten
Re: [O] [Patch] HTML export -- Allow to change the name of the global DIV
Hi Bastien, Bastien wrote: Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Here is a patch which allows one to change the (currently) hard-coded DIV name in which the page contents is being inserted. It currently is content, but some prefer container or wrapper. If accepted, my next patch will be to make this a per-project variable. Are there other hardcoded HTML classes/ids that the user might want to customize? If so, can we think about a simple way to define all of them at once? I did not find any other element -- yet -- that should be un-hardcoded. Maybe other people will have more info about this. Anyway, next step is to allow such element(s) to be specifiable per project, so that one can manage different projects with different CSS sources (remember the question about CSS blueprint, a couple of days ago). Best regards, Seb -- Sébastien Vauban
[O] Re: can't export custom time stamps
I tracked down this problem to this commit: 163cd58ffd6461c98a96b1b63a3cf082b2825a52 is the first bad commit commit 163cd58ffd6461c98a96b1b63a3cf082b2825a52 Author: David Maus dm...@ictsoc.de Date: Fri Jan 14 06:37:52 2011 +0100 Handle timestamps after handling links El Mon, 28 Feb 2011 21:19:27 +0100 Daniel Clemente va escriure: Hi, I cannot export custom time stamps anymore. Maybe it's due to BIND, maybe due to some other change. I attach some tests and instructions in case someone has a similar problem. Thanks -8-- #+TITLE: Custom time stamps don't work #+DATE: seen today with Org-mode version 7.4 (release_7.4.553.g83b7), Emacs 24.0.50.1 from december 2010 Open this file and use =C-c e H=. Review and accept the usage of the 2 BIND values in this buffer. See timestamps in HTML output. # This doesn't work (the time stamps remain intact: lt;2011-02-28gt; instead of 28.m2.2011): # #+BIND: org-time-stamp-custom-formats (%d.m%m.%Y . %d.m%m.%Y %H:%M) # An invalid value produces no error; try this: #+BIND: org-time-stamp-custom-formats 42 # # I think this was needed: #+BIND: org-display-custom-times t # # This works if activated: it shows the custom time stamp while editing (but not on export) # #+STARTUP: customtime One timestamp: 2011-02-28 lun. No Another: 2011-02-28 lun -8--
Re: [O] dates before 1970
Nick Dokos nicholas.do...@hp.com writes: Eric S Fraga e.fr...@ucl.ac.uk wrote: This is a sort of bug report but possibly more a curiosity... I imagine this has something to do with time 0 in Unix but I cannot seem to be able to enter any date earlier than 1 Jan 1970 using C-c! (say). However, once I have entered a date (later than that), I can use S-down on the year to get to the date I want. This seems rather inconsistent? To be precise, I get the wrong date recorded if I try: C-c ! 1968-12-10 RET (where C-c ! is =org-time-stamp-inactive=). The result is =[2011-12-10 Sat]= The bug is not so much that I cannot input dates I want but that the inactive timestamp generated is *incorrect* and yet there is no error message. Good one! The culprit is org-read-date-analyze which near the end contains this snippet of code: , | ... | (if ( year 100) (setq year (+ 2000 year))) | (if ( year 1970) (setq year (nth 5 defdecode))) ; not representable | (setq org-read-date-analyze-futurep futurep) | (list second minute hour day month year))) ` The trouble is that the caller (org-read-date) takes the result and does a round-trip through the emacs time encode/decode functions to make sure the result is sane. Dates before 1970 would break that (I get (0 9 10 26 11 2033 6 nil -18000)) so it seems it wraps around to 2033 or so). Yes, that makes sense. In addition, most callers of org-read-date call it with a non-nil to-time argument: that makes it return an emacs-encoded time (which is then manipulated as such and which I believe has to satisfy the =1970 requirement). So I'd guess raising an exception might be the simplest way to deal with this. Here's a patch to try out: This seems to work fine. Thanks. I am glad, however, that I can enter any date and then use the S-down etc. keys to get the date I want. Of course, I am not sure if anything else in org breaks as a result... org-sparse-tree with very old scheduled dates seems to work. Haven't tried much else and I would guess few would notice? Thanks again, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.27.gefa56.dirty)
[O] Re: latex export issue
Thanks Nicolas and Scot for your feedback. I think the fill approach will probably catch most issues. Stephen
Re: [O] dates before 1970
On Mar 11, 2011, at 9:47 AM, Eric S Fraga wrote: Nick Dokos nicholas.do...@hp.com writes: Eric S Fraga e.fr...@ucl.ac.uk wrote: This is a sort of bug report but possibly more a curiosity... I imagine this has something to do with time 0 in Unix but I cannot seem to be able to enter any date earlier than 1 Jan 1970 using C-c! (say). However, once I have entered a date (later than that), I can use S-down on the year to get to the date I want. This seems rather inconsistent? To be precise, I get the wrong date recorded if I try: C-c ! 1968-12-10 RET (where C-c ! is =org-time-stamp-inactive=). The result is =[2011-12-10 Sat]= The bug is not so much that I cannot input dates I want but that the inactive timestamp generated is *incorrect* and yet there is no error message. Good one! The culprit is org-read-date-analyze which near the end contains this snippet of code: , | ... | (if ( year 100) (setq year (+ 2000 year))) | (if ( year 1970) (setq year (nth 5 defdecode))) ; not representable | (setq org-read-date-analyze-futurep futurep) | (list second minute hour day month year))) ` The trouble is that the caller (org-read-date) takes the result and does a round-trip through the emacs time encode/decode functions to make sure the result is sane. Dates before 1970 would break that (I get (0 9 10 26 11 2033 6 nil -18000)) so it seems it wraps around to 2033 or so). Yes, that makes sense. In addition, most callers of org-read-date call it with a non-nil to-time argument: that makes it return an emacs-encoded time (which is then manipulated as such and which I believe has to satisfy the =1970 requirement). So I'd guess raising an exception might be the simplest way to deal with this. Here's a patch to try out: This seems to work fine. Thanks. I am glad, however, that I can enter any date and then use the S-down etc. keys to get the date I want. Of course, I am not sure if anything else in org breaks as a result... org-sparse-tree with very old scheduled dates seems to work. Haven't tried much else and I would guess few would notice? THis is exactly the point, that it depends on how Emacs was compiled, and what kind of integer is used in the date representation. Signed or unsigend, 32 or 64 bits (I think). For example, Bastien can represent dates before 1970. I cannot. I can represent dates after 2038, Bastien cannot. The work-around is to use diary sexps for dates before 1970, that seems to be safe. And then hope that by 2038, all computers will use 64 bit integers - Carsten
Re: [O] dates before 1970
Carsten Dominik carsten.domi...@gmail.com writes: [...] THis is exactly the point, that it depends on how Emacs was compiled, and what kind of integer is used in the date representation. Signed or unsigend, 32 or 64 bits (I think). Yes, that makes sense. For example, Bastien can represent dates before 1970. I cannot. I can represent dates after 2038, Bastien cannot. I can do before 1970 but not after 2038. Interesting. -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.27.gefa56)
Re: [O] regexp link on windows problem
Bastien bzg at altern.org writes: Hi Bastien, Can you give an example? So I'm trying to write a custom function to set regexp search string for c/c++ code by writing org-create-file-search-functions hook. (code #1 below ) After using the hook by issuing org-store-link in c/c++ buffer, and org-insert-link in org-mode buffer I noticed that the link has slashes instead of backslashes in my regexp. So I delved into the org-insert-link code and found out that it calls expand-file-name on the whole link (filename::regexp) which translates my regexp's backslashes to slashes. It happens only on emacs on windows, under linux it is ok. I also experimented by changing the culprit lines of org-store-link and it helped (code #2 below) but it seems to be too destructive. So I'm wondering if it is a bug that may be fixed or my way of doing it is wrong? regards, Rafal GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600) of 2010-05-08 on G41R2F1 Org-mode version 7.4 ;; code #1 (defun make-token-regexp-1() (let ((WS ) curpos-tmp) (setq curpos (point)) (beginning-of-line) (setq curpos-tmp (point)) (c-end-of-statement 1 nil t) (or (eq curline (line-number-at-pos)) (goto-char curpos)) (setq curpos (point)) (c-beginning-of-statement 1 nil t) (while (and (eq curline (line-number-at-pos)) (not (eq curpos (point (setq curpos (point)) (setq curpos-tmp (point)) (c-beginning-of-statement 1 nil t)) (or (eq curline (line-number-at-pos)) (goto-char curpos-tmp)) (setq curpos (point)) (c-forward-token-2) (while (and (eq curline (line-number-at-pos)) (not (eq curpos (point (setq linkv (concat linkv WS (regexp-quote (org-trim (buffer-substring curpos (point)) (setq curpos (point)) (and ( 0 (length linkv)) (setq WS [ \\t]*)) (c-forward-token-2))) (goto-char curpos) (end-of-line) (and linkv (setq linkv (concat linkv [ \\t]* (regexp-quote (org-trim (buffer-substring curpos (point))) linkv) (defun make-token-regexp() (interactive) (c-save-buffer-state ((savepos (point)) linkv tokens curpos (curline (line-number-at-pos))) (make-token-regexp-1) (goto-char savepos) (setq description code-1) (and linkv (setq linkv (concat / linkv /))) linkv )) (add-hook 'org-create-file-search-functions 'make-token-regexp) ;; code #2 ;; original piece of code ;; We are linking a file with relative path name. (setq path (substring (expand-file-name path) (match-end 0))) (setq path (abbreviate-file-name (expand-file-name path))) ;;my changes ;; We are linking a file with relative path name. (setq path (substring (expand-file-name path) (match-end 0))) (let ((path-1) (search-1)) (if (string-match ::\\(.+\\)\\' path) (progn (setq search-1 (match-string 1 path) path-1 (substring path 0 (match-beginning 0)) path (concat (abbreviate-file-name (expand-file-name path-1)) :: search-1 (setq path (abbreviate-file-name (expand-file-name path)))
[O] [Workaround] Escaping false list items
Hi, Back to the problem with e.g. 2011. being interpreted as a list item when it happens to be at the beginning of a line: After a bad experience with a document that had a lot of those, I came up with this function to easily escape false list items. Maybe some of you will find it helpful, or better yet, have suggestions for improvements. (defun my/org-list-escape-nonitems () (interactive) (let ((nonitem [0-9]\\{4\\}) ; Unlikely list numbers ; here: four-digit numbers (years) (term (cond ((eq org-plain-list-ordered-item-terminator t) [.)]) ((= org-plain-list-ordered-item-terminator ?\)) )) ((= org-plain-list-ordered-item-terminator ?.) \\.) (t [.)] (goto-char (point-min)) (query-replace-regexp (concat ^\\( nonitem \\)\\( term \\) ) (concat \\1\\2 (string ?\240) It calls query-replace-regexp, so the user can confirm each replacement interactively, on apparent list items where the numbering matches the NONITEM regexp. If confirmed, it replaces the space after the item terminator with a non-breaking space. In the code above, NONITEM is simply hard-coded as four digits, matching years. It could be made a customizable variable. The adventurous might want to call it automatically before export, though currently this does not work well with subtree exports: (add-hook 'org-export-first-hook 'my/org-list-escape-nonitems) Feedback welcome. Yours, Christian
[O] Re: [Workaround] Escaping false list items
Hello, Christian Moe m...@christianmoe.com writes: Back to the problem with e.g. 2011. being interpreted as a list item when it happens to be at the beginning of a line: Did you read my suggestion to avoid filling at such positions? While it won't help on existing documents, I think it is a more general approach to the problem. Regards, -- Nicolas
Re: [O] dates before 1970
Hi, I asked in emacs-develop and got: by Andreas Schwabon 2011-03-11T13:19:43+00:00. If your system's time-t is a signed 32-bit integer then your system is able to represent times between 1901-12-13 20:45:53 UTC and 2038-01-19 03:14:07 UTC. If your system's time-t is an unsigned 32-bit integer your system can represent times between 1970-01-01 00:00:00 UTC and 2106-02-07 06:28:15 UTC. Andreas. So I am not sure what 64 bit systems do now or in the future, but it seems that we need to live with a restriction for now. Maybe this should be documented somewhere. - Carsten On Mar 11, 2011, at 1:00 PM, Eric S Fraga wrote: Carsten Dominik carsten.domi...@gmail.com writes: [...] THis is exactly the point, that it depends on how Emacs was compiled, and what kind of integer is used in the date representation. Signed or unsigend, 32 or 64 bits (I think). Yes, that makes sense. For example, Bastien can represent dates before 1970. I cannot. I can represent dates after 2038, Bastien cannot. I can do before 1970 but not after 2038. Interesting. -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.27.gefa56) - Carsten
[O] Wiki for the next OrgCamp in Paris (April 9th)
Hello, some parisian Orgers are gathering for a new OrgCamp in Paris * Where: FPH, 38 rue Saint Sabin, 75011 Paris * When: April 9th 2011 10mm-8pm * Participants: please register on the event's website Here is the wiki for this event (in French): http://www.lifehacking.fr/mediawiki/index.php/OrgCampAvril2011 Fred.
Re: [O] Clock table not responding to :tags?
John Hendy jw.he...@gmail.com wrote: ... Well, so far I should only have one version? Or not since I installed emacs as well. I guess that could have overwritten some of the default packages or mingled with them? Even so, could I just add a: ,--- | (add-to-list 'load-path ~/.elisp/org.git/lisp) `--- and be alright? Yes, although you might want to add the contrib/lisp directory too if you are using anything from there. You can use locate-library to make sure that emacs is loading a file from the place where you expect it to: M-x locate-library RET org RET M-x locate-library RET org-clock RET and so on for each file (although it would be pretty weird if it loaded some files from one place and some from another). Also take a very careful look at your load-path. That is my first knee-jerk response every time I see weirdness. Nick
Re: [O] Clock table not responding to :tags?
On Fri, Mar 11, 2011 at 10:07 AM, Nick Dokos nicholas.do...@hp.com wrote: John Hendy jw.he...@gmail.com wrote: ... Well, so far I should only have one version? Or not since I installed emacs as well. I guess that could have overwritten some of the default packages or mingled with them? Even so, could I just add a: ,--- | (add-to-list 'load-path ~/.elisp/org.git/lisp) `--- and be alright? Yes, although you might want to add the contrib/lisp directory too if you are using anything from there. You can use locate-library to make sure that emacs is loading a file from the place where you expect it to: Yeah, sorry... I've just been posting the explicitly relevant stuff. I have contrib/lisp in there as well for other stuff as well as the scripts dir for ditta (I think that's why that's there). M-x locate-library RET org RET M-x locate-library RET org-clock RET That's *fantastic*. Had no idea. I will definitely try that. Specifically (kicking myself as I write this and realize what a dummy I was), I want to remove the loading of ~/.elisp/org.git, restart emacs and see what it's using. Then I want to check my prefix in the orgmode Makefile. Again, shivering as I write this, I realize I never checked that and am now thinking that 'make install' installed to /usr perhaps while all the default directories are, say, at /usr/local. Not sure, but I'm wondering about that now. and so on for each file (although it would be pretty weird if it loaded some files from one place and some from another). Also take a very careful look at your load-path. That is my first knee-jerk response every time I see weirdness. Thanks for the input -- it's much appreciated. John Nick
Re: [O] dates before 1970
Eric S Fraga e.fr...@ucl.ac.uk wrote: So I'd guess raising an exception might be the simplest way to deal with this. Here's a patch to try out: This seems to work fine. Thanks. Maybe not - see Bastien's mail. I am glad, however, that I can enter any date and then use the S-down etc. keys to get the date I want. Of course, I am not sure if anything else in org breaks as a result... org-sparse-tree with very old scheduled dates seems to work. Haven't tried much else and I would guess few would notice? That's the problem: one does not know whether the way from one date to another passes through the quicksand of internal emacs time. And as you say, any effects might escape notice. Nick
Re: [O] dates before 1970
Carsten Dominik carsten.domi...@gmail.com wrote: THis is exactly the point, that it depends on how Emacs was compiled, and what kind of integer is used in the date representation. Signed or unsigend, 32 or 64 bits (I think). For example, Bastien can represent dates before 1970. I cannot. I can represent dates after 2038, Bastien cannot. The work-around is to use diary sexps for dates before 1970, that seems to be safe. And then hope that by 2038, all computers will use 64 bit integers But it's even more than that, no? Emacs's time implementation (current-time, encode/decode etc) would have to change. In fact, this might be the most significant limitation right now: the values they pass around are (hi16 lo16 ms) so they assume that time values are 32 bits, no matter what the underlying implementation says. I use 64-bit Linux on an x86-64 laptop and my time_t is 64 bits (but I don't know if it's signed or unsigned). Time for some experimentation I guess... Nick
[O] The Answer to Life the Universe and Caching Your Passwords (it's not,42).
A light hearted look at getting Emacs to cache your encryption passwords. Today I decided to try out the git version of gnus. After cloning the repo and setting my .emacs to load gnus, I was prompted to enter the details for my various email accounts, currently stored in my .authinfo file. Gnus then saved these in a .authinfo.gpg file, which astute reader may realize is a gpg encrypted file. Good, I thought that makes my system a bit more secure. Gnus then prompted me for the pas phrase for my .authinfo.gpg file for each of my accounts. When you have three or more accounts repeated typing Richard Stallman has a very long beard gets a bit repetitive. Less patient users may change their password to gnus, 1234, or some other four letter word not suitable for the eyes of emacs org-mode readers. After perusing various Emacs mailing lists, which had various answers, many from denizens of this list; I worked out the gnus was using symmetric encryption. I added (setq epa-file-cache-passphrase-for-symmetric-encryption t), but still no joy. Finally I found I needed to add (setenv GPG_AGENT_INFO nil). Joy of joys I only had to type Richard Stallman... once. I went and had a cup of tea. When I got back I needed to open the org gpg file with all my passwords. I was prompted for my password. Since I had only opened the file a few minutes previously and gnupg-agent normally cached my passwords for a couple of hours, I was surprised. Further investigation revealed what many readers already know that setenv GPG_AGENT_INFO nil had disabled gnupg-agent. My password file is encrypted using public key encryption, not symmetric encryption, so I couldn't have password caching enabled for both types of encryption. I had to choose between typing in Richard Stallman has a very long beard or Wilkesley cows only produce white milk multiple times. Deep gloom descended. Suddenly a ray of sunshine illuminated the problem. What if I could persuade gnus to use public key encryption? A bit of digging in Emacs customization revealed I could do something like (setq auth-source-gpg-encrypt-to (quote (ABC124))), where ABC1234 is they key I use to encrypt my password file. This means that gnus and org both use public key encryption and I can now use gnupg-agent. So I only have to type in Wilkesley cows only produce white milk once and I can both read my email and open my passwords file. Happiness restored. Ian.
[O] [Bug] HTML export hangs on certain characters
Hi Im trying to do an html export of an org file and it keeps hanging / freezing emacs. I have narrowed it down to this: * This headline exports fine * But when the headline includes an it does not I have verified this on master as of 10 minutes ago. -- -Rehan
[O] [PATCH] Fix for infinite loop in org-html-protect
When I export the following as HTML, emacs hangs in org-html-protect: #+begin_src org #+end_src The attached patch fixes the problem for me. Thanks, Kim. From cfb1ccb6f9cfd84530c73b7f72d686a2062b3c3b Mon Sep 17 00:00:00 2001 From: Kim Rutherford km...@cam.ac.uk Date: Fri, 11 Mar 2011 16:44:09 + Subject: [PATCH] Fix infinite loop in org-html-protect --- lisp/org-html.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index c60c90d..2312b21 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -2186,7 +2186,7 @@ Possible conversions are set in `org-export-html-protect-char-alist'. (let ((start 0)) (while (string-match (car c) s start) (setq s (replace-match (cdr c) t t s) - start (match-beginning 0) + start (1+ (match-beginning 0)) s)) (defun org-html-expand (string) -- 1.7.1
Re: [O] [Bug] HTML export hangs on certain characters
Hi Rehan, Rehan Iftikhar rehan.iftik...@gmail.com writes: Im trying to do an html export of an org file and it keeps hanging / freezing emacs. I have narrowed it down to this: * This headline exports fine * But when the headline includes an it does not I have verified this on master as of 10 minutes ago. Fixed, thanks. -- Bastien
Re: [O] [Bug] HTML export hangs on certain characters
Rehan Iftikhar rehan.iftik...@gmail.com wrote: Hi Im trying to do an html export of an org file and it keeps hanging / freezing emacs. I have narrowed it down to this: * This headline exports fine * But when the headline includes an it does not I have verified this on master as of 10 minutes ago. I can reproduce this in latest git. Works fine in Org-mode version 7.5 (release_7.5.8.g06f3.dirty) Seems like org-html-protect acquired an infinite loop: it rescans the replacement amp;, find another and goes on ad-infinitum. Nick
[Accepted] [O] Fix for infinite loop in org-html-protect
Patch 674 (http://patchwork.newartisans.com/patch/674/) is now Accepted. Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C19834.23619.813886.886825%40gargle.gargle.HOWL%3E Here is the original message containing the patch: Content-Type: text/plain; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [O] Fix for infinite loop in org-html-protect Date: Fri, 11 Mar 2011 22:30:43 - From: Kim Rutherford km...@cam.ac.uk X-Patchwork-Id: 674 Message-Id: 19834.23619.813886.886...@gargle.gargle.howl To: emacs-orgmode@gnu.org When I export the following as HTML, emacs hangs in org-html-protect: #+begin_src org #+end_src The attached patch fixes the problem for me. Thanks, Kim. From cfb1ccb6f9cfd84530c73b7f72d686a2062b3c3b Mon Sep 17 00:00:00 2001 From: Kim Rutherford km...@cam.ac.uk Date: Fri, 11 Mar 2011 16:44:09 + Subject: [PATCH] Fix infinite loop in org-html-protect --- lisp/org-html.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index c60c90d..2312b21 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -2186,7 +2186,7 @@ Possible conversions are set in `org-export-html-protect-char-alist'. (let ((start 0)) (while (string-match (car c) s start) (setq s (replace-match (cdr c) t t s) - start (match-beginning 0) + start (1+ (match-beginning 0)) s)) (defun org-html-expand (string)
Re: [O] [PATCH] Fix for infinite loop in org-html-protect
Hi Kim, Kim Rutherford km...@cam.ac.uk writes: When I export the following as HTML, emacs hangs in org-html-protect: #+begin_src org #+end_src The attached patch fixes the problem for me. Applied -- your patch is far better than the one I pushed, thanks. -- Bastien
Re: [O] [Bug] HTML export hangs on certain characters
I verified the fix, thanks. On Fri, Mar 11, 2011 at 9:35 AM, Nick Dokos nicholas.do...@hp.com wrote: Rehan Iftikhar rehan.iftik...@gmail.com wrote: Hi Im trying to do an html export of an org file and it keeps hanging / freezing emacs. I have narrowed it down to this: * This headline exports fine * But when the headline includes an it does not I have verified this on master as of 10 minutes ago. I can reproduce this in latest git. Works fine in Org-mode version 7.5 (release_7.5.8.g06f3.dirty) Seems like org-html-protect acquired an infinite loop: it rescans the replacement amp;, find another and goes on ad-infinitum. Nick -- -Rehan
[O] Re: dates before 1970
Hi Carsten, orgers, * Carsten Dominik carsten.domi...@gmail.com [11. Mar. 2011]: I asked in emacs-develop and got: by Andreas Schwabon 2011-03-11T13:19:43+00:00. If your system's time-t is a signed 32-bit integer then your system is able to represent times between 1901-12-13 20:45:53 UTC and 2038-01-19 03:14:07 UTC. If your system's time-t is an unsigned 32-bit integer your system can represent times between 1970-01-01 00:00:00 UTC and 2106-02-07 06:28:15 UTC. Therefore it should be possible to either use a pre 1970 date or a post 2038 date, but: If I type (as Eric suggested in the starting message of this thread) C-c ! 1968-12-10 RET I get [2011-12-10 Sa] (same as Eric). But if I type C-c ! 2040 I get an error message specified time not representable. So for me it's neither--nor but in different ways. The second way of failing is much better because I get feedback. Ciao, Gregor -- -... --- .-. . -.. ..--.. ...-.-
Re: [O] Re: [Workaround] Escaping false list items
Here are 2 alternatives. The second, for me, is probably pretty bulletproof (pun intended after it was made :)). I like solution 2. Solution 1: Is it the case that you have text at the same column on the line before? Perhaps that could be considered invalid for lists. Of course there will still be problems with e.g. partial lists of references. And perhaps this will break people's habits. Not sure I like this solution, but thought to mention it. Solution 2: 1) I always start my lists at column 2, without exception. 2) I always have paragraphs at column 0, unless they are in a list or are manual insets (such as quotes). I am willing to put manual quotes some place other than column 2. All that's required is for the list code to (optionally): 1) start lists at column 2 2) never assume anything at column 0 is a list item Perhaps a combination of solutions would work. Samuel -- AIDS 2.0 is here now: http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html I support the Whittemore-Peterson Institute (WPI) === I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV paper.
Re: [O] Re: [Workaround] Escaping false list items
On 3/11/11 4:20 PM, Nicolas wrote: Hello, Christian Moe mail@... writes: Back to the problem with e.g. 2011. being interpreted as a list item when it happens to be at the beginning of a line: Did you read my suggestion to avoid filling at such positions? While it won't help on existing documents, I think it is a more general approach to the problem. I must have missed that, sorry. I remember you suggesting either to use right-paren as item terminator, or manually insert a non-breaking space after the dot. Did you have a particular trick in mind, or just to avoid filling manually? I tend to have auto-fill on by default. The little utility function I posted makes the non-breaking-space solution more workable for me. It wasn't intended as a contribution to Org-mode, just as something some people might want to put in their .emacs and try out, so I didn't put much thought into generalizing it. Yours, Christian
[O] Re: [Workaround] Escaping false list items
Christian Moe m...@christianmoe.com writes: Did you have a particular trick in mind, or just to avoid filling manually? I tend to have auto-fill on by default. I meant automatically. Please have a look at: http://article.gmane.org/gmane.emacs.orgmode/39149 Regards, -- Nicolas
Re: [Accepted] [O] Fix for infinite loop in org-html-protect
On 3/11/11 12:38 PM, Bastien Guerry wrote: --- lisp/org-html.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index c60c90d..2312b21 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -2186,7 +2186,7 @@ Possible conversions are set in `org-export-html-protect-char-alist'. (let ((start 0)) (while (string-match (car c) s start) (setq s (replace-match (cdr c) t t s) - start (match-beginning 0) + start (1+ (match-beginning 0)) s)) (defun org-html-expand (string) I think there might be a second bug in that function that I had to fix myself. I don't know the proper way to create/submit a patch, but instead of this: (while (setq c (pop cl)) (while (string-match (car c) s start) I think you need this: (while (setq c (pop cl)) (setq start 0) (while (string-match (car c) s start) i.e. you need to start over at the beginning of the line each time you go through the list of protected chars, or else you'll start from the last replacement location. Scott
Re: [O] Release 7.5
Even though I stay at the shallow end of the org-mode pool, using it mostly for note taking, I've already noticed some subtle improvements in usability. My compliments to the chefs. -- Le
Re: [Accepted] [O] Fix for infinite loop in org-html-protect
Scott Frazer frazer.sc...@gmail.com wrote: On 3/11/11 12:38 PM, Bastien Guerry wrote: --- lisp/org-html.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index c60c90d..2312b21 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -2186,7 +2186,7 @@ Possible conversions are set in `org-export-html-protect-char-alist'. (let ((start 0)) (while (string-match (car c) s start) (setq s (replace-match (cdr c) t t s) - start (match-beginning 0) + start (1+ (match-beginning 0)) s)) (defun org-html-expand (string) I think there might be a second bug in that function that I had to fix myself. I don't know the proper way to create/submit a patch, but instead of this: (while (setq c (pop cl)) (while (string-match (car c) s start) I think you need this: (while (setq c (pop cl)) (setq start 0) (while (string-match (car c) s start) i.e. you need to start over at the beginning of the line each time you go through the list of protected chars, or else you'll start from the last replacement location. There is a (let ((start 0))... around the (while (string-match...)..) and inside the outer loop, so every time the inner loop is finished, start is recreated and initialized to 0 for the next iteration of the outer loop. At least, that's the case in latest git. Nick
Re: [O] org-contacts and column mode
if I have turned on column mode in the buffer visiting contacts.org via org-columns (C-x C-x C-c) then, when trying to tab-complete in a *Message* buffer To: George tab in the event that George identifies an entry in the file contacts.org, I get an error report in the minibuffer: Text is read-only: Type `e' to edit property If I quit column mode in the appropriate buffer, then tab-completion resumes working correctly. Julien Unable to reproduce. Maybe M-x toggle-debug-on-error would Julien throw a backtrace? Well, I didn't manage to trigger a backtrace. But I did observe the following: the error report seems to appear only if org-contacts-files contains more than one contact file. e.g. when this line , | (custom-set-variables | ... | '(org-contacts-files (quote | (/home/george/org-files/contacts/contacts.org | /home/george/org-files/contacts/contacts-math.org | /home/george/org-files/contacts/contacts-family.org | /home/george/org-files/contacts/contacts-friends.org | /home/george/org-files/contacts/contacts-tufts.org))) | ... | ) ` appears in custom.el, I see the error, but when it is replaced by , | (custom-set-variables | ... | '(org-contacts-files (quote | (/home/george/org-files/contacts/contacts.org)) | ... | ) ` I don't. -- George McNinch gmcni...@gmail.com http://gmcninch.math.tufts.edu
Re: [Accepted] [O] Fix for infinite loop in org-html-protect
On Fri, Mar 11, 2011 at 1:55 PM, Nick Dokos nicholas.do...@hp.com wrote: Scott Frazer frazer.sc...@gmail.com wrote: There is a (let ((start 0))... around the (while (string-match...)..) and inside the outer loop, so every time the inner loop is finished, start is recreated and initialized to 0 for the next iteration of the outer loop. At least, that's the case in latest git. Okay, it must have already been fixed then. I am on the 7.5 tag, so I should probably move to the latest. Scott
[O] Elisp Primer?
I am wanting to learn about/have a reference guide for elisp. I am a huge fan of the O'Reilly books for the other languages I have worked with but I was wondering if someone knew of an online repository (possibly like Worg) that might be available to pull onto my system that I could read right in emacs. Thanks, Matt
[O] Bug: Invalid HTML with email:t export option [7.5 (release_7.5.27.gefa56)]
Hi Bastien, The following org file generates invalid HTML. The class name includes the full email address and '@' is not an allowed character in the HTML class name. Here's an org file for testing --8---cut here---start-8--- #+OPTIONS: email:t * Test file This is a test --8---cut here---end---8--- If you export this with C-c C-e H you get invalid HTML. This was caused by commit --8---cut here---start-8--- commit 595379852221002726a1a1dc03ee4aebdd677423 Author: Bastien Guerry b...@altern.org Date: Fri Mar 4 16:32:10 2011 +0100 Clean handling :html-pre/postamble options wrt author/email/creator-info. * org-html.el (org-export-html-preamble) (org-export-html-postamble): now default to `nil'. (org-export-as-html): when :html-pre/postamble is nil, fall back on the default pre/postamble, which depends on the :author-info, :email-info, :creator-info options. * org-exp.el (org-export-plist-vars): reorder the alist. * org.texi (Export options): better document :html-preamble and :html-postamble: setting these options will override any :author-info, :email-info and :creator-info options for the HTML export. --8---cut here---end---8--- and the problem is line 1708 in org-html.el Maybe change @ to -at- in the classname or remove the email value entirely? I'm not sure what the intention was for including the email value in the class name for this. Regards, Bernt Emacs : GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11 on raven, modified by Debian Package: Org-mode version 7.5 (release_7.5.27.gefa56) -- Bernt
Re: [O] Elisp Primer?
On Fri, Mar 11, 2011 at 1:26 PM, Matthew Sauer improv.philoso...@gmail.com wrote: I am wanting to learn about/have a reference guide for elisp. I am a huge fan of the O'Reilly books for the other languages I have worked with but I was wondering if someone knew of an online repository (possibly like Worg) that might be available to pull onto my system that I could read right in emacs. Completely out of my element, but in searching I found: - references on this from the EmacsWiki: http://www.emacswiki.org/emacs/LearnEmacsLisp - an intro to emacs lisp programming in several formats: http://www.gnu.org/software/emacs/emacs-lisp-intro/ I'd be interested in this as well; perhaps others will have better suggestions or can share how they got into it. Best regards, John Thanks, Matt
[O] Publishing notes to a website
All, I'm looking for advice on ways people are publishing their org notes to a website. So far I've looked at blorgit and it's really nice, but the dependency for a backend emacs session and running through sinatra makes me wary of putting it out on my server for the world. 1. What methods are people using to publish their org notes? 2. Anyone have sample sites that I can see what the output looks like? Thanks in advance. -- Kyle Sexton
Re: [O] Elisp Primer?
*I strongly agree with John Hendy: Robert Chassel's An Introduction to Programming in Emacs Lisp: http://www.gnu.org/software/emacs/emacs-lisp-intro/ --should be mastered first (it should be the first book @everyone@ reads.) *O'Reilly's Safari has online books for $20/month you can put 10 books on your online bookshelf--you can put Learning EMACS and/or EMACS Extensions on your bookshelf and then download the .pdf and use DOCVIEW to read in EMACS and/or use the TEXINFO file and read it in EMACS and/or put your cursor on something you don't understand and type Mx man and/or do pdf2txt on the .pdf and put that into emacs: http://oreilly.com/catalog/9781565922617/ **Could do wget -m -np http://www.gnu.org/software/emacs/manual/html_node/elisp/index.html; and put the reference manual on you're hard-drive--then use Mx dired or a browser to browse it. *Remember also, you can extend ELISP with COMMON LISP using the cl package: Notably, the cl package implements a fairly large subset of Common Lisp. (see http://en.wikipedia.org/wiki/Emacs_Lisp) --then use some COMMOM LISP: http://cl-cookbook.sourceforge.net/emacs-ide.html *In grad school I downloaded the reference at: http://www.lispworks.com/documentation/HyperSpec/Front/index.htm ---made a mirror of the entire doc tree on my hard-drive---it worked as a great reference in alpha order (for common lisp--but you can always extend elisp if you see something you like): http://www.lispworks.com/documentation/HyperSpec/Front/X_Master.htm On Fri, Mar 11, 2011 at 2:26 PM, Matthew Sauer improv.philoso...@gmail.com wrote: I am wanting to learn about/have a reference guide for elisp. I am a huge fan of the O'Reilly books for the other languages I have worked with but I was wondering if someone knew of an online repository (possibly like Worg) that might be available to pull onto my system that I could read right in emacs. Thanks, Matt
Re: [O] Publishing notes to a website
Kyle Sexton k...@mocker.org writes: I'm looking for advice on ways people are publishing their org notes to a website. So far I've looked at blorgit and it's really nice, but the dependency for a backend emacs session and running through sinatra makes me wary of putting it out on my server for the world. 1. What methods are people using to publish their org notes? 2. Anyone have sample sites that I can see what the output looks like? Hi Kyle, I use the publishing setup of org-mode to publish static HTML files to http://doc.norang.ca/. The publishing setup is documented at http://doc.norang.ca/org-mode.html#Publishing I plan to replace the index page with the org-mode publishing site map soon. Regards, -- Bernt
Re: [O] Elisp Primer?
Matthew Sauer improv.philoso...@gmail.com wrote: I am wanting to learn about/have a reference guide for elisp. I am a huge fan of the O'Reilly books for the other languages I have worked with but I was wondering if someone knew of an online repository (possibly like Worg) that might be available to pull onto my system that I could read right in emacs. If you have emacs, you should already have the Emacs Lisp Intro manual and the Elisp Reference manual. They should be as close as C-h i. If you build your own emacs, they are certainly there. If you depend on a distro to provide your emacs, they may have decided to split things up and you might have to install some emacs-doc package. Or you can read them online at http://www.gnu.org/software/emacs/emacs-lisp-intro/ and http://www.gnu.org/software/emacs/manual/html_node/elisp/index.html Nick
[O] Re: [Workaround] Escaping false list items
On 3/11/11 7:22 PM, Nicolas wrote: Christian Moem...@christianmoe.com writes: Did you have a particular trick in mind, or just to avoid filling manually? I tend to have auto-fill on by default. I meant automatically. Please have a look at: http://article.gmane.org/gmane.emacs.orgmode/39149 Regards, Magic! Thanks a lot for this, it's far and away a better solution. Yours, Christian
[O] org-sparse-tree on region or subtree?
Is it possible to run org-sparse-tree on a specific region or subtree of an org file? I have an Org file with the following structure * 2010... * 2011 ** 2011-01 January... ** 2011-02 February *** 2011-02-01 Tuesday Alice - Plain list item 1 - Plain list item 2 Bob - Plain list item a - Plain list item b *** 2011-02-08 Tuesday Alice - Plain list item 3 - Plain list item 4 Bob - Plain list item c - Plain list item d I'd like to be able to be able to run a command and see all the Alice entries for 2011-02 February. It seems like a sparse tree (with a regex for Alice) on the 2011-02 February subtree would give me that. But I *think* org-sparse-tree uses org-occur which always starts at point-min, but I could easily be mis-reading the code. Does anyone have any ideas? -- Lee Hinman hin...@gmail.com
Re: [O] Re: [Orgmode] Grouping clock report by tag?
On Mon, Mar 7, 2011 at 4:11 AM, Giovanni Ridolfi giovanni.rido...@yahoo.it wrote: John Hendy jw.he...@gmail.com writes: Sorry -- forgot the list... On Sun, Mar 6, 2011 at 12:06 PM, John Hendy jw.he...@gmail.com wrote: On Sun, Mar 6, 2011 at 11:42 AM, Bastien b...@altern.org wrote: John Hendy jw.he...@gmail.com writes: How about a clock table with a :tag: column and an option to sort by common tag? The idea has been already suggested, with patches, but I think the patches got lost during the FSF copyright assignment Somehow I missed this email! 1. by Adam Elliott, see: On Feb 23, 2010, at 8:13 AM, Adam Elliott wrote: http://thread.gmane.org/gmane.emacs.orgmode/22526 That looks like the behavior as-is (i.e. a :tags tagname option) Oh, and perhaps the :tags option should be better documented in the manual. I tried in vain to combine tags and only just now saw the thread that looks like it inspired the :tags option. The mailing list posts contains the syntax (tag1-tag2, tag1+tag2) but since there is no example clocktable using the :tags option in the manual: 1) it took me a while even to figure out to put the word in quotations 2) I had no idea whatsoever if multiple tags were possible 2. And also by B Grobauer, with a huge patch Sun, 20 Jun 2010 12:24:44 +0200 http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00536.html Now *this* looks like just what I was loooking for. Yes -- an option to group by tag or even simply include a column which lists the tags. I can do several tables, but for me this is more just to show where I spend my time, not for billing... so it would be great to analyze the ratios between my various buckets (for which I use tags to identify). If Bastien is going to implement this feature, I ask again[1]: - Is it possible to check also for properies and not only for tag? we can add a special PROPERTY: CLOCKTAG Rationale: In my setup I have a remember template where I write the task I'm doing. with some information e.g.: ** reading bibliography CLOCK: [2010-06-21 lun 09:24] :PROPERTIES: :ID: lab :Type:expected :People: Giovanni :Location: computer :Connection: nil :CLOCKTAG:PV Project :Comment: :END: If the function checks also the :PROPERTIES: drawer and the existence of the special PROPERTY: CLOCKTAG I can keep my setup and exploit this marvellous new feature. [1] http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00554.html --- Another method could be to use the clock report from agenda R Date: Wed, 27 Oct 2010 12:29:25 -0400 (Sebastien Vauban) http://lists.gnu.org/archive/html/emacs-orgmode/2010-10/msg01494.html cheers, Giovanni
Re: [O] org-sparse-tree on region or subtree?
Lee Hinman hin...@gmail.com writes: Is it possible to run org-sparse-tree on a specific region or subtree of an org file? I have an Org file with the following structure * 2010... * 2011 ** 2011-01 January... ** 2011-02 February *** 2011-02-01 Tuesday Alice - Plain list item 1 - Plain list item 2 Bob - Plain list item a - Plain list item b *** 2011-02-08 Tuesday Alice - Plain list item 3 - Plain list item 4 Bob - Plain list item c - Plain list item d I'd like to be able to be able to run a command and see all the Alice entries for 2011-02 February. It seems like a sparse tree (with a regex for Alice) on the 2011-02 February subtree would give me that. But I *think* org-sparse-tree uses org-occur which always starts at point-min, but I could easily be mis-reading the code. Does anyone have any ideas? Narrow to subtree, then run org-sparse-tree normally, then widen maybe? -- Bernt
Re: [O] Bug: Invalid HTML with email:t export option [7.5 (release_7.5.27.gefa56)]
Hi Bernt, Bernt Hansen be...@norang.ca writes: The following org file generates invalid HTML. The class name includes the full email address and '@' is not an allowed character in the HTML class name. I fixed this. Thanks! -- Bastien
Re: [O] Wiki for the next OrgCamp in Paris (April 9th)
Frederic Couchet fcouc...@april.org writes: some parisian Orgers are gathering for a new OrgCamp in Paris * Where: FPH, 38 rue Saint Sabin, 75011 Paris * When: April 9th 2011 10mm-8pm * Participants: please register on the event's website Here is the wiki for this event (in French): http://www.lifehacking.fr/mediawiki/index.php/OrgCampAvril2011 Thanks for setting this up! I'll be there. -- Bastien
[O] broken latex export of footnote from a table cell?
Hello! This is my first message. I'm excited about org-mode! Thank you for developing such a great tool! However, I found out that I can't have a footnote in a table cell. If I export such document to LaTeX, I get misplaced footnote:( I'm running MS Windows XP SP3 32 bit. -cut- #+Title: orgmode to latex epic fail, footnote in a table cell Works here [fn:: This is a good footnote]. Does it? #+LATEX: \begin{table}[h] | /org-version/ | /emacs-version/ | /Why can't I use bold here with */ | |---+-+| | 7.5 | 23.2.1 | some text[fn:: Why am I here?] | #+TBLFM: $1='(message org-version)::$2='(message emacs-version) #+LATEX: \end{table} Some text here. -cut- Mikhail