Re: [O] Table alignment
> There is something in my .emacs that messes up table alignment in > org. Have been struggling to find it. If I remove my .emacs, table > alignment is fine. OK. Looks like you have been experiementing with different fonts. Is Liberation Sans-10 a monospaced font or a variable pitch (Is this terminology correct). Table alignment works only if all characters occupy the same width. Focus on (set-default-font ...) stuff. FWIW, This is what I use. , | gdi:-raster-Courier-normal-normal-normal-mono-20-*-*-*-c-*-iso8859-1 (#x62) ` Jambunathan K. --
Re: [O] deadline :: schedualed :: or-later
Hi Viktor, Viktor Rosenfeld wrote: > - There's no way (AFAIK) to reschedule a simple timestamp from the > agenda. You have to hit RET on the entry to visit the org file and > then you can change the date with C-c !. You can do C-c C-s from the agenda directly. Even using only the right (or left) arrow keys to move your date by one day. Best regards, Seb -- Sebastien Vauban
Re: [O] deadline :: schedualed :: or-later
On Aug 31, 2011, at 9:25 AM, Sebastien Vauban wrote: > Hi Viktor, > > Viktor Rosenfeld wrote: >> - There's no way (AFAIK) to reschedule a simple timestamp from the >> agenda. You have to hit RET on the entry to visit the org file and >> then you can change the date with C-c !. > > You can do C-c C-s from the agenda directly. Even using only the right (or > left) arrow keys with the SHIFT key pressed > to move your date by one day. > > Best regards, > Seb > > -- > Sebastien Vauban > > - Carsten
Re: [O] Unicode and Latex export
> Do you have any suggestions what fonts that would be > appropriate here? http://www.thessalonica.org.ru/en/fonts-download.html http://scholarsfonts.net/ - a
Re: [O] Change in org-babel with indenting code blocks?
Hello, John Wiegley writes: > I've been shifting code-containing entries for many months now. This only > just started happening. You're right, this change (6b04bef) was introduced on 18th August, to fix a bug that eludes me. Without that information, it's somewhat hard to know how to fix it properly. Let's wait for his author to come back. Regards, -- Nicolas Goaziou
Re: [O] Change in org-babel with indenting code blocks?
Nicolas Goaziou wrote: > Hello, > > John Wiegley writes: > > > I've been shifting code-containing entries for many months now. This only > > just started happening. > > You're right, this change (6b04bef) was introduced on 18th August, to > fix a bug that eludes me. Without that information, it's somewhat hard > to know how to fix it properly. > Perhaps Seb Vauban identified the bug correctly (earlier in this thread): he pointed to the thread entitled "Extra space inserted in repeated task's date line" - see http://thread.gmane.org/gmane.emacs.orgmode/45623 And while I'm at it, what is "r" bound to? In my case, it is 'org-self-insert-command: even after turning on org-indent-mode, "r" self-inserts. What am I missing? Thanks, Nick
Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table
András Major wrote: > Hi Eric, > > > Can you post an example? Here is a working example. > > In your example, simply write "asymptote" in place of "sh" and replace the > code by "size(100);" just to make sure it's valid asymptote (though the > error occurs even if you don't). In fact, I'm quite sure that asy never > gets executed in this case. > Yes, even without any asymptote code, this breaks. But there seem to be multiple problems. One is fix-empty-lines, a local routine defines inside org-babel-asymptote-table-to-array: it seems to assume that the table is a list of lists, whereas in this case it's a list of strings. The following patch (which probably is wrong, in that it cures the symptom rather than the disease): diff --git a/lisp/ob-asymptote.el b/lisp/ob-asymptote.el index 89aecb7..39156d2 100644 --- a/lisp/ob-asymptote.el +++ b/lisp/ob-asymptote.el @@ -139,7 +139,7 @@ (defun org-babel-asymptote-table-to-array (table type params) (atom-to-string (cdr table)) ;; Remove any empty row (fix-empty-lines (table) -(delq nil (mapcar (lambda (l) (delq "" l)) table +(delq nil (mapcar (lambda (l) (if (listp l) (delq "" l) l)) table (orgtbl-to-generic (fix-empty-lines (atom-to-string table)) (org-combine-plists '(:hline nil :sep "," :tstart "{" :tend "}") params lets things go a bit further, but there is mayhem in orgtbl-format-line, which is called by orgtbl-format-section, which is called by orgtbl-to-generic above, and I didn't go any further: I just don't know what the preconditions are on these routines. Nick
Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table
Hello, Nick Dokos writes: > András Major wrote: > >> Hi Eric, >> >> > Can you post an example? Here is a working example. >> >> In your example, simply write "asymptote" in place of "sh" and replace the >> code by "size(100);" just to make sure it's valid asymptote (though the >> error occurs even if you don't). In fact, I'm quite sure that asy never >> gets executed in this case. >> > > Yes, even without any asymptote code, this breaks. But there seem to be > multiple problems. One is fix-empty-lines, a local routine defines > inside org-babel-asymptote-table-to-array: it seems to assume that the table > is a list of lists, whereas in this case it's a list of strings. The > following patch (which probably is wrong, in that it cures the symptom > rather than the disease): Yes, the problem is more general: uni-dimensional lists are not handled correctly. I attach a patch that should fix the problem (and simplify a lot that whole process). One thing, though. Now, | 1 | 2 | and (but this was already the case) | 1 | | 2 | are treated as bi-dimensional arrays, because that's how they really are passed to ob-asymptote. Regards, -- Nicolas Goaziou >From 82ae786a8ed1248a62912272edec6f8fa7df4d12 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 31 Aug 2011 11:11:31 +0200 Subject: [PATCH 1/2] ob-asymptote: full support for uni-dimensional lists * lisp/ob-asymptote.el (org-babel-asymptote-var-to-asymptote): recognize non-nested lists as uni-dimensional arrays. --- lisp/ob-asymptote.el | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/ob-asymptote.el b/lisp/ob-asymptote.el index 89aecb7..f90bb85 100644 --- a/lisp/ob-asymptote.el +++ b/lisp/ob-asymptote.el @@ -97,9 +97,8 @@ Asymptote does not support sessions" The elisp value PAIR is converted into Asymptote code specifying a variable of the same value." (let ((var (car pair)) -(val (if (symbolp (cdr pair)) - (symbol-name (cdr pair)) - (cdr pair +(val (let ((v (cdr pair))) + (if (symbolp v) (symbol-name v) v (cond ((integerp val) (format "int %S=%S;" var val)) @@ -107,14 +106,17 @@ a variable of the same value." (format "real %S=%S;" var val)) ((stringp val) (format "string %S=\"%s\";" var val)) + ((and (listp val) (not (listp (car val + (let* ((type (org-babel-asymptote-define-type val)) + (fmt (if (eq 'string type) "\"%s\"" "%s")) + (vect (mapconcat (lambda (e) (format fmt e)) val ", "))) + (format "%s[] %S={%s};" type var vect))) ((listp val) - (let* ((dimension-2-p (cdr val)) - (dim (if dimension-2-p "[][]" "[]")) - (type (org-babel-asymptote-define-type val)) + (let* ((type (org-babel-asymptote-define-type val)) (array (org-babel-asymptote-table-to-array val type - (if dimension-2-p '(:lstart "{" :lend "}," :llend "}") -(format "%S%s %S=%s;" type dim var array)) + '(:lstart "{" :lend "}," :llend "}" +(format "%S[][] %S=%s;" type var array)) (defun org-babel-asymptote-table-to-array (table type params) "Convert values of TABLE into a string of an asymptote array. -- 1.7.6.1 >From 2e3b7579649ead40128e3c8e31ca75ced139285d Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 31 Aug 2011 11:26:29 +0200 Subject: [PATCH 2/2] ob-asymptote: simplify table to array conversion process * lisp/ob-asymptote.el (org-babel-asymptote-var-to-asymptote): refactor code. (org-babel-asymptote-table-to-array): removed function. --- lisp/ob-asymptote.el | 40 1 files changed, 8 insertions(+), 32 deletions(-) diff --git a/lisp/ob-asymptote.el b/lisp/ob-asymptote.el index f90bb85..2219e03 100644 --- a/lisp/ob-asymptote.el +++ b/lisp/ob-asymptote.el @@ -113,38 +113,14 @@ a variable of the same value." (format "%s[] %S={%s};" type var vect))) ((listp val) (let* ((type (org-babel-asymptote-define-type val)) - (array (org-babel-asymptote-table-to-array - val type - '(:lstart "{" :lend "}," :llend "}" -(format "%S[][] %S=%s;" type var array)) - -(defun org-babel-asymptote-table-to-array (table type params) - "Convert values of TABLE into a string of an asymptote array. - -TABLE is a list whose atoms are assumed to be of type -TYPE. PARAMS is a plist of parameters that can influence the -conversion. - -Empty cells are ignored." - (labels ((atom-to-string (table) - (cond -((null table) '()) -((not (listp (car table))) - (cons (if (or (eq type 'string) - (and (stringp (car table)) -(not (string= (car table) "")
Re: [O] Table alignment
> > Focus on (set-default-font ...) stuff. Thanks Jambunathan and Mikhail, The problem is with the font stuff and, strangely, with desktop. I need to comment out the region dealing with fonts, and the following line to make the tables align. (desktop-save-mode 1) Has anyone else had a problem with use of desktop-save-mode? Vikas
[O] Problem with org-crypt
Hi all, I've been using org-crypt and find it a great little addition to org-mode, but I have been noticing some weird behaviour. When I'm in a file that has NO encrypted entires (or :crypt: tags) and I archive a sub tree, I get asked the question "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer?". This must mean org-decrypt-entry is being run but I don't understand why. I've noticed that org-decrypt-entry is added to the org-reveal-start-hook, I'm not sure why that is. When I don't add it to that hook, I no longer get asked that question and org-crypt still apears to work as expected, but I'm not sure if this will have broken something else. Does anyone know why org-decrypt-entry is added to the org-reveal-start-hook and if it would break anything if I don't add it? Thanks for the help Chris.
Re: [O] Table alignment
> FWIW, This is what I use. > > , > | gdi:-raster-Courier-normal-normal-normal-mono-20-*-*-*-c-*-iso8859-1 (#x62) > ` > My tables are not aligned with even this font. I did. (set-default-font "-raster-Courier-normal-normal-normal-mono-20-*-*-*-c-*-iso8859-1") So, for the moment all settings for fonts and desktop-save-mode are disabled. Vikas
Re: [O] Bug: wrong-type-argument when changing TODO state [7.7]
On 30.08.2011 19:21, Nick Dokos wrote: Nick Dokos wrote: I'm pretty tired and I might have misunderstood what is happening here, so don't put too much weight on the following. I'll need some sleep before I can take a whack at it again however. Nick Nick Dokos wrote: Stelian Iancu wrote: So it is a customization issue. Now the question is what :-). I should mention that I am using both dev versions for Emacs and org-mode (Emacs from bzr from a few days ago and org-mode from git from a few days ago) on Mac OS X 10.7. Emacs is installed using homebrew. Ok, it seems like I've found the culprit. It's this line: ;; Make org-mode default for all the new files (setq major-mode 'org-mode) If I comment it out, it all works beautifully. I thought it was because I was executing it before loading org-mode, but I've made sure org-mode is loaded before executing that line and I still get the same error. Any ideas why it happens? Yes - don't ever do that. The major mode of a buffer is set by calling a function (e.g. the org-mode function for buffers that should be in org mode). That function does a million things to make sure that everything works properly: your setting a single variable does none of that and all you end up doing is confusing emacs. In most cases, you don't even call the mode function explicitly: it is called for you automatically, e.g. through the setting of auto-mode-alist. I have the following in my basic customizations: (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) That says to emacs: when find-file is called to open a file whose name ends in `.org' arrange to call the function org-mode on it. The function takes care of the setting of major-mode. Be sure to read Ch.23 of the emacs manual on major modes. This is all correct I think (except for the ominous first sentence). But having (setq major-mode 'org-mode) in one's .emacs should not have any effect: major-mode is buffer local, so the setting above should not have any effect on *anything*, afaict. To make org-mode the default mode for new buffers, you'd have to say (setq-default major-mode 'org-mode) I've added each of those to my minimal .emacs and I have no problem using S-{right,left} to change the TODO state in a .org file. When I set org-mode to be the default major mode and I open an unrelated file, its major mode is set to org-mode, but when I S-{right,left} at some arbitrary place, I get a message: To use shift-selection with Org-mode, customize `org-support-shift-select' and the corresponding message in the *Messages* buffer is: if: To use shift-selection with Org-mode, customize `org-support-shift-select' That's an error, but it's a "reasonable" error: not right but not too bad. And when I ``find-file foo.bar'' which would normally open it in fundamental mode, I do get it in org-mode and everything works as it should: I can add headlines and change TODO states normally. So to summarize: no idea why that setting should have any effect at all. Nick PS. The only possible explanation I can think of is version differences: Org-mode version 7.7 (release_7.7.205.gce02a) GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 2011-07-30 I have not tried with emacs 23. You are right, adding either of the two settings to the minimal .emacs doesn't change anything, it still works. I'm on: GNU Emacs 24.0.50.1 (i386-apple-darwin11.1.0, NS apple-appkit-1138.00) of 2011-08-24 on iancumac.local Org-mode version 7.7 (release_7.4.1639.gd203.dirty) The interesting thing though is that it works now with the normal configuration, after removing the setting, even though it shouldn't have any effect. Thanks, S.
Re: [O] [odt] equation labels
Jambunathan, >> On Sun, 28 Aug 2011 03:32:10 +0530, Jambunathan K said: > Myles >> Does anyone know how to cause a label such as "Figure 1." in the >> odt (for the resulting png), and set the caption for an equation >> such as: >> >> #+CAPTION: some caption #+LABEL: eqn:psychrometric >> \begin{equation*} \label{eq:psychrometric} \capillaryPressure = >> ln(RH)\cdot \dens_w\frac{RT}{M_w} \end{equation*} Sorry for the red herring: the equation above would never have worked without mystyle.sty whose content includes: \newcommand{\pressure}{p} \newcommand{\capillaryPressure}{{\pressure_{c}}} \newcommand{\dens_w}{\rho_w} and is included by: #+LATEX_HEADER: \usepackage{/home/myles/path/to/report/mystyle} > I have added support for honoring captions, label and attributes for > images that are dervied from latex fragments. Checkout the git repo > and let me know if there are any rough edges that need to be ironed > out. Thank you! I have just got around to trying this out and it works great. The only issue now is that the resolution of the pngs is low and looks terrible. I vaguely remember changing it deep in my latex installation somewhere. > Note that the odt exporter treats Labels and their references in a > special way. > For example, if the label is defined as follows, > #+LABEL: Equation:1 > Equation is considered as a "Category" [1] and "1" is considered as > sequence number. So this "category:seq-no" is the recommended form > of labels for odt export. Note that the seq-no found in Org file > need not be sequential. The odt exporter will faithfully reproduce > the seqnos as seen Org file to the odt file. You can auto-generate > the "right" seqnos by using Tools->Update->Update All. > If you are averse to launching the gui for updating of indices you > can do a odt->odt (yes, odt->odt) conversion for sanitizing of > indices [2]. > It is also worth noting that the attached file uses the as yet > undocumented > #+ATTR_ODT: (:scale 2) > to scale the image to twice the original size. > Jambunathan K. I your previous post you asked for my org file but I think that it is superseded by your attachment? When I have finished this report I am working on I'll cut it down and offer it as an example if you like. Myles
Re: [O] [odt] equation labels
On Wed, Aug 31, 2011 at 1:09 PM, Myles English wrote: > I your previous post you asked for my org file but I think that it is > superseded by your attachment? When I have finished this report I am > working on I'll cut it down and offer it as an example if you like. Examples like these are always a welcome addition to Worg. :) -- Suvayu Open source is the future. It sets us free.
Re: [O] [odt] equation labels
>> On Wed, 31 Aug 2011 12:09:58 +0100, Myles English said: >> I have added support for honoring captions, label and attributes >> for images that are dervied from latex fragments. Checkout the git >> repo and let me know if there are any rough edges that need to be >> ironed out. > Thank you! I have just got around to trying this out and it works > great. The only issue now is that the resolution of the pngs is low > and looks terrible. I vaguely remember changing it deep in my latex > installation somewhere. Actually there is an old (2006) thread including a patch about a file option to change the resolution: http://lists.gnu.org/archive/html/emacs-orgmode/2006-09/msg00010.html But I don't think it was applied and I am not sure how it would fit in the current scheme. Can anyone advise? Myles
Re: [O] Bug: Babel: asymptote: erroneous conversion of heterogeneous-typed table
Nicolas Goaziou writes: > Hello, > > Nick Dokos writes: > >> András Major wrote: >> >>> Hi Eric, >>> >>> > Can you post an example? Here is a working example. >>> >>> In your example, simply write "asymptote" in place of "sh" and replace the >>> code by "size(100);" just to make sure it's valid asymptote (though the >>> error occurs even if you don't). In fact, I'm quite sure that asy never >>> gets executed in this case. >>> >> >> Yes, even without any asymptote code, this breaks. But there seem to be >> multiple problems. One is fix-empty-lines, a local routine defines >> inside org-babel-asymptote-table-to-array: it seems to assume that the table >> is a list of lists, whereas in this case it's a list of strings. The >> following patch (which probably is wrong, in that it cures the symptom >> rather than the disease): > > Yes, the problem is more general: uni-dimensional lists are not handled > correctly. > > I attach a patch that should fix the problem (and simplify a lot that > whole process). > > One thing, though. Now, > > | 1 | 2 | > > and (but this was already the case) > > | 1 | > | 2 | > > are treated as bi-dimensional arrays, because that's how they really are > passed to ob-asymptote. > Thanks Nicolas, both of these patches are now applied. -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] deadline :: schedualed :: or-later
Hi Sebastien, Sebastien Vauban wrote: > Viktor Rosenfeld wrote: > > - There's no way (AFAIK) to reschedule a simple timestamp from the > > agenda. You have to hit RET on the entry to visit the org file and > > then you can change the date with C-c !. > > You can do C-c C-s from the agenda directly. Even using only the right (or > left) arrow keys to move your date by one day. Modifying a *simple* timestamp with Shift-arrow-left/right works, but C-c C-s will ignore the simple timestamp and insert a *new* timestamp with SCHEDULED prepended. What I'm looking for is a way to reschedule a meeting that only has a *simple* timestamp (no DEADLINE or SCHEDULED). Cheers, Viktor
[O] Date-centric Clocktable
Hi, Is is possible to have a clocktabke with times in the left-most column? The people I am doing some work for now prefer it that way for unknown reasons. This is an example | date | Headline| total | |+-+---| | [2011-08-19 Fri 00:28]--[2011-08-19 Fri 00:51] | Writing mails | 0:23 | | [2011-06-22 Wed 17:00]--[2011-06-22 Wed 17:45] | Data processing | 0:45 | And so forth. Thanks, Rasmus -- Sent from my Emacs
Re: [O] deadline :: schedualed :: or-later
On Aug 31, 2011, at 2:15 PM, Viktor Rosenfeld wrote: > Hi Sebastien, > > Sebastien Vauban wrote: > >> Viktor Rosenfeld wrote: >>> - There's no way (AFAIK) to reschedule a simple timestamp from the >>> agenda. You have to hit RET on the entry to visit the org file and >>> then you can change the date with C-c !. >> >> You can do C-c C-s from the agenda directly. Even using only the right (or >> left) arrow keys to move your date by one day. > > Modifying a *simple* timestamp with Shift-arrow-left/right works, This is the only way currently to remote-modify simple timestamps. > but > C-c C-s will ignore the simple timestamp and insert a *new* timestamp > with SCHEDULED prepended. > > What I'm looking for is a way to reschedule a meeting that only has a > *simple* timestamp (no DEADLINE or SCHEDULED). > > Cheers, > Viktor > - Carsten
[O] Use (org-entry-properties) in a mode derived from org-mode
Hi! I'd like to derive a mode from org-mode. I do something like this: (define-derived-mode derived-org-mode org-mode "dorg" "derived org-mode" (message "derived-org-mode activated") ) When I activate the derived-org-mode, M-: (org-entry-properties) does no longer work. Using org-mode it works. When I use derived-mode-p in org-mode-p everything works: (defsubst org-mode-p () "Check if the current buffer is in Org-mode or a derived mode." ;;(eq major-mode 'org-mode)) (if (derived-mode-p 'org-mode) t nil)) I think changing org-mode-p should be the correct change to make deriving from org-mode work. Perhaps a (if (symbolp 'derived-mode-p) ...) is necessary to avoid compatibility problems. What do the org developers think of this improvement? Stefan.
[O] exporting babel stuff to pdf or latex
Hi, I need help with exporting this: #+begin_src R :exports both :results output Lst <- list(length=c(1,7,9), time=c(0.5,10,11)) print(Lst$time) #+end_src It fails with these messages Export buffer: Exporting to PDF... Exporting to LaTeX... org-babel-exp processing... org-babel-get-src-block-info: Args out of range: "", -1, 0 Any obvious reason why? Thank you. Eythan
Re: [O] [odt] equation labels
Myles English writes: >>> On Wed, 31 Aug 2011 12:09:58 +0100, Myles English said: > > >> I have added support for honoring captions, label and attributes > >> for images that are dervied from latex fragments. Checkout the git > >> repo and let me know if there are any rough edges that need to be > >> ironed out. > > > Thank you! I have just got around to trying this out and it works > > great. The only issue now is that the resolution of the pngs is low > > and looks terrible. I vaguely remember changing it deep in my latex > > installation somewhere. > > Actually there is an old (2006) thread including a patch about a file > option to change the resolution: > > http://lists.gnu.org/archive/html/emacs-orgmode/2006-09/msg00010.html INCREASING the `:html-scale' scale property in `org-format-latex-options' will INCREASE the `-D' option by same factor. I believe the above setting together with a "suitable" value of #+ATTR_ODT: (:scale xxx) will achieve the required balance. If you have lots of equations then applying #+ATTR_ODT option to each of the images is a bit cumbersome. In that case you can tweak `org-export-odt-pixels-per-inch' (The default value of this variable is same as `display-pixels-per-inch' variable of Emacs session). HALVING this variable will DOUBLE the size of all images uniformly. Note for posterity: 1. ODT expects that the image size be specified in cms or inches. I believe image files have no "physical" dimensions associated with them but only pixel size. Mapping from pixels to cms or inches is again determined by display properties (ie, the same image will appear in different physical dimensions on different monitors.) 2. On my Netbook, MS Paint uses a pixels-per-inch of 96.0 while Emacs' display-pixels-per-inch reports a value of 72.0 Image sizes are a grey area to me. If there is an expert out there willing to educate me I am all ears. Jambunathan K. > But I don't think it was applied and I am not sure how it would fit in > the current scheme. Can anyone advise? > > Myles > > > --
Re: [O] [odt] equation labels
Myles > I your previous post you asked for my org file but I think that it is > superseded by your attachment? The example I used is from my own unit test file. > When I have finished this report I am working on I'll cut it down and > offer it as an example if you like. Sure, I would very much want to receive a copy of your file with equations. I will be adding support for LaTeX->MathML in another few days time and I need some real life equations to assess the suitability of mathtoweb converter and prototype my changes [1]. Using mathml for equations will also ensure that the equations are first class citizens in the document and "scale" with the document settings. Jambunathan K. Footnotes: [1] Bonus points if your file has all manners of equations - equations that flow with the text AND equations that are rendered as paragraph. ODT exporter might have to tweak the "anchoring - character? or paragraph?" properties of the resulting embedded object depending on what manner of equation it is. --
Re: [O] exporting babel stuff to pdf or latex
Eythan Weg wrote: > > Hi, > > I need help with exporting this: > > #+begin_src R :exports both :results output > Lst <- list(length=c(1,7,9), time=c(0.5,10,11)) > print(Lst$time) > #+end_src > > It fails with these messages > >Export buffer: >Exporting to PDF... >Exporting to LaTeX... >org-babel-exp processing... >org-babel-get-src-block-info: Args out of range: "", -1, 0 > > Any obvious reason why? > > Works for me: maybe you need to upgrade? Org-mode version 7.7 (release_7.7.223.gcae9.dirty) Nick
[O] Exporting to Pinboard.in
Aloha, I have a .org file that has a structure like this: * phantogram :pix:grafix: ** http://anabuilder.free.fr/Phantogram/ * coincindence rangefinder :pix:grafix: ** http://en.wikipedia.org/wiki/Coincidence_rangefinder This is some text about the rangefinder blah blah * astronomical nebulae displayed stereoscopically:pix:grafix: ** http://nzphoto.tripod.com/astro/3dastro/ more text yada yada yada So basically: a headline, a sub headline with a URL in it and descriptive text as a child of this sub headline. Now I would like to export this to my Pinboard.in account so that the headline becomes the title, the URL becomes the URL, and the descriptive text becomes the "description". (those of you who use Pinboard.in can look tihs structure up by looking at "add url" when logged in.) Now, Pinboard.in will accept files that "it can read", and this includes bookmarks from various browsers and web services. Could anyone tell me how to do this?
Re: [O] The Orgfather
Great flatmate thinks I had a stroke now.
Re: [O] Exporting to Pinboard.in
(and, of course, the tags become tags) On Wed, Aug 31, 2011 at 4:15 PM, Aditya Mandayam wrote: > Aloha, > > I have a .org file that has a structure like this: > > * phantogram :pix:grafix: > ** http://anabuilder.free.fr/Phantogram/ > > * coincindence rangefinder :pix:grafix: > ** http://en.wikipedia.org/wiki/Coincidence_rangefinder > This is some text about the rangefinder blah blah > > * astronomical nebulae displayed stereoscopically :pix:grafix: > ** http://nzphoto.tripod.com/astro/3dastro/ > more text yada yada yada > > So basically: > > a headline, > a sub headline with a URL in it > and descriptive text as a child of this sub headline. > > Now I would like to export this to my Pinboard.in account so that the > headline becomes the title, the URL becomes the URL, and the > descriptive text becomes the "description". > > (those of you who use Pinboard.in can look tihs structure up by > looking at "add url" when logged in.) > > Now, Pinboard.in will accept files that "it can read", and this > includes bookmarks from various browsers and web services. > > Could anyone tell me how to do this? >
Re: [O] src blocks, listings package and captions
t...@tsdye.com (Thomas S. Dye) writes: > A caption-aware LaTeX environment is provided by the minted package. Thanks to Eric, Bastien and Thomas for their help. I've switched from listings to minted as I wasn't particularly wed to either and have successfully implemented Thomas' suggestions. Apologies for the delay in responding: I've been in the mountains with no connection to the world: bliss! -- Giles Chamberlin
Re: [O] Change in org-babel with indenting code blocks?
> Nick Dokos writes: > And while I'm at it, what is "r" bound to? In my case, it is > 'org-self-insert-command: even after turning on org-indent-mode, "r" > self-inserts. What am I missing? It is a "speed key", which is bound only when point is on the '*' of a headline. John
Re: [O] Change in org-babel with indenting code blocks?
John Wiegley wrote: > > Nick Dokos writes: > > > And while I'm at it, what is "r" bound to? In my case, it is > > 'org-self-insert-command: even after turning on org-indent-mode, "r" > > self-inserts. What am I missing? > > It is a "speed key", which is bound only when point is on the '*' of a > headline. > OK - thanks! Nick
Re: [O] org-mode not in elpa package list
Hi Kevin, Kevin Emerson writes: > I have run ELPAs packge-list to update to the newest version of org-mode > and I do not see org-mode in the package list. The FAQ for org-mode > suggests I post this discrepancy here. I hope the replies you already got led you somewhere. As pointing by rms, "ELPA" might be confusing. Let's try to be more specific here and say either GNU ELPA or Tromey ELPA. Org should be available through GNU ELPA¹. ¹ http://elpa.gnu.org Thanks, -- Bastien
Re: [O] Unicode and Latex export
apostrophic laboratories has a large number of handmade fonts as well, although most of them probably do not suit scholarly needs: http://apostrophiclab.pedroreina.net/ On Wed, Aug 31, 2011 at 9:30 AM, Aditya Mandayam wrote: >> Do you have any suggestions what fonts that would be >> appropriate here? > > http://www.thessalonica.org.ru/en/fonts-download.html > > http://scholarsfonts.net/ > > - a >
[O] Current patches to make org-mode run on XEmacs
... are attached. I've run with this for a few weeks now, and what I use mostly works. So I would appreciate if these could go into the git repo. Let me draw your attention to this hunk: --- a/lisp/org.el +++ b/lisp/org.el @@ -7360,7 +7360,7 @@ would end up with no indentation after the change, nothing at all is done." col) (while (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) - "\\|" "^[ \t]*" org-tsr-regexp-both "*$" + "\\|" "^[ \t]*" org-tsr-regexp-both "$" "\\|" "^[ \t]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (beginning-of-line) While I needed this to make the code run on XEmacs, it really looks like a bug fix to me: The "*" that I deleted makes that part of the disjunction match the empty string, and that makes `org-fixup-indentation' loop infinitely. -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el index 45d9441..b246636 100644 --- a/lisp/ob-calc.el +++ b/lisp/ob-calc.el @@ -28,8 +28,9 @@ ;;; Code: (require 'ob) (require 'calc) -(require 'calc-store) -(unless (featurep 'xemacs) (require 'calc-trail)) +(unless (featurep 'xemacs) + (require 'calc-trail) + (require 'calc-store)) (eval-when-compile (require 'ob-comint)) (defvar org-babel-default-header-args:calc nil diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b1fa5f5..7e4da31 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4306,8 +4306,8 @@ of what a project is and how to check if it stuck, customize the variable "\\)\\>")) (tags (nth 2 org-stuck-projects)) (tags-re (if (member "*" tags) - (org-re (concat org-outline-regexp-bol - ".*:[[:alnum:]_@#%]+:[ \t]*$")) + (concat org-outline-regexp-bol + (org-ref ".*:[[:alnum:]_@#%]+:[ \t]*$")) (if tags (concat org-outline-regexp-bol ".*:\\(" diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 3e9c202..d093700 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -251,8 +251,11 @@ Works on both Emacs and XEmacs." (defun org-activate-mark () (when (mark t) (setq mark-active t) - (unless transient-mark-mode - (setq transient-mark-mode 'lambda) + (when (and (boundp 'transient-mark-mode) +(not transient-mark-mode)) + (setq transient-mark-mode 'lambda)) + (when (boundp 'zmacs-regions) + (setq zmacs-regions t) ;; Invisibility compatibility diff --git a/lisp/org-exp.el b/lisp/org-exp.el index f795fbd..43752ca 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1028,7 +1028,8 @@ Pressing `1' will switch between these two options." (setq r1 (read-char-exclusive))) (error "No enclosing node with LaTeX_CLASS or EXPORT_TITLE or EXPORT_FILE_NAME") ) -(redisplay) +(if (fboundp 'redisplay) + (redisplay)) (and bpos (goto-char bpos)) (setq r2 (if (< r1 27) (+ r1 96) r1)) (unless (setq ass (assq r2 cmds)) diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 04389ef..a3bd9bf 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -70,13 +70,13 @@ ;; their definition. ;; ;; `org-re' is used for regexp compatibility with XEmacs. - (org-re (concat "\\[\\(?:" - ;; Match inline footnotes. - "fn:\\([-_[:word:]]+\\)?:\\|" - ;; Match other footnotes. - "\\(?:\\([0-9]+\\)\\]\\)\\|" - "\\(fn:[-_[:word:]]+\\)" - "\\)")) + (concat (org-re "\\[\\(?:") + ;; Match inline footnotes. + (org-re "fn:\\([-_[:word:]]+\\)?:\\|") + ;; Match other footnotes. + (org-re "\\(?:\\([0-9]+\\)\\]\\)\\|") + (org-re "\\(fn:[-_[:word:]]+\\)") + (org-re "\\)")) "Regular expression for matching footnotes.") (defconst org-footnote-definition-re @@ -265,10 +265,9 @@ label, start, end and definition of the footnote otherwise." (re-search-backward message-signature-separator nil t) (or (and (re-search-forward - (org-re - (concat org-outline-regexp-bol "\\|" - org-footnote-definition-re "\\|" - "^[ \t]*$")) + (concat org-outline-regexp-bol "\\|" + org-footnote-definition-re "\\|" + "^[ \t]*$") bound 'move) (progn (skip-chars-forward " \t\n") (point-
Re: [O] Current patches to make org-mode run on XEmacs
Hello, Michael Sperber writes: > ... are attached. I've run with this for a few weeks now, and what I > use mostly works. So I would appreciate if these could go into the git > repo. > > Let me draw your attention to this hunk: > > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -7360,7 +7360,7 @@ would end up with no indentation after the change, > nothing at all is done." > col) >(while (re-search-forward > (concat "\\(" (regexp-opt org-all-time-keywords) > - "\\|" "^[ \t]*" org-tsr-regexp-both "*$" > + "\\|" "^[ \t]*" org-tsr-regexp-both "$" > "\\|" "^[ \t]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" > "\\)") (or drawer-end end) t) > (beginning-of-line) > > While I needed this to make the code run on XEmacs, it really looks like > a bug fix to me: The "*" that I deleted makes that part of the > disjunction match the empty string I don't think so, as `org-tsr-regexp-both' isn't made up of one big group. But that star is strange indeed. Regards, -- Nicolas Goaziou
Re: [O] The Orgfather
Ha ha, I love it... "The HTML exporter... I knew it was a mistake... When I first wrote it, I had this bad feeling and thought: this can end up in spaghettis..."
Re: [O] [bug] Inconsistent tag alignment in org-indent-mode
Michael Brand writes: > Hi Jason > > This reminds me of a similar problem with tag alignment that I solved > with a patch that did not get any feedback yet. Can you try if this > patch solves your problem too? > http://thread.gmane.org/gmane.emacs.orgmode/42564 Hi Michael, The patch didn't have any effect on my issue with tag alignment in org-indent-mode. The tag still becomes misaligned when typing in the heading. I don't understand what problem your patch is trying to fix. Can you provide a list of steps for me to reproduce it? When you follow the steps in my original email, do you see that the problem is fixed with your patch? Regards, Jason
Re: [O] [bug] Asterisks in source and example blocks interpreted as headings
Bastien writes: > Hi Jason, > > Jason Dunsmore writes: > >> Bastien writes: >> >>> Hi Jason, >>> >>> Jason Dunsmore writes: >>> I noticed that lines with leading asterisks inside of source and example blocks are interpreted as headings: >>> >>> The attached patch should fix this -- please confirm. >> >> Hm, I'm still seeing the same issue with both source and example >> blocks. > > Yes -- my patch only took care of not allowing *manually* folding > headlines in selected environments. But those headlines were still > folded when finding an org file with "#+STARTUP: fold" in it. > > In the meantime, is it okay for you to TAB and have the commas > automatically added, as Sébastien suggested? Sure, that works. I've turned on `org-src-tab-acts-natively' as Carsten suggested. I also re-enabled `org-edit-src-content-indentation', which was previously set to 0.
[O] [Bug] Export of including files with minlevel broken
Hi, In the current head exporting a org that includes other org files with `:minlevel' is broken and results in an infinite loop. This is a regression from release 7.7 -- don't have the time to track it down any further right now :( Attached a minimal example with which I can reproduce. Michael * bar #+INCLUDE: "bar.org" org :minlevel 1 * foo pgpO2in7JWdBk.pgp Description: PGP signature
Re: [O] [Bug] Export of including files with minlevel broken
Michael Markert wrote: > > Hi, > > In the current head exporting a org that includes other org files with > `:minlevel' is broken and results in an infinite loop. > > This is a regression from release 7.7 -- don't have the time to track it > down any further right now :( > > Attached a minimal example with which I can reproduce. > > Michael > > > * bar > #+INCLUDE: "bar.org" org :minlevel 1 > * foo I can reproduce - I set debug-on-quit and got a backtrace (attached): it fingers org-fixup-indentation. Nick Debugger entered--Lisp error: (quit) regexp-opt(nil) (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (while (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (beginning-of-line) (when (looking-at "^[ ]+") (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col)) (if drawer-end (setq drawer-end (+ diff drawer-end (end-of-line)) (let* ((end (save-excursion (outline-next-heading) (point-marker))) (drawer-end (save-excursion (and (re-search-forward org-property-end-re end t) (match-end 0 (prohibit (if (> diff 0) "^\\S-" (concat "^ \\{0," (int-to-string (- diff)) "\\}\\S-"))) col) (while (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (beginning-of-line) (when (looking-at "^[ ]+") (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col)) (if drawer-end (setq drawer-end (+ diff drawer-end (end-of-line)) (unless (save-excursion (end-of-line 1) (re-search-forward prohibit end t)) (while (and (< (point) end) (re-search-forward "^[ ]+" end t)) (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col (move-marker end nil)) (save-excursion (let* ((end (save-excursion (outline-next-heading) (point-marker))) (drawer-end (save-excursion (and (re-search-forward org-property-end-re end t) (match-end 0 (prohibit (if (> diff 0) "^\\S-" (concat "^ \\{0," (int-to-string (- diff)) "\\}\\S-"))) col) (while (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (beginning-of-line) (when (looking-at "^[ ]+") (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col)) (if drawer-end (setq drawer-end (+ diff drawer-end (end-of-line)) (unless (save-excursion (end-of-line 1) (re-search-forward prohibit end t)) (while (and (< (point) end) (re-search-forward "^[ ]+" end t)) (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col (move-marker end nil))) org-fixup-indentation(1) (if org-adapt-indentation (org-fixup-indentation diff)) (let* ((level (save-match-data (funcall outline-level))) (after-change-functions (remove (quote flyspell-after-change-function) after-change-functions)) (down-head (concat (make-string (org-get-valid-level level 1) 42) " ")) (diff (abs (- level (length down-head) -1 (replace-match down-head nil t) (and org-auto-align-tags (org-set-tags nil t)) (if org-adapt-indentation (org-fixup-indentation diff)) (run-hooks (quote org-after-demote-entry-hook))) org-demote() funcall(org-demote) (if (and (re-search-forward org-outline-regexp-bol nil t) (< (point) end)) (funcall fun)) (save-excursion (setq end (copy-marker end)) (goto-char beg) (if (and (re-search-forward org-outline-regexp-bol nil t) (< (point) end)) (funcall fun)) (while (and (progn (outline-next-heading) (< (point) end)) (not (eobp))) (funcall fun))) (let ((org-ignore-region t)) (save-excursion (setq end (copy-marker end)) (goto-char beg) (if (and (re-search-forward org-outline-regexp-bol nil t) (< (point) end)) (funcall fun)) (while (and (progn (outline-next-heading) (< (point) end)) (not (eobp))) (funcall fun org-map-region(org-demote 1 8) (while (< lvl --cl-dotimes-temp--) (org-map-region (quote org-demote) (point-min) (point-max)) (incf lvl)) (let ((--cl-dotimes-temp-- minlevel) (lvl 0)) (while (< lvl --cl-dotimes-temp--) (org-map-region (quote org-demote) (point-min) (point-max)) (incf lvl))) (catch (quote --cl-block-nil--) (let ((--cl-dotimes-temp-- minlevel) (lvl 0)) (while (< lvl --cl-dotimes-temp--) (org-map-region (quote org-demote) (point-min) (point-max)) (incf lvl (cl-block-wrapper (c
[O] [babel] Producing figures from octave
Dan Davison has a brief worg tutorial on using babel with octave at http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-octave-matlab.html Amongst other things, he offers the following example block for producing a figure: #+begin_src octave :output file :file chart.png figure( 1, "visible", "off" ); sombrero; print -dpng chart.png #+end_src #+results: [[file:chart.png]] The figure seems to be (briefly) created (it pops up on my screen if I change 'figure( 1, "visible", "off" );' to 'figure( 1, "visible", "on");'; also the code provided does the right thing in the octave interpreter). However, rather than delivering the png figure, the file chart.png consists solely of the string "/usr/share/octave/packages/3.2". I'm not sure where this string is coming from: it's *not* part of the stuff that octave writes to stdout when the interpreter is invoked (my first guess). I suspect that the options that need to be offered on the #+begin_src line have changed somehow since that worg page was last updated at the end of April of this year, but don't really know. Help! -Ethan -- Ethan Ligon, Associate Professor Agricultural & Resource Economics University of California, Berkeley
Re: [O] [bug] Inconsistent tag alignment in org-indent-mode
Hi Jason On Wed, Aug 31, 2011 at 21:49, Jason Dunsmore wrote: > Michael Brand writes: >> This reminds me of a similar problem with tag alignment that I solved >> with a patch that did not get any feedback yet. Can you try if this >> patch solves your problem too? >> http://thread.gmane.org/gmane.emacs.orgmode/42564 > > The patch didn't have any effect on my issue with tag alignment in > org-indent-mode. The tag still becomes misaligned when typing in the > heading. Thanks for checking. Same here. > I don't understand what problem your patch is trying to fix. Can you > provide a list of steps for me to reproduce it? It happens with org-tags-column set to e. g. 0. With "* section C-c C-c tag RET" you get one space before ":tag:". After editing "section" to "item" you will end up with two spaces before ":tag:" instead of one. "C-c C-c RET" -> again one like expected. > When you follow the steps in my original email, do you see that the > problem is fixed with your patch? No. Michael
Re: [O] exporting babel stuff to pdf or latex
Nick Dokos Wed, 31 Aug 2011 10:10:28 -0400 Eythan Weg wrote: > > Hi, > > I need help with exporting this: > > #+begin_src R :exports both :results output > Lst <- list(length=c(1,7,9), time=c(0.5,10,11)) > print(Lst$time) > #+end_src > > It fails with these messages > >Export buffer: >Exporting to PDF... >Exporting to LaTeX... >org-babel-exp processing... >org-babel-get-src-block-info: Args out of range: "", -1, 0 > > Any obvious reason why? > > Works for me: maybe you need to upgrade? Org-mode version 7.7 (release_7.7.223.gcae9.dirty) Nick Thanks. I think I found my issue. Babel blocks need to be under a headline in order to be exported. Is this correct? Eythan
Re: [O] exporting babel stuff to pdf or latex
eythan...@gmail.com (Eythan Weg) writes: > Nick Dokos > Wed, 31 Aug 2011 10:10:28 -0400 > >Eythan Weg wrote: > >> >> Hi, >> >> I need help with exporting this: >> >> #+begin_src R :exports both :results output >> Lst <- list(length=c(1,7,9), time=c(0.5,10,11)) >> print(Lst$time) >> #+end_src >> >> It fails with these messages >> >>Export buffer: >>Exporting to PDF... >>Exporting to LaTeX... >>org-babel-exp processing... >>org-babel-get-src-block-info: Args out of range: "", -1, 0 >> >> Any obvious reason why? >> >> > >Works for me: maybe you need to upgrade? > >Org-mode version 7.7 (release_7.7.223.gcae9.dirty) > >Nick > > Thanks. I think I found my issue. Babel blocks need to be under > a headline in order to be exported. Is this correct? > Only when exporting to LaTeX. The LaTeX exporter does weird things to parts of the Org-mode file before the first headline (which is everything in files with no headlines). Cheers -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [babel] Producing figures from octave
Ethan Ligon writes: > Dan Davison has a brief worg tutorial on using babel with octave at > > http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-octave-matlab.html > Hi Ethan, > Amongst other things, he offers the following example block for > producing a figure: (Actually, the example is not by me.) > #+begin_src octave :output file :file chart.png > figure( 1, "visible", "off" ); > sombrero; > print -dpng chart.png > #+end_src :output file is wrong (there's no header arg named :output). :file chart.png says to write the results to that file. The "results" are whatvever the variable `ans` holds at the end of the block, and I think that must be the file path you're seeing. One way to write that example is: #+begin_src octave :results file figure( 1, "visible", "off" ); sombrero; print -dpng chart.png; ans = "chart.png"; #+end_src :results file says to interpret the result as a file path. I've updated the worg page. Dan > However, rather than delivering the png figure, the file chart.png > consists solely of the string "/usr/share/octave/packages/3.2". I'm > not sure where this string is coming from: > it's *not* part of the > stuff that octave writes to stdout when the interpreter is invoked (my > first guess). > > I suspect that the options that need to be offered on the #+begin_src > line have changed somehow since that worg page was last updated at the > end of April of this year, but don't really know. > > Help! > -Ethan