Re: [O] [Feature Request] - Furigana - Yomigana - Ruby
Suvayu Ali writes: Maybe we could allow backend specific macro expansion definitions. Something like: #+HTML_MACRO: ruby ruby $1 rp(/rprt$2/rtrp)/rp \ruby #+LATEX_MACRO: ruby \ruby{$1}{$2} Then {{{ruby(東,ひがし)}}} will be expanded appropriately for different backends. What do you think? Existing (8.0) syntax already offers a way to achieve this using export snippets, which now allow and require you to specify backends. To recast your example: #+macro: ruby @@html:ruby $1rp(/rprt$2/rtrp)/rp /rubylatex:\ruby{$1}{$2}@@ Then {{{ruby(東,ひがし)}}} will be expanded appropriately for different backends. Note: I have no idea if the above actually results in appropriate rubies, it's just to demonstrate the basic principle that you can write: #+macro: foo @@html:foo$1/foolatex:\foo{$1}@@ Yours, Christian
Re: [O] [Feature Request] - Furigana - Yomigana - Ruby
On Wed, May 29, 2013 at 09:20:52AM +0200, Christian Moe wrote: Suvayu Ali writes: Maybe we could allow backend specific macro expansion definitions. Something like: #+HTML_MACRO: ruby ruby $1 rp(/rprt$2/rtrp)/rp \ruby #+LATEX_MACRO: ruby \ruby{$1}{$2} Then {{{ruby(東,ひがし)}}} will be expanded appropriately for different backends. What do you think? Existing (8.0) syntax already offers a way to achieve this using export snippets, which now allow and require you to specify backends. To recast your example: #+macro: ruby @@html:ruby $1rp(/rprt$2/rtrp)/rp /rubylatex:\ruby{$1}{$2}@@ Then {{{ruby(東,ひがし)}}} will be expanded appropriately for different backends. You are right! I had completely forgotten about snippets. -- Suvayu Open source is the future. It sets us free.
Re: [O] org-effectiveness
davi...@es.gnu.org (David Arroyo =?utf-8?Q?Men=C3=A9ndez?=) writes: Viktor Rosenfeld listuse...@gmail.com writes: Hello, David Arroyo Menéndez wrote: Hello, I would like propose org-effectiveness to contrib. Org effectiveness is a mode to measure the personal effectiveness using org todos. +1 I've sent the request-assign.txt to ass...@gnu.org, I'll wait news. Regards!
Re: [O] org-babel, python, encoding and table
Andreas Röhler andreas.roehler at easy-emacs.de writes: Am 07.05.2013 18:41, schrieb Eric Schulte: #+NAME: test2 #+begin_src python :results value :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) b = é #+end_src #+RESULTS: test2 | \303\251 | a| | a| \303\240 | Maybe this isn't an execution problem, but is rather a buffer encoding problem. I executed your example above in a small buffer (attached). I then saved this buffer and was forced to specify an encoding, I selected utf8. If I cat the resulting file from disk, the accented characters appear correctly. Confirming this. BTW also return a[0][0] displays correct so far. Cheers, Andreas Hello, Just an update about this post. I've kept on digging on the problem of org-babel python results that produces encoding problems in the emacs buffer when the requested results is turned into a org table. To remind and illustrate the problem, here is an example : #+name: pytab-test #+begin_src python :results value :session :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) a #+end_src #+TBLNAME: pytab-test | \303\251 | a| | a| \303\240 | I have then two problems : 1. The characters are not well displayed in the buffer 2. If I try to save the buffer, emacs doesn't recognize the encoding and tells me that utf-8-unix cannot encode these: \303 \251 [...] So I decided to inspect what happened during the Python session... Basically, Org-babel just write the str conversion of my tuple ( ( é, a ), ( a, à ) ) (that appears (('\xc3\xa9', 'a'), ('a', '\xc3\xa0')) in the python interpreter) in a temporary file. Then looking in this temporary file, I see that the strange characters are written directly \xc3, \xa9, etc. Consequently, my guess is that org-babel has maybe some difficulties to deal with these characters while reading the temporary file before displaying the results in the buffer. Unfortunately, this is just a guess and even less a solution... But am I on relevant lead??? Thanks in advance for any help... Roland.
[O] [PATCH] org-contacts.el: add expire feature
From e974db131d88acf06bb6b250eac2fae8c7d0a96e Mon Sep 17 00:00:00 2001 From: Feng Shu tuma...@gmail.com Date: Wed, 29 May 2013 20:30:43 +0800 Subject: [PATCH] * contrib/lisp/org-contacts.el: Add a feature which can expire emails and phones * test :PROPERTIES: :EMAIL: te...@gmail.com te...@gmail.com te...@gmail.com :PHONE: 123456 123457 123458 :EXPIRE: te...@gmail.com 123457 :END: when completing or exporting to vcard, the emails and phones in the expire property (te...@gmail.com and 123457) will be ignore --- contrib/lisp/org-contacts.el | 32 +++- 1 个文件被修改,插入 27 行(+),删除 5 行(-) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 7b0b603..ae6c6f1 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -86,6 +86,11 @@ When set to nil, all your Org files will be used. :type 'string :group 'org-contacts) +(defcustom org-contacts-expire-property EXPIRE + Name of the property for emails or phones which will be expired + :type 'string + :group 'org-contacts) + (defcustom org-contacts-birthday-format Birthday: %l (%Y) Format of the anniversary agenda entry. @@ -476,6 +481,14 @@ A group FOO is composed of contacts with the tag FOO. (completion-table-case-fold completion-list (not org-contacts-completion-ignore-case + +(defun org-contacts-remove-expired-property (expire-list list) + Remove emails or phones in list-expired from list +(while expire-list + (setq list (remove (car expire-list) list)) + (setq expire-list (cdr expire-list))) +list) + (defun org-contacts-complete-name (start end string) Complete text at START with a user name and email. (let* ((completion-ignore-case org-contacts-completion-ignore-case) @@ -484,10 +497,17 @@ A group FOO is composed of contacts with the tag FOO. ;; The contact name is always the car of the assoc-list ;; returned by `org-contacts-filter'. for contact-name = (car contact) + + ;; Build the list of the email addresses which has + ;; been expired + for expire-list = (org-contacts-split-property (or +(cdr (assoc-string org-contacts-expire-property + (caddr contact))) )) ;; Build the list of the user email addresses. - for email-list = (org-contacts-split-property (or - (cdr (assoc-string org-contacts-email-property - (caddr contact))) )) + for email-list = (org-contacts-remove-expired-property expire-list + (org-contacts-split-property (or + (cdr (assoc-string org-contacts-email-property + (caddr contact))) ))) ;; If the user has email addresses… if email-list ;; … append a list of USER EMAIL. @@ -869,15 +889,17 @@ to do our best. (n (org-contacts-vcard-encode-name name)) (email (cdr (assoc-string org-contacts-email-property properties))) (tel (cdr (assoc-string org-contacts-tel-property properties))) + (expire (cdr (assoc-string org-contacts-expire-property properties))) (note (cdr (assoc-string org-contacts-note-property properties))) (bday (org-contacts-vcard-escape (cdr (assoc-string org-contacts-birthday-property properties (addr (cdr (assoc-string org-contacts-address-property properties))) (nick (org-contacts-vcard-escape (cdr (assoc-string org-contacts-nickname-property properties (head (format BEGIN:VCARD\nVERSION:3.0\nN:%s\nFN:%s\n n name)) + (expire-list (when expire (setq expire-list (org-contacts-split-property expire emails-list result phones-list) (concat head (when email (progn - (setq emails-list (org-contacts-split-property email)) + (setq emails-list (org-contacts-remove-expired-property expire-list (org-contacts-split-property email))) ; (setq result ) (while emails-list (setq result (concat result EMAIL: (org-contacts-strip-link (car emails-list)) \n)) @@ -886,7 +908,7 @@ to do our best. (when addr (format ADR:;;%s\n (replace-regexp-in-string \\, ? ; addr))) (when tel (progn - (setq phones-list (org-contacts-split-property tel)) + (setq phones-list (org-contacts-remove-expired-property expire-list (org-contacts-split-property tel))) (setq result ) (while phones-list (setq result (concat result TEL: (org-contacts-strip-link (car phones-list)) \n)) -- 1.7.10.4 --
Re: [O] org-babel, python, encoding and table
To remind and illustrate the problem, here is an example : #+name: pytab-test #+begin_src python :results value :session :preamble # -*- coding: utf-8 -*- :return a a = ( ( é, a ), ( a, à ) ) a #+end_src #+TBLNAME: pytab-test | \303\251 | a| | a| \303\240 | I have then two problems : 1. The characters are not well displayed in the buffer 2. If I try to save the buffer, emacs doesn't recognize the encoding and tells me that utf-8-unix cannot encode these: \303 \251 [...] So I decided to inspect what happened during the Python session... Basically, Org-babel just write the str conversion of my tuple ( ( é, a ), ( a, à ) ) (that appears (('\xc3\xa9', 'a'), ('a', '\xc3\xa0')) in the python interpreter) in a temporary file. Then looking in this temporary file, I see that the strange characters are written directly \xc3, \xa9, etc. Consequently, my guess is that org-babel has maybe some difficulties to deal with these characters while reading the temporary file before displaying the results in the buffer. Unfortunately, this is just a guess and even less a solution... But am I on relevant lead??? This does seem to be in the right direction. This is similar to my diagnosis of the non-session case [1]. If the python process prints weird hex character values (e.g., '\xc3\xa0') instead of utf8 characters (e.g., à), then Babel will insert the hex values into the buffer. As I recall switching to python3 solved this problem? For the session case, it may be possible to fix this by changing the python code in the `org-babel-python-evaluate-session' function around line 300 in ob-python.el. Cheers, Thanks in advance for any help... Roland. Footnotes: [1] http://article.gmane.org/gmane.emacs.orgmode/71866 -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] Org as a static site generator
François Pinard pin...@iro.umontreal.ca writes: Bastien b...@gnu.org writes: Oh, nice! I added a pointer in Worg: http://orgmode.org/worg/org-tools/index.html At the end of that page, there is: See the page Org Blogs and Wikis., with Org Blogs and Wikis clickable. However, the pointer resolves to file:///home/emacs/install/git/worg/org-blog-wiki.html. Some http://; was likely intended there? François I just pushed up a fix for this link, and also added mention of org-ehtml to the Org-mode blog/wiki page. Cheers, -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] conflict load of epresent - org mode 8.0.3
d.tchin d.tc...@voila.fr writes: Hi, If the intention is to use epresent with org file, is it necessary to put the following instructions in epresent.el and epresent-org.el? (require 'ox) (require 'ox-latex) I suppose that when a org file is loaded, this library and corresponding are already loaded, so these intructions may be not needed ? Thanks d.tchin writes: I just updated the require statements in epresent.el. https://github.com/eschulte/epresent/blob/master/epresent.el I'm not sure what epresent-org.el is. Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] [Feature Request] - Furigana - Yomigana - Ruby
Hi, For some reason, I don't get the follow-ups per mail, neither can I respond via the gmane interface =(. Right now I don't have time to figure it out, so I will let you know here for all solutions: Thanks, all, very nice! In fact, pure awesomeness! And it's brand new. I didn't know about it before, and now found the info that you mentioned it: http://orgmode.org/worg/org-8.0.html I had just looked with my old emacs version in the manual, not the upgrade release notes.. (I had 7.9.3d, I had updated via the emacs package manager, but unsuccessful due to loading some orgmode functions at startup in emacs. after renaming .emacs and deleting the old org, the package manager successfully updated.) I didn't get Suvayus solution in the old version, i suspect it might work in the new version, but since the snippet version (see below) doesnt involve changing the backend for every macro, i didn't follow up on it Thomas' ruby link solution works nicely (except the closing tag should be /ruby, not \ruby, and works for both for latex and html. The only downside is that you won't see the symbol in the original orgfile or in section headers in the export, just the reading, but that is a very minor annoyance and this is a very nice elegant solution with a very readable source org file. (I don't guess the link could be redefined to switch reading and symbol around?) Christians suggestion with snippets works great, both for html and pdf via latex; even in section headers. (it took me reading the 8.0 upgrade info to understand we were talking about the at symbol, not literally at in the code. Thanks all for your help =) And Torsten, I guess this also lines out the solution on how to implement specific features without cluttering the basic exporters. m_ _m best, Tristan On 2013-05-28 19:36, Torsten Wagner wrote: Hi Tristan, don't get me wrong. Being married to a Chinese and lived in Japan for many years I know exactly what you are talking about ;) I just feel it needs some clean and well defined way how to implement all those different export features without cluttering the basic exporters. Somehow the same reason why we use a zillion of packages for LaTeX itself. I just got aware of that, by reading your post. Recently, we got new exporters thus, should be the next step to get/define modules for those exporters or even being able to write your own rules easily within the file? The 2 worst case scenarios IMHO... the exporters gets more and more extended getting harder to maintain and error prome people start forking the exporters html-cjk, html-hangul, html-netscape ;) Thus, I would love to hear what others might think is the most clean way to add your feature request and be prepared for the many many others in the future. Greetings Torsten On 28 May 2013 17:43, Tristan Nakagawa tristan.nakag...@gmail.com wrote: Hi Torsten, Thanks for the input, To have definable export rules would indeed be great, to increase flexibility while keeping the base exporter simple and lightweight. I agree that this is somewhat specific, however, I believe that globally, this is not unfrequent, and will become quite frequent soon: There is, for example, the ease of drafting and flexibility of output (print quality pdf and epub-convertible html),so orgmode can be used so well outside of the traditional latex-technical and science paper realms for novels, books, blog-posts (org2blog). And imagining the number of people on this planet speaking Chinese and japanese, Korean, Thai, and other languages I am not even aware of that use rubys to help reading, the number of people learning these languages, creating two-language blog-posts, textbooks, etc etc. It might take a while before all browsers support the tags (my Firefox doesnt even yet), but for epubpdf creation, this would already be great! (Just to back up the feature-request beyond definately needed and appreciated discussion about how and if to make the exporter more modular or costumizable) .. =) best, Tristan On 2013-05-28 15:00, Torsten Wagner wrote: Hi Tristan, this feature request seems simple to implement on one side. However, it opens a question how to deal with those in general. \ruby{東} is a very specific command of the CJK package. If this get's implemented in the standard html exporter, other very special commands might need to follow. That could easily go into a nightmare. I do not have a detailed view how the exporters work now, thus, it is a interesting question I want to ask here: How should specific needs for exporting (like Tristans) be embedded in the future. People could fork exporters. Creating e.g. a HTML-CJK exporter. Even better would be to have exporter modules which could be loaded by users. #+HTML_MODULES CJK, However, I believe that for many users, the special cases are not very frequent and complex. Might it be possible to create a very simple
[O] Guidance for preparing document with code
I'm using Org ~7.8 and would like to prepare a document for export to HTML to make available to others to read. This document will contain heading, text, etc., R code (for my reference) and the output of the R code. Where should I look to learn how to do this in R? Org-babel? Is this literate programming? I've read much about Org over the years, and I think I've probably tried this already once before, but I'd like to know where to start looking.
Re: [O] Guidance for preparing document with code
SabreWolfy sabrewo...@gmail.com writes: I'm using Org ~7.8 and would like to prepare a document for export to HTML to make available to others to read. This document will contain heading, text, etc., R code (for my reference) and the output of the R code. Where should I look to learn how to do this in R? Org-babel? Is this literate programming? I've read much about Org over the years, and I think I've probably tried this already once before, but I'd like to know where to start looking. org-babel is the right tool. Getting the headers right might involve some fiddling: there have been many question on the ML about those so you can try searching, but if after some effort you are still running into a wall, just post what you have, what you want to accomplish and how your purported solution fails: there are lots of people able and willing to help. The only thing to keep in mind is that the shorter the example, the better: don't post your 100-page org file; extract the example(s) that you want help with. These are all obvious but I find that repetition of this sort (although it might irk the lifers on the list) is useful. If you are using the R code for your reference, and only presenting the results, that's *not* literate programming: you don't have to worry about the noweb stuff. -- Nick
Re: [O] link abbreviation with multiple params, e. g. for geo locations
Hi Eric On Wed, May 22, 2013 at 7:03 PM, Michael Brand michael.ch.br...@gmail.com wrote: Please review and comment my attached patch containing doc and ERT. As there has been no answer yet from anyone else: Could you please read this thread and review my Babel patch? I guess that you did not follow the thread because the subject and the first two posts are non-Babel. Michael
Re: [O] Guidance for preparing document with code
Aloha SabreWolfy, SabreWolfy sabrewo...@gmail.com writes: I'm using Org ~7.8 and would like to prepare a document for export to HTML to make available to others to read. This document will contain heading, text, etc., R code (for my reference) and the output of the R code. Where should I look to learn how to do this in R? Org-babel? Org mode should do what you want pretty much out of the box. Note that the exporters all changed with Org 8, so you'll want to distinguish between the old and new exporters if you look for information on line. Is this literate programming? I don't think so. The end result of literate programming is typically a computer program rather than a document. I've read much about Org over the years, and I think I've probably tried this already once before, but I'd like to know where to start looking. For your R code blocks, see the :exports header argument. It sounds like you'll want to set that to :exports both so you can see both your R code and its output in the html document. Good luck! hth, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Guidance for preparing document with code
SabreWolfy sabrewo...@gmail.com writes: I'm using Org ~7.8 and would like to prepare a document for export to HTML to make available to others to read. This document will contain heading, text, etc., R code (for my reference) and the output of the R code. Where should I look to learn how to do this in R? Org-babel? Is this literate programming? I've read much about Org over the years, and I think I've probably tried this already once before, but I'd like to know where to start looking. , | http://stackoverflow.com/questions/11931385/emacs-bernt-hansens-life-in-a-plaintext-sample-git-repo ` gives links to the html version and the org-file of a document that demonstrates a lot of the fundamental stuff that can be done with Org-mode, with very good explanations. The Org manual: , | http://orgmode.org/manual/Working-With-Source-Code.html ` and tutorials on Worg: , | http://orgmode.org/worg/org-contrib/babel/uses.html ` give more explanations .. -- cheers, Thorsten
Re: [O] [Feature Request] - Furigana - Yomigana - Ruby
Tristan Nakagawa writes: Christians suggestion with snippets works great, both for html and pdf via latex; even in section headers. (it took me reading the 8.0 upgrade info to understand we were talking about the at symbol, not literally at in the code. Hi, glad to hear it worked out. Did you see the code as literally at? I did use the symbol, so this must be the work of some overzealous email-address obfuscating software. That's useful to know for another time if this comes up on the list. Yours, Christian
Re: [O] Guidance for preparing document with code
Hello, Thomas S. Dye wrote: SabreWolfy sabrewo...@gmail.com writes: I'm using Org ~7.8 and would like to prepare a document for export to HTML to make available to others to read. This document will contain heading, text, etc., R code (for my reference) and the output of the R code. Where should I look to learn how to do this in R? Org-babel? Org mode should do what you want pretty much out of the box. Note that the exporters all changed with Org 8, so you'll want to distinguish between the old and new exporters if you look for information on line. Is this literate programming? I don't think so. The end result of literate programming is typically a computer program rather than a document. Just for the sake of accuracy, I'd say that the end result of literate programming is typically both a computer program *and* its documentation. Getting the code out of the mixed source is called tangling, while generating the documentation (which shows both the code and explains it at the same time) is called weaving. For the rest, you've received all the needed information so far, I guess. Little starter for your R code: #+BEGIN_SRC R :results graphics :file testout.png plot(1:10, (1:10)^2) #+END_SRC produces (when evaluated in the buffer): #+results: [[file:testout.png]] Up to you to see whether you want to export (when generating the HTML document) the code, its results, both or none, by setting correctly the :exports header argument. Best regards, Seb -- Sebastien Vauban
Re: [O] Guidance for preparing document with code
Dnia 2013-05-29, o godz. 15:33:51 SabreWolfy sabrewo...@gmail.com napisał(a): I'm using Org ~7.8 and would like to prepare a document for export to HTML to make available to others to read. This document will contain heading, text, etc., R code (for my reference) and the output of the R code. Where should I look to learn how to do this in R? Org-babel? Is this literate programming? I've read much about Org over the years, and I think I've probably tried this already once before, but I'd like to know where to start looking. Just my two cents: some time ago I had a problem with Org (not the exporter, it was MobileOrg), and I was advised to install the newest Org (8.0). I was a bit afraid, but it turned out that the installation went /very/ smoothly. And since the 8.0 has the new exporter, I'd suggest you switch, too. (I used Elpa, but I was told that installing from git repo is as easy as that, too.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] Guidance for preparing document with code
Nick Dokos ndokos at gmail.com writes: org-babel is the right tool. Getting the headers right might involve some fiddling: there have been many question on the ML about those so you can try searching, but if after some effort you are still running into a wall, just post what you have, what you want to accomplish and how your purported solution fails: there are lots of people able and willing to help. The only thing to keep in mind is that the shorter the example, the better: don't post your 100-page org file; extract the example(s) that you want help with. Thanks. Apologies -- I meant *headers* (ie: a structured/outline-type document), not *headings*. If you are using the R code for your reference, and only presenting the results, that's *not* literate programming: you don't have to worry about the noweb stuff. I wanted to include explanatory text, the R code, then the output of the code, all in the same document. The R code will not be relevant to the reader, but I'd like it included and executed to produce output.
Re: [O] Guidance for preparing document with code
Hi :) Thomas S. Dye tsd at tsdye.com writes: Org mode should do what you want pretty much out of the box. Note that the exporters all changed with Org 8, so you'll want to distinguish between the old and new exporters if you look for information on line. I haven't upgraded to Org 8 yet, but I see a later reply in this threads mentions that it's quite easy, so I might try that first, to benefit from the new exporter. For your R code blocks, see the :exports header argument. It sounds like you'll want to set that to :exports both so you can see both your R code and its output in the html document. Noted; thanks.
Re: [O] Guidance for preparing document with code
Hi Marcin, Marcin Borkowski mbork at wmi.amu.edu.pl writes: Just my two cents: some time ago I had a problem with Org (not the exporter, it was MobileOrg), and I was advised to install the newest Org (8.0). I was a bit afraid, but it turned out that the installation went /very/ smoothly. And since the 8.0 has the new exporter, I'd suggest you switch, too. (I used Elpa, but I was told that installing from git repo is as easy as that, too.) I was holding off updating to Org 8, but I might do that first, as your experience was a good one. My concern regarding updating was more related to the long list of gotchas on the website about version 8 and functionality changes.
Re: [O] Guidance for preparing document with code
Hi Sebastien, Thanks for the explanation and the example, which I'm going to use to get me started.
Re: [O] Guidance for preparing document with code
SabreWolfy sabrewo...@gmail.com writes: Nick Dokos ndokos at gmail.com writes: org-babel is the right tool. Getting the headers right might involve some fiddling: there have been many question on the ML about those so you can try searching, but if after some effort you are still running into a wall, just post what you have, what you want to accomplish and how your purported solution fails: there are lots of people able and willing to help. The only thing to keep in mind is that the shorter the example, the better: don't post your 100-page org file; extract the example(s) that you want help with. Thanks. Apologies -- I meant *headers* (ie: a structured/outline-type document), not *headings*. I think you used the right terminology the first time: those are usually referred to as ``headings''. The ``headers'' I was referring to are the header arguments in a code block. I should have said ``header arguments'' explicitly - see e.g. (info (org) Working with source code) If you are using the R code for your reference, and only presenting the results, that's *not* literate programming: you don't have to worry about the noweb stuff. I wanted to include explanatory text, the R code, then the output of the code, all in the same document. The R code will not be relevant to the reader, but I'd like it included and executed to produce output. You can do that with babel: the :exports both header argument allows both code and results to be exported. We can argue whether this is literate programming but it's probably not a useful argument: it's not black and white, there is a continuous spectrum. As Seb explained, literate programming is (usually) about presenting a program (usually a *large* program) in logical pieces, interleaving the explanations with program fragments and depending on the system to a) tangle all the program fragments into a program that can actually be run without any modifications and b) weave the code fragments and explanations into a document (e.g. a book). -- Nick
Re: [O] [Feature Request] - Furigana - Yomigana - Ruby
Hello Tristan, Since you broought up Org versions, I thought it would be pertinent to classify the version dependence of the possible solutions. On Wed, May 29, 2013 at 05:20:21PM +0200, Tristan Nakagawa wrote: I didn't get Suvayus solution in the old version, i suspect it might work in the new version, but since the snippet version (see below) doesnt involve changing the backend for every macro, i didn't follow up on it My solution with filters is only possible with Org 8.x or above. Also a minor nit-pick, my solution goes into your emacs setup; the backends stay as it is. But I would say Christian's solution is much more elegant and portable in the sense that the Org file is self contained and independent of the setup. Thomas' ruby link solution works nicely (except the closing tag should be /ruby, not \ruby, and works for both for latex and html. The only downside is that you won't see the symbol in the original orgfile or in section headers in the export, just the reading, but that is a very minor annoyance and this is a very nice elegant solution with a very readable source org file. (I don't guess the link could be redefined to switch reading and symbol around?) Tom's solution is probably the most portable across different Org versions. Christians suggestion with snippets works great, both for html and pdf via latex; even in section headers. (it took me reading the 8.0 upgrade info to understand we were talking about the at symbol, not literally at in the code. This one again is a Org 8.x or above solution. Hope you can adapt either of these to your needs. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] [Feature Request] - Furigana - Yomigana - Ruby
On Wed, May 29, 2013 at 06:46:59PM +0200, Christian Moe wrote: Tristan Nakagawa writes: Christians suggestion with snippets works great, both for html and pdf via latex; even in section headers. (it took me reading the 8.0 upgrade info to understand we were talking about the at symbol, not literally at in the code. Hi, glad to hear it worked out. Did you see the code as literally at? I did use the symbol, so this must be the work of some overzealous email-address obfuscating software. That's useful to know for another time if this comes up on the list. I believe gmane does that. :-p -- Suvayu Open source is the future. It sets us free.
[O] Bug: Literal Examples are malformed in exports (to html/tex) [8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. I add a literal example like #+BEGIN_SRC (defun org-xor (a b) Exclusive or. (if a (not b) b)) #+END_SRC and #+BEGIN_EXAMPLE (defun org-xor (a b) Exclusive or. (if a (not b) b)) #+END_EXAMPLE to an org file in various places. Export with (org-html-export-to-html) and (org-latex-export-to-latex) produces inconsistent and malformed example blocks. Some of these blocks produce p #+BEGINsubEXAMPLE/sub (defun org-xor (a b) Exclusive or. (if a (not b) b)) /p Others produce p (defun org-xor (a b) Exclusive or. (if a (not b) b)) /p and \#+BEGIN$_{\text{EXAMPLE}}$ (defun org-xor (a b) Exclusive or. (if a (not b) b)) \#+END$_{\text{EXAMPLE}}$ vs \begin{example } (defun org-xor (a b) Exclusive or. (if a (not b) b)) \end{example I expect to see correctly created example areas that maintain spacing/tabs/newlines. I add the following before an example block #+ATTR_HTML: :textarea t :width 40 and it creates div textarea=t width=40 class=example p (defun org-xor (a b) Exclusive or. (if a (not b) b)) /p NOTE: I do not believe that I have a mixed install. By deleting org-mode 8.0.3 and using the built-in 7.8.11 these problems are resolved. Emacs : GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-11-10 on charichuelo, modified by Debian Package: Org-mode version 8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/) current state: == (setq org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-latex-format-headline-function 'org-latex-format-headline-default-function org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)) ) (lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append) (quote local)) ) org-babel-result-hide-spec org-babel-hide-all-hashes) org-metadown-hook '(org-babel-pop-to-session-maybe) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-confirm-shell-link-function 'yes-or-no-p )
Re: [O] Bug: Literal Examples are malformed in exports (to html/tex) [8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/)]
Hello, super.quazim...@gmail.com (S.S) writes: I add a literal example like #+BEGIN_SRC (defun org-xor (a b) Exclusive or. (if a (not b) b)) #+END_SRC You need to provide a language for src blocks. and #+BEGIN_EXAMPLE (defun org-xor (a b) Exclusive or. (if a (not b) b)) #+END_EXAMPLE to an org file in various places. Export with (org-html-export-to-html) and (org-latex-export-to-latex) produces inconsistent and malformed example blocks. Some of these blocks produce p #+BEGINsubEXAMPLE/sub (defun org-xor (a b) Exclusive or. (if a (not b) b)) /p Others produce p (defun org-xor (a b) Exclusive or. (if a (not b) b)) /p and \#+BEGIN$_{\text{EXAMPLE}}$ (defun org-xor (a b) Exclusive or. (if a (not b) b)) \#+END$_{\text{EXAMPLE}}$ It means the example blocks are not recognized as such, for some reason. I cannot reproduce it, so I'd need a bit more context around your wrong blocks. Could you provide an ECM? I add the following before an example block #+ATTR_HTML: :textarea t :width 40 and it creates div textarea=t width=40 class=example p (defun org-xor (a b) Exclusive or. (if a (not b) b)) /p I cannot reproduce it either, but it seems related to the first problem. Regards, -- Nicolas Goaziou
[O] overview of org files
Hi everybody, here is a small contribution to the org project. It is a dashboard of org files in your main org directory. It shows, in a table, each of the org files, including its title (#+TITLE: field) and the filename. Date Title Filename -- 13/05/29 Cooking /home/dmg/org/cooking.org 13/05/29 Project X /home/dmg/org/x.org 13/05/29 The different licenses /home/dmg/org/licenses.org 13/05/29 Todo File /home/dmg/org/todo.org 13/05/28 Linux /home/dmg/org/linux.org 13/05/28 Notes /home/dmg/org/notes.org From there, if you press return, you will visit that particular file. the code is here: https://github.com/dmgerman/org-manage Hopefully somebody finds it useful. --dmg -- Daniel M. German Beauty is the first test; there is no permanent place in the world for ugly G. H. Hardy - mathematics. http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with .
Re: [O] Bug: Literal Examples are malformed in exports (to html/tex) [8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/)]
On Thu, May 30, 2013 at 5:22 AM, Nicolas Goaziou n.goaz...@gmail.comwrote: S S super.quazim...@gmail.com writes: I've no Idea what an ECM is :( If you let me know I'll see if I can provide it. It stands for complete minimal example, i.e. enough information so that I can reproduce it. I probably don't need your complete Org file, but I'd appreciate that you bisect it to find out the wrong parts. Things are getting even weirder, trying to mock up an ECM for you now and my emacs started stuttering, is hung at 100% CPU. Wasn't getting any of this with built-in 7.8.11. Maybe have a frankenorg situation going on. I'll investigate a bit more. Also I found that one of the example blocks had: div textarea=t width=40 class=example p(defun org-xor (a b)Exclusive or.(if a (not b) b))/p /div However this example block did not preserve tabs, etc and did not have the grey box, etc. It's because p tag should be textarea. But that may be related to the problem above. Regards, -- Nicolas Goaziou I've added test.org and test_no_init.org along with their html exports plus my init.el to a gist. https://gist.github.com/quazimodo/9055aca6167df1398c94 The init.el is long but you'll see from a fast skim there's nothing unusual there. 7.8.11 is used with emacs -q and that seems to export the example blocks properly, doesn't seem to know what to do with code blocks though. Do you need more? Yours, Sia
Re: [O] Guidance for preparing document with code
Dnia 2013-05-29, o godz. 17:30:23 SabreWolfy sabrewo...@gmail.com napisał(a): Hi Marcin, Marcin Borkowski mbork at wmi.amu.edu.pl writes: Just my two cents: some time ago I had a problem with Org (not the exporter, it was MobileOrg), and I was advised to install the newest Org (8.0). I was a bit afraid, but it turned out that the installation went /very/ smoothly. And since the 8.0 has the new exporter, I'd suggest you switch, too. (I used Elpa, but I was told that installing from git repo is as easy as that, too.) I was holding off updating to Org 8, but I might do that first, as your experience was a good one. My concern regarding updating was more related to the long list of gotchas on the website about version 8 and functionality changes. Well, there might be a few rough edges, but I guess that the quality of the new exporter might overweigh them (I don't know for sure, I don't use Org exporter /at all/). Also, I started with updating my Emacs to 24.3, though it was probably not strictly necessary - but it made using Elpa easier than with v23 (it was possible then, but in v24 it Just Works™ out of the box). Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] Expanded property drawers as per file option
* Feng Shu tuma...@gmail.com wrote: Thorsten Jolitz tjol...@gmail.com writes: Thorsten Jolitz tjol...@gmail.com writes: ,- | (defun find-org-contracts () | (interactive) | (find-file /path/to/contracts.org) | (show-all)) | | M-x find-org-contracts `- I use: #+STARTUP: showeverything Those two methods result in expanded properties, yes. However, I obviously was not precise enough to explain my requirement which is more complicated than showeverything. I would like to have all headings folded when I open the file (as it is now). Then I navigate to a heading of a person by using text search or arrow keys and TAB (to expand hierarchies). On the heading of the target person, I want TAB to expand also the properties drawer, not only the content of the heading with properties collapsed. Example: I start with contacts.org like this: * job * family I go to job and expand using TAB: * job * Bob * Peter * Susan * family After that, I navigate to Peter and press TAB once again to expand the heading of Peter *and* its property drawer all together (only for Peter): * job * Bob * Peter :PROPERTIES: :EMAIL: pe...@example.com :COMPANY: Acme :ADDRESS: Hiscity, hisstreet 42 :END: - met him at conference XY in 2009 - works in the field of foobar * Susan * family The desired difference to my current situation is, that I do not have to navigate on the PROPERTY line and press TAB to open the drawer for email, company name, address, and so forth. Usual behavior: PROPERTY drawer stays collapsed when its corresponding heading gets expanded. My wish: PROPERTY drawer gets collapsed when its corresponding heading gets expanded. I know that this is a very specific requirement and it spares me only one positioning effort followed by TAB. However, for contacts it would eliminate one annoyance for my work flow :-) Thanks for your comments, thoughts, tipps! -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: get Memacs from https://github.com/novoid/Memacs https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
[O] Problem when EXPORT_FILE_NAME contains a subdirectory
Hi org users, When trying to export a subtree as PDF in a subdirectory, I get this error: ! I can't write on file `test.log'. This is using this source: * head 1 :PROPERTIES: :EXPORT_FILE_NAME: pdf/test.pdf :END: Moo Moo Moo. * head 2 This used to work fine with the old exporter. It I remove the subdirectory : :EXPORT_FILE_NAME: test.pdf Everything works as expected. Is this intended behavior? Is there a work around that would let me export to a subdirectory? Thank you very much, Martin -- Martin Marier http://www.martinmarier.com
Re: [O] [PATCH] org-contacts.el: add expire feature
Feng Shu tuma...@gmail.com writes: Hello Feng, Thanks for this interesting feature, here are some remarks: From e974db131d88acf06bb6b250eac2fae8c7d0a96e Mon Sep 17 00:00:00 2001 From: Feng Shu tuma...@gmail.com Date: Wed, 29 May 2013 20:30:43 +0800 Subject: [PATCH] * contrib/lisp/org-contacts.el: Add a feature which can expire emails and phones Could you use the org-mode convention for commit messages?[1] It should be: #+BEGIN_SRC change-log contrib/lisp/org-contacts.el: Add a feature which can expire emails and phones ,* contrib/lisp/org-contacts.el: Add a feature which can expire emails and phones. ...[rest of the commit message]... #+END_SRC * test :PROPERTIES: :EMAIL: te...@gmail.com te...@gmail.com te...@gmail.com :PHONE: 123456 123457 123458 :EXPIRE: te...@gmail.com 123457 :END: when completing or exporting to vcard, the emails and phones in the expire property (te...@gmail.com and 123457) will be ignore Since the purpose of this property is to ignore some values when exporting to vcard, don't you think it would be better to name it IGNORE or VCARD_IGNORE? (and of course to rename all functions accordingly) --- contrib/lisp/org-contacts.el | 32 +++- 1 个文件被修改,插入 27 行(+),删除 5 行(-) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 7b0b603..ae6c6f1 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -86,6 +86,11 @@ When set to nil, all your Org files will be used. :type 'string :group 'org-contacts) +(defcustom org-contacts-expire-property EXPIRE + Name of the property for emails or phones which will be expired + :type 'string + :group 'org-contacts) + (defcustom org-contacts-birthday-format Birthday: %l (%Y) Format of the anniversary agenda entry. @@ -476,6 +481,14 @@ A group FOO is composed of contacts with the tag FOO. (completion-table-case-fold completion-list (not org-contacts-completion-ignore-case + +(defun org-contacts-remove-expired-property (expire-list list) + Remove emails or phones in list-expired from list Don't forget the dot at the end of the sentence. +(while expire-list + (setq list (remove (car expire-list) list)) + (setq expire-list (cdr expire-list))) +list) + This is not very idiomatic elisp, I would write something more like: #+BEGIN_SRC emacs-lisp (remove-if (lambda (el) (member el expire-list)) list) #+END_SRC (defun org-contacts-complete-name (start end string) Complete text at START with a user name and email. (let* ((completion-ignore-case org-contacts-completion-ignore-case) @@ -484,10 +497,17 @@ A group FOO is composed of contacts with the tag FOO. ;; The contact name is always the car of the assoc-list ;; returned by `org-contacts-filter'. for contact-name = (car contact) + + ;; Build the list of the email addresses which has + ;; been expired + for expire-list = (org-contacts-split-property (or + (cdr (assoc-string org-contacts-expire-property + (caddr contact))) )) ;; Build the list of the user email addresses. - for email-list = (org-contacts-split-property (or - (cdr (assoc-string org-contacts-email-property -(caddr contact))) )) + for email-list = (org-contacts-remove-expired-property expire-list + (org-contacts-split-property (or + (cdr (assoc-string org-contacts-email-property + (caddr contact))) ))) ;; If the user has email addresses… if email-list ;; … append a list of USER EMAIL. @@ -869,15 +889,17 @@ to do our best. (n (org-contacts-vcard-encode-name name)) (email (cdr (assoc-string org-contacts-email-property properties))) (tel (cdr (assoc-string org-contacts-tel-property properties))) + (expire (cdr (assoc-string org-contacts-expire-property properties))) (note (cdr (assoc-string org-contacts-note-property properties))) (bday (org-contacts-vcard-escape (cdr (assoc-string org-contacts-birthday-property properties (addr (cdr (assoc-string org-contacts-address-property properties))) (nick (org-contacts-vcard-escape (cdr (assoc-string
Re: [O] [PATCH] org-contacts.el: add expire feature
Feng Shu tuma...@gmail.com writes: (defun org-contacts-complete-name (start end string) Complete text at START with a user name and email. (let* ((completion-ignore-case org-contacts-completion-ignore-case) @@ -484,10 +497,17 @@ A group FOO is composed of contacts with the tag FOO. ;; The contact name is always the car of the assoc-list ;; returned by `org-contacts-filter'. for contact-name = (car contact) + + ;; Build the list of the email addresses which has + ;; been expired + for expire-list = (org-contacts-split-property (or + (cdr (assoc-string org-contacts-expire-property + (caddr contact))) )) ;; Build the list of the user email addresses. - for email-list = (org-contacts-split-property (or - (cdr (assoc-string org-contacts-email-property -(caddr contact))) )) + for email-list = (org-contacts-remove-expired-property expire-list + (org-contacts-split-property (or + (cdr (assoc-string org-contacts-email-property + (caddr contact))) ))) I forgot to ask, why do you also modify org-contacts-complete-name? This function isn't used to export to VCARD, but to complete the email in Gnus. -- Daimrod/Greg signature.asc Description: PGP signature
Re: [O] Bug: Literal Examples are malformed in exports (to html/tex) [8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/)]
S S super.quazim...@gmail.com writes: I've added test.org and test_no_init.org along with their html exports plus my init.el to a gist. https://gist.github.com/quazimodo/9055aca6167df1398c94 The init.el is long but you'll see from a fast skim there's nothing unusual there. Indeed. But I suspect something wrong in your config: your example exports correctly here. 7.8.11 is used with emacs -q and that seems to export the example blocks properly, doesn't seem to know what to do with code blocks though. Constructs like #+begin_code are called special blocks. They are not meant to be used for source code. Use #+begin_src instead. Do you need more? What happens if you eval (org-element-at-point) with point on the faulty #+begin_example line? Also, what's the value for `org-element-block-name-alist'? Regards, -- Nicolas Goaziou
Re: [O] Expanded property drawers as per file option
Karl Voit devn...@karl-voit.at writes: * Feng Shu tuma...@gmail.com wrote: Thorsten Jolitz tjol...@gmail.com writes: Thorsten Jolitz tjol...@gmail.com writes: ,- | (defun find-org-contracts () | (interactive) | (find-file /path/to/contracts.org) | (show-all)) | | M-x find-org-contracts `- I use: #+STARTUP: showeverything Those two methods result in expanded properties, yes. However, I obviously was not precise enough to explain my requirement which is more complicated than showeverything. I would like to have all headings folded when I open the file (as it is now). Then I navigate to a heading of a person by using text search or arrow keys and TAB (to expand hierarchies). For me both 'show-entry' and 'show-children' open the property drawer of a headline. I actually use these two for visibility cycling: ,--- | [From `outline-mode-easy-bindings'] | | (defun outline-show-more () | (interactive) | (when (outline-on-heading-p) | (cond ((and (outline-subheadings-p) | (not (outline-subheadings-visible-p))) |(show-children)) | ((and (not (outline-subheadings-p)) | (not (outline-body-visible-p))) |(show-subtree)) | ((and (outline-body-p) | (not (outline-body-visible-p))) |(show-entry)) | (t |(show-subtree) | | | (defun outline-hide-more () | (interactive) | (when (outline-on-heading-p) | (cond ((and (outline-body-p) | (outline-body-visible-p)) |(hide-entry) |(hide-leaves)) | (t |(hide-subtree) `--- With these bindings: ,- | (let ((map outline-mode-map)) | (outshine-define-key-with-fallback |map (kbd M-left) (outline-hide-more) (outline-on-heading-p)) | (outshine-define-key-with-fallback |map (kbd M-right) (outline-show-more) (outline-on-heading-p)) [...] `- and these docs: ,--- | M-right runs the command outline-show-more, which is an interactive Lisp | function in `outshine.el'. | | It is bound to M-right. | | (outline-show-more) `--- , | outline-hide-more is an interactive Lisp function in `outshine.el'. | | (outline-hide-more) ` -- cheers, Thorsten
Re: [O] [PATCH] org-contacts.el: add expire feature
Daimrod daim...@gmail.com writes: Feng Shu tuma...@gmail.com writes: (defun org-contacts-complete-name (start end string) Complete text at START with a user name and email. (let* ((completion-ignore-case org-contacts-completion-ignore-case) @@ -484,10 +497,17 @@ A group FOO is composed of contacts with the tag FOO. ;; The contact name is always the car of the assoc-list ;; returned by `org-contacts-filter'. for contact-name = (car contact) + +;; Build the list of the email addresses which has +;; been expired +for expire-list = (org-contacts-split-property (or +(cdr (assoc-string org-contacts-expire-property + (caddr contact))) )) ;; Build the list of the user email addresses. -for email-list = (org-contacts-split-property (or -(cdr (assoc-string org-contacts-email-property - (caddr contact))) )) +for email-list = (org-contacts-remove-expired-property expire-list + (org-contacts-split-property (or + (cdr (assoc-string org-contacts-email-property + (caddr contact))) ))) I forgot to ask, why do you also modify org-contacts-complete-name? This function isn't used to export to VCARD, but to complete the email in Gnus. I want to ignore the emails which have been expired when I complete in the gnus --
Re: [O] org-babel, python, encoding and table
On 2013-05-29 22:00, Eric Schulte wrote: This does seem to be in the right direction. This is similar to my diagnosis of the non-session case [1]. If the python process prints weird hex character values (e.g., '\xc3\xa0') instead of utf8 characters (e.g., à), then Babel will insert the hex values into the buffer. As I recall switching to python3 solved this problem? What I do regularily in my python code to force python2 into emitting utf8 characters is the following: #+BEGIN_SRC python import codecs sys.stdout = codecs.getwriter('utf8')(sys.stdout) #+END_SRC There are other methods, for example resetting the default encoding in the site-wide file site.py, but that is not very portable. Hope this helps, Christian -- Christian Wittern, Kyoto
[O] Bug: Literal Examples are malformed in exports (to html/tex) [8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. I add a literal example like #+BEGIN_SRC (defun org-xor (a b) Exclusive or. (if a (not b) b)) #+END_SRC and #+BEGIN_EXAMPLE (defun org-xor (a b) Exclusive or. (if a (not b) b)) #+END_EXAMPLE to an org file in various places. Export with (org-html-export-to-html) and (org-latex-export-to-latex) produces inconsistent and malformed example blocks. Some of these blocks produce p #+BEGINsubEXAMPLE/sub (defun org-xor (a b) Exclusive or. (if a (not b) b)) /p Others produce p (defun org-xor (a b) Exclusive or. (if a (not b) b)) /p and \#+BEGIN$_{\text{EXAMPLE}}$ (defun org-xor (a b) Exclusive or. (if a (not b) b)) \#+END$_{\text{EXAMPLE}}$ vs \begin{example } (defun org-xor (a b) Exclusive or. (if a (not b) b)) \end{example I expect to see correctly created example areas that maintain spacing/tabs/newlines. I add the following before an example block #+ATTR_HTML: :textarea t :width 40 and it creates div textarea=t width=40 class=example p (defun org-xor (a b) Exclusive or. (if a (not b) b)) /p NOTE: I do not believe that I have a mixed install. By deleting org-mode 8.0.3 and using the built-in 7.8.11 these problems are resolved. Emacs : GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-11-10 on charichuelo, modified by Debian Package: Org-mode version 8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/) current state: == (setq org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-latex-format-headline-function 'org-latex-format-headline-default-function org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)) ) (lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append) (quote local)) ) org-babel-result-hide-spec org-babel-hide-all-hashes) org-metadown-hook '(org-babel-pop-to-session-maybe) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-confirm-shell-link-function 'yes-or-no-p )
Re: [O] [PATCH] org-contacts.el: add expire feature
Daimrod daim...@gmail.com writes: updated patch; From b0851e4c48e4c2e67fd8aafdf04951e764e07ccf Mon Sep 17 00:00:00 2001 From: Feng Shu tuma...@gmail.com Date: Wed, 29 May 2013 20:30:43 +0800 Subject: [PATCH] Add a feature, which can ignore emails or phones with property * contrib/lisp/org-contacts.el (org-contacts-ignore-property): New variable. (org-contacts-remove-ignored-property-values): New function, which remove all ignore-list's elements from list. (org-contacts-complete-name): When completing, ignore the values which has been included into the ignore property. (org-contacts-vcard-format): Don't export the values which has been included into the ignore property. If emails or phones is included into the ignore property, they will not show in complete buffer. When the contact is exported to vcard, they will be ignored too. --- contrib/lisp/org-contacts.el | 31 ++- 1 个文件被修改,插入 26 行(+),删除 5 行(-) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 7b0b603..1be0ac9 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -86,6 +86,11 @@ When set to nil, all your Org files will be used. :type 'string :group 'org-contacts) +(defcustom org-contacts-ignore-property IGNORE + Name of the property, which values will be ignored when complete or export to vcard. + :type 'string + :group 'org-contacts) + (defcustom org-contacts-birthday-format Birthday: %l (%Y) Format of the anniversary agenda entry. @@ -476,6 +481,13 @@ A group FOO is composed of contacts with the tag FOO. (completion-table-case-fold completion-list (not org-contacts-completion-ignore-case + +(defun org-contacts-remove-ignored-property-values (ignore-list list) + Remove all ignore-list's elements from list. + (remove-if (lambda (el) + (member el ignore-list)) + list)) + (defun org-contacts-complete-name (start end string) Complete text at START with a user name and email. (let* ((completion-ignore-case org-contacts-completion-ignore-case) @@ -484,10 +496,17 @@ A group FOO is composed of contacts with the tag FOO. ;; The contact name is always the car of the assoc-list ;; returned by `org-contacts-filter'. for contact-name = (car contact) + + ;; Build the list of the email addresses which has + ;; been expired + for ignore-list = (org-contacts-split-property (or +(cdr (assoc-string org-contacts-ignore-property + (caddr contact))) )) ;; Build the list of the user email addresses. - for email-list = (org-contacts-split-property (or - (cdr (assoc-string org-contacts-email-property - (caddr contact))) )) + for email-list = (org-contacts-remove-ignored-property-values ignore-list + (org-contacts-split-property (or + (cdr (assoc-string org-contacts-email-property + (caddr contact))) ))) ;; If the user has email addresses… if email-list ;; … append a list of USER EMAIL. @@ -869,15 +888,17 @@ to do our best. (n (org-contacts-vcard-encode-name name)) (email (cdr (assoc-string org-contacts-email-property properties))) (tel (cdr (assoc-string org-contacts-tel-property properties))) + (ignore (cdr (assoc-string org-contacts-ignore-property properties))) (note (cdr (assoc-string org-contacts-note-property properties))) (bday (org-contacts-vcard-escape (cdr (assoc-string org-contacts-birthday-property properties (addr (cdr (assoc-string org-contacts-address-property properties))) (nick (org-contacts-vcard-escape (cdr (assoc-string org-contacts-nickname-property properties (head (format BEGIN:VCARD\nVERSION:3.0\nN:%s\nFN:%s\n n name)) + (ignore-list (when ignore (setq ignore-list (org-contacts-split-property ignore emails-list result phones-list) (concat head (when email (progn - (setq emails-list (org-contacts-split-property email)) + (setq emails-list (org-contacts-remove-ignored-property-values ignore-list (org-contacts-split-property email))) (setq result ) (while emails-list (setq result (concat result EMAIL: (org-contacts-strip-link (car emails-list)) \n)) @@ -886,7 +907,7 @@ to do our best. (when addr (format ADR:;;%s\n (replace-regexp-in-string \\, ? ; addr))) (when tel (progn - (setq phones-list (org-contacts-split-property tel)) + (setq phones-list (org-contacts-remove-ignored-property-values ignore-list (org-contacts-split-property tel))) (setq result ) (while phones-list (setq result (concat result TEL: (org-contacts-strip-link (car phones-list)) \n)) -- 1.7.10.4
Re: [O] [PATCH] org-contacts.el: add expire feature
Daimrod daim...@gmail.com writes: This is not very idiomatic elisp, I would write something more like: #+BEGIN_SRC emacs-lisp (remove-if (lambda (el) (member el expire-list)) list) #+END_SRC Thanks! Is this possible? test1@g = te...@gmail.com
Re: [O] [PATCH] org-contacts.el: ignore emails or phones with ignore property
updated patch From b0851e4c48e4c2e67fd8aafdf04951e764e07ccf Mon Sep 17 00:00:00 2001 From: Feng Shu tuma...@gmail.com Date: Wed, 29 May 2013 20:30:43 +0800 Subject: [PATCH] Add a feature, which can ignore emails or phones with property * contrib/lisp/org-contacts.el (org-contacts-ignore-property): New variable. (org-contacts-remove-ignored-property-values): New function, which remove all ignore-list's elements from list. (org-contacts-complete-name): When completing, ignore the values which has been included into the ignore property. (org-contacts-vcard-format): Don't export the values which has been included into the ignore property. If emails or phones is included into the ignore property, they will not show in complete buffer. When the contact is exported to vcard, they will be ignored too. --- contrib/lisp/org-contacts.el | 31 ++- 1 个文件被修改,插入 26 行(+),删除 5 行(-) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 7b0b603..1be0ac9 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -86,6 +86,11 @@ When set to nil, all your Org files will be used. :type 'string :group 'org-contacts) +(defcustom org-contacts-ignore-property IGNORE + Name of the property, which values will be ignored when complete or export to vcard. + :type 'string + :group 'org-contacts) + (defcustom org-contacts-birthday-format Birthday: %l (%Y) Format of the anniversary agenda entry. @@ -476,6 +481,13 @@ A group FOO is composed of contacts with the tag FOO. (completion-table-case-fold completion-list (not org-contacts-completion-ignore-case + +(defun org-contacts-remove-ignored-property-values (ignore-list list) + Remove all ignore-list's elements from list. + (remove-if (lambda (el) + (member el ignore-list)) + list)) + (defun org-contacts-complete-name (start end string) Complete text at START with a user name and email. (let* ((completion-ignore-case org-contacts-completion-ignore-case) @@ -484,10 +496,17 @@ A group FOO is composed of contacts with the tag FOO. ;; The contact name is always the car of the assoc-list ;; returned by `org-contacts-filter'. for contact-name = (car contact) + + ;; Build the list of the email addresses which has + ;; been expired + for ignore-list = (org-contacts-split-property (or +(cdr (assoc-string org-contacts-ignore-property + (caddr contact))) )) ;; Build the list of the user email addresses. - for email-list = (org-contacts-split-property (or - (cdr (assoc-string org-contacts-email-property - (caddr contact))) )) + for email-list = (org-contacts-remove-ignored-property-values ignore-list + (org-contacts-split-property (or + (cdr (assoc-string org-contacts-email-property + (caddr contact))) ))) ;; If the user has email addresses… if email-list ;; … append a list of USER EMAIL. @@ -869,15 +888,17 @@ to do our best. (n (org-contacts-vcard-encode-name name)) (email (cdr (assoc-string org-contacts-email-property properties))) (tel (cdr (assoc-string org-contacts-tel-property properties))) + (ignore (cdr (assoc-string org-contacts-ignore-property properties))) (note (cdr (assoc-string org-contacts-note-property properties))) (bday (org-contacts-vcard-escape (cdr (assoc-string org-contacts-birthday-property properties (addr (cdr (assoc-string org-contacts-address-property properties))) (nick (org-contacts-vcard-escape (cdr (assoc-string org-contacts-nickname-property properties (head (format BEGIN:VCARD\nVERSION:3.0\nN:%s\nFN:%s\n n name)) + (ignore-list (when ignore (setq ignore-list (org-contacts-split-property ignore emails-list result phones-list) (concat head (when email (progn - (setq emails-list (org-contacts-split-property email)) + (setq emails-list (org-contacts-remove-ignored-property-values ignore-list (org-contacts-split-property email))) (setq result ) (while emails-list (setq result (concat result EMAIL: (org-contacts-strip-link (car emails-list)) \n)) @@ -886,7 +907,7 @@ to do our best. (when addr (format ADR:;;%s\n (replace-regexp-in-string \\, ? ; addr))) (when tel (progn - (setq phones-list (org-contacts-split-property tel)) + (setq phones-list (org-contacts-remove-ignored-property-values ignore-list (org-contacts-split-property tel))) (setq result ) (while phones-list (setq result (concat result TEL: (org-contacts-strip-link (car phones-list)) \n)) -- 1.7.10.4 --
Re: [O] [PATCH] org.el: Don't flyspell check within source code blocks
Thanks, Bastien. Your suggestion has been working perfectly fine for me. Updated patch sent in reply to the first in the chain (I hope ... still trying to master git send-email). Trevor On Sat, May 25, 2013 at 11:52 AM, Bastien b...@gnu.org wrote: Hi Trevor, Trevor Murphy trevor.m.mur...@gmail.com writes: + (not (eq (org-element-type (org-element-at-point)) 'src-block) I think `org-in-src-block-p', while a bit less reliable, will be faster, and reliable/fast enough for this use-case. Let's see what others think/test. Thanks, -- Bastien
Re: [O] Bug: Literal Examples are malformed in exports (to html/tex) [8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/)]
On Thu, May 30, 2013 at 7:36 AM, Nicolas Goaziou n.goaz...@gmail.com wrote: S S super.quazim...@gmail.com writes: I've added test.org and test_no_init.org along with their html exports plus my init.el to a gist. https://gist.github.com/quazimodo/9055aca6167df1398c94 The init.el is long but you'll see from a fast skim there's nothing unusual there. Indeed. But I suspect something wrong in your config: your example exports correctly here. After fixing up begin_code to begin_src I see that you are right, working fine with 7.8.11 and no init.el 7.8.11 is used with emacs -q and that seems to export the example blocks properly, doesn't seem to know what to do with code blocks though. Constructs like #+begin_code are called special blocks. They are not meant to be used for source code. Use #+begin_src instead. Correct, it was late and I made a mistake, should have put #+BEGIN_SRC. Do you need more? What happens if you eval (org-element-at-point) with point on the faulty #+begin_example line? It returns (special-block (:type EXAMPLE\n :begin 8 :end 178 :hiddenp nil :contents-begin 69 :contents-end 157 :post-blank 2 :post-affiliated 48 :attr_html (:textarea t :width 40) :parent nil)) Also, what's the value for `org-element-block-name-alist'? org-element-block-name-alist is ((CENTER . org-element-center-block-parser) (COMMENT . org-element-comment-block-parser) (EXAMPLE . org-element-example-block-parser) (QUOTE . org-element-quote-block-parser) (SRC . org-element-src-block-parser) (VERSE . org-element-verse-block-parser)) Everything looks fine doesn't it... Regards, -- Nicolas Goaziou I'll remove 8.0.3 and go back to 7.8.11, to see if my init is causing issues and update you later today.
Re: [O] Bug: Literal Examples are malformed in exports (to html/tex) [8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/)]
On Thu, May 30, 2013 at 11:16 AM, S S super.quazim...@gmail.com wrote: On Thu, May 30, 2013 at 7:36 AM, Nicolas Goaziou n.goaz...@gmail.com wrote: S S super.quazim...@gmail.com writes: I've added test.org and test_no_init.org along with their html exports plus my init.el to a gist. https://gist.github.com/quazimodo/9055aca6167df1398c94 The init.el is long but you'll see from a fast skim there's nothing unusual there. Indeed. But I suspect something wrong in your config: your example exports correctly here. After fixing up begin_code to begin_src I see that you are right, working fine with 7.8.11 and no init.el 7.8.11 is used with emacs -q and that seems to export the example blocks properly, doesn't seem to know what to do with code blocks though. Constructs like #+begin_code are called special blocks. They are not meant to be used for source code. Use #+begin_src instead. Correct, it was late and I made a mistake, should have put #+BEGIN_SRC. Do you need more? What happens if you eval (org-element-at-point) with point on the faulty #+begin_example line? It returns (special-block (:type EXAMPLE\n :begin 8 :end 178 :hiddenp nil :contents-begin 69 :contents-end 157 :post-blank 2 :post-affiliated 48 :attr_html (:textarea t :width 40) :parent nil)) Also, what's the value for `org-element-block-name-alist'? org-element-block-name-alist is ((CENTER . org-element-center-block-parser) (COMMENT . org-element-comment-block-parser) (EXAMPLE . org-element-example-block-parser) (QUOTE . org-element-quote-block-parser) (SRC . org-element-src-block-parser) (VERSE . org-element-verse-block-parser)) Everything looks fine doesn't it... Regards, -- Nicolas Goaziou I'll remove 8.0.3 and go back to 7.8.11, to see if my init is causing issues and update you later today. Done, everything works fine, I'm starting to think that this is an issue with the way that I installed org-mode. Actually I followed http://orgmode.org/org.html#Installation using the git method exactly. Finally, if I reinstall it org-version sends the following message, which I thought means that it is correctly installed and using new files only. Org-mode version 8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/)
[O] default face org-column
Hi, In org-faces.el, (when (fboundp 'set-face-attribute) ;; Make sure that a fixed-width face is used when we have a column table. (set-face-attribute 'org-column nil :height (face-attribute 'default :height) :family (face-attribute 'default :family))) I understand why you did this, but it is not quite logical, and somewhat invasive. First, you certainly do not do this with org-table. Then why org-column specifically? Second, it overwrites the the value I set in the emacs theme or custom-set-faces. Third, the end result is quite bizarre and odd-looking. The default height and default family is some how not what I set for the frame, because the font family and size is set when emacs starts up and loaded the org-mode. When I use set-frame-font or text-scale-adjust, org-column will stick with the old font family and size. In fact, because the font family for org-column and org-column-title are different, the result is just bad. I don't think it is only my problem, but I'll describe my setup for themes/font. I use default-frame-alist to set the font family and size—The above code will not pick up this setup. I use load-theme and enable-theme to load the theme I want. Sometimes I use set-frame-font or text-scale-adjust to get a pleasantly looking texts temporary. I usually use fixed-width font, so the above code is not doing any good. For the time being, I commented out the above code. Best, Xiao-Yong