Re: [O] MobileOrg Android 0.8.0 Released, many new features!
On 8.2.2012, at 12:54, Richard Riley wrote: > Carsten Dominik writes: > >> Wow Matthew, >> >> great to see your persistence in developing this program! >> >> - Carsten >> > > I was wondering Carsten if you actively use the iPhone version? I do, and without problems. Have you tried contacting Richard directly? - Carsten > I posted > some issues here but go no feedback - I cant get it working following a > config error in my set up - after correcting it and then syncing the > phone it falls over as described in my earlier post. > >
[O] Freemind export and import question/suggestion (newlines problem)
Hi, I am trying out the excellent freemind exporter/importer and am running into issues with long node names and newlines. 1) Exporting org to freemind (node name length limitation?) In org-mode, none of the headlines can contain newlines, so occasionaly they get a bit long. This is not a (big) issue in org, but when exorting to freemind, I would like to limit the names to a maximum length, as the mindmap display in freemind need reasonably short node names to give a clear overview. It would be great to be able to do this with the exporter by setting a variable / giving a prefix number. 2) Importing freemind to org (remove newlines?) For now, I have manually split some lines in freemind to get a good mindmap, but then the issue is that when re-importing to org, the headlines are including the newline, hence the org-mode headings are broken. This may be easily done by replacing all newlines in the node name when importing, but being Lisp challenged I cannot find where in org-freemind.el this replacement should be done. 3) Importing freemind to org (centered nodes) I noticed also that nodes in freemind that were centered broke the org import fairly bad by splitting the node name over several lines with blank lines in between. And none of the textual lines were actually displayed as a headline. I don't really have an issue with this, as I can do without changing from the default alignment in freeming, but thought I'd include it in this writeup. If anyone has an idea of how to solve this or could point me in the right direction that would be great! Thanks -- Johnny
Re: [O] Controlling pagination on headings in Latex/PDF export?
Hi Nick, Nick Dokos wrote: > Sebastien Vauban wrote: > >> Things that can easily make LaTeX become crazy is changing the color of the >> titles. In such a case, LaTeX will allow much more easily to break after the >> title, even if at bottom of page, as changing color somehow affects penalty. > > Never heard of that one (but I haven't been on comp.text.tex for many > years now): do you have a reference to the problem somewhere? You've made me work like our Thomas: I've made some archeology to find back the answer given by Ulrike Fischer (on 09/22... 2008, 14:57) to one of my questions (on FCTT, the French Tex related newsgroup): Le saut de page vient probablement de \color qui insere un breakpoint. http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=graphics%2F3417 Tu peux essayer \color{blue}\nobreak. Translation: The page break probably comes from \color which inserts a breakpoint. http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=graphics%2F3417 You can try \color{blue}\nobreak. Best regards, Seb -- Sebastien Vauban
Re: [O] Limit todo window
Richard Riley wrote: > > Whats the best way to limit the window that agendas use to show open > todo items? e.g when I do C-c a a I dont want to see TODOs set for a > years time - generally I might only want things in the current week or > so. is there something built and instantly configurable to achieve this? > > org-agenda-span - also make sure to get rid of any settings of the obsolete variable org-agenda-ndays. The default is week however, so unless you've customized something, you should not see a year's worth of TODOS (I shudder at the thought...) Nick
[O] Limit todo window
Whats the best way to limit the window that agendas use to show open todo items? e.g when I do C-c a a I dont want to see TODOs set for a years time - generally I might only want things in the current week or so. is there something built and instantly configurable to achieve this?
[O] Babel - pdfTeX error on Windows "I can't find file `c:/DOCUME'.
I'm having trouble with Org-Babel on Windows XP. I have a LaTeX code block that outputs to a PDF file. But whenever I C-c C-c to evaluate the code block, pdfTeX throws the following error: ! I can't find file `c:/DOCUME'. \protect <*> c:/DOCUME~ 1/NPEIHL~1.CVA/LOCALS~1/Temp/babel-5224Jgo/latex-5224ePP.tex (Press Enter to retry, or Control-Z to exit) Please type another input file name ! Emergency stop. \protect <*> c:/DOCUME~ 1/NPEIHL~1.CVA/LOCALS~1/Temp/babel-5224Jgo/latex-5224ePP.tex ! ==> Fatal error occurred, no output PDF file produced! Transcript written on c:/DOCUME~1/NPEIHL~1.CVA/LOCALS~1/Temp/babel-5224Jgo//tex put.log. This seems to be caused by the tilde (~) mark in the shortened "C:/Documents and Settings..." pathname. Does anyone have any solutions for this? Thanks. Nick Peihl signature.asc Description: PGP signature
Re: [O] Tweaking the export
Hello, Christian Wittern writes: >>3. If all went well, you now have an impressive Org to Org converter. >> You can even test it with: >> >> #+begin_src emacs-lisp >> (switch-to-buffer (org-export-to-buffer 'translator "*Translation*")) >> #+end_src >> >> Obviously, there is not much to see. > It worked wonderful until here. >> Now, we're going to redefine `org-translator-paragraph' to properly >> ignore one language or the other, depending on `:translator-side' value. >> >> #+begin_src emacs-lisp >> (defun org-translator-paragraph (paragraph contents info) >>"Convert PARAGRAPH to Org, ignoring one language. >> Language kept is determined by `:translator-side' value." >>(let ((leftp (eq (plist-get info :translator-side) 'left))) >> (replace-regexp-in-string >> (if leftp "\t+.*$" "^.*\t+") "" contents))) >> #+end_src > > With a little tweaking, I got rid of errors when running this code. > However, no changes in the output where observable. Finally, I looked > at the output from step 3 above and realized that the parser > normalizes my characters away. Only a bunch of spaces in the > output! Ouch!! > So I guess I would need an option on the parser to switch tab expansion off. > > I also intended to implement my transformer in a way that I first > define the general org-e-org transformer and then derive a specialized > transcormer by somehow inheriting the general transformer and then > implement my specialized paragraph transformation. It seems that > this is at the moment not possible, but I think it would be good to > think about this, that will make defining new exporters or even > org-file tweakers a breeze. In fact the problem is subtle. For example, you don't want include keywords to be expanded and babel block to be executed when exporting from Org to Org. I've added a noexpand keyword for that. Hence, you will need to call your converter with: #+begin_src emacs-lisp (switch-to-buffer (org-export-to-buffer 'translator "*Translation*" nil nil nil nil 'noexpand)) #+end_src The TAB problem is different. I expand tab early because the machine creating the parse-tree and the machine exporting it may not be the same. Tab widths may differ, and it could lead to subtle bugs. I may add a :tab-width property in the initial environment. I'm not sure about it yet. Anyway, your tabs have been replaced with spaces, for now. `tab-width' of them. Your paragraph translator may then become something like: #+begin_src emacs-lisp (defun org-translator-paragraph (paragraph contents info) "Convert PARAGRAPH to Org, ignoring one language. Language kept is determined by `:translator-side' value." (let ((leftp (eq (plist-get info :translator-side) 'left))) (replace-regexp-in-string (format (if leftp " \\{%d,\\}.*$" "^.* \\{%d,\\}") tab-width) "" contents))) #+end_src Is it better? Regards, -- Nicolas Goaziou
[O] anyway to create link to a line number in a file
Hi all, I am reading a long text file and want to write down my notes with org-mode. I extremely would like to put the line numbers down along with my notes. Although there is a way to store a link for text search for the current line, I haven't found a way to create a link to a line number in the current buffer. Is there anyway to do that? Thanks -- Best, Zane
[O] Bug: CLOCK_MODELINE_TOTAL and org-todo-yesterday
1. Sometimes I want all the subtrees of a tree to inheritance the property "CLOCK_MODELINE_TOTAL" (e.g. all set to "today"), but in the function *org-clock-get-sum-start*, you use (org-entry-get nil "CLOCK_MODELINE_TOTAL"), which means that it doesn't search inheritance. This makes the inheritance setting in vain. 2. Sometimes I want to mark something done yesterday (e.g. I'm leaving that night but still finishing the project without computer at hand). I use *org-todo-yesterday*, but I find that if it has a *++ repeater*, the new date begins *as if the task is done today*, which is not desirable. By: Muchenxuan Tong
Re: [O] Integration of RefTeX and LaTeX export
Achim Gratz wrote: > Nick Dokos writes: > > So what version were you using? > > 6.33 as delivered with Emacs23, this was buried in some earlier posting... > Thanks! I found the posting and it was a reply to me: hardly buried, but I missed it nevertheless - sorry about that. Nick
Re: [O] Integration of RefTeX and LaTeX export
Nick Dokos writes: > So what version were you using? 6.33 as delivered with Emacs23, this was buried in some earlier posting... Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Samples for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
Re: [O] Controlling pagination on headings in Latex/PDF export?
Stefan Nobis wrote: > Jos'h Fuller writes: > > > Hi! > > > Thanks for your kind words! ; - ) > > > I did wrap the "mykeepwithnextpar" definition and I moved the call between > > the heading > > and the table as suggested, but it still doesn't seem to want to cooperate > > (heading on > > one page, table on the next). > > I just tried to export the example posted by Nick. The tabluar is > wrapped in a center environment. I think this is the problem. Without > the help of something like the minipage environment I think it is > impossible to prevent page breaks before the centered object in the > general case (the problem is not the centering but the environment > "center" is implemented with the help of a list environment and IIRC > lists allow page breaks around them). > > As I'm not a LaTeX expert it may be helpful to ask on comp.text.tex > for some tipps. > But there is still a LARGE penalty for breaking there: it's not impossible to produce but it *is* hard. I agree with you that we are not going to solve it until we see an example input file that reproduces the problem. Nick
Re: [O] Integration of RefTeX and LaTeX export
Andreas Willig wrote: > it is a version problem. I have just downloaded the latest version of > org-mode (7.8.03) and now the handler gets called. > So what version were you using? The only likely fix I found was this commit from almost two years ago: , | commit 8a671f8d4da0066417d9dd78fffb42ea1fe9ec9d | Author: Carsten Dominik | Date: Wed May 12 15:14:17 2010 +0200 | | LaTeX export: Use special formatting by link type interface | | Patch by Christian Moe, who writes: | | > It looks like support for formatting custom link types in LaTeX export | > is broken? | > | > I was trying to implement a custom link type with its own formatting | > function for HTML and LaTeX export, following the steps in | > org-bbdb.el. | > | > I've found that org-bbdb-export does not italicize bbdb links in | > LaTeX, nor does my own org-cite-export turn my custom =cite:= links | > into LaTeX =\cite{}= citations. Everything works fine in HTML export, | > but in LaTeX all custom link types get formatted as =\texttt{descr}=. | > | > I see that org-export-as-html and org-export-as-docbook look up | > org-link-protocols to get the function for formatting the link, but it | > seems that org-export-as-latex doesn't. | > | > ` and git describe says: , | $ git describe 8a671f8d | release_6.36-19-g8a671f8 ` so yours must have been pre-6.36 or thereabouts, i.e. probably whatever was built-in with your (23.2-based?) emacs. If you were indeed using such an ancient version, I think you will be *much* happier with latest. > Sorry for the fuss ... > No fuss, no muss. Nick
[O] PATCH: doc for column groups
I spent some hours scratching my head trying to get tables out with vertical lines, until Jambunathan suggested that I try not to put space between the '<' and '>' The patch adds a few words to the org.texi file to that effect. WARNING: Ive never given a patch before! Nor used texi Rusi diff --git a/doc/org.texi b/doc/org.texi index cc195d1..5259312 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -2267,7 +2267,8 @@ of columns, much like horizontal lines can do for groups of rows. In order to specify column groups, you can use a special row where the first field contains only @samp{/}. The further fields can either contain @samp{<} to indicate that this column should start a group, -@samp{>} to indicate the end of a column, or @samp{<>} to make a column +@samp{>} to indicate the end of a column, or @samp{<>} (no space between @samp{<} +and @samp{>}) to make a column a group of its own. Boundaries between column groups will upon export be marked with vertical lines. Here is an example:
Re: [O] Controlling pagination on headings in Latex/PDF export?
Sebastien Vauban wrote: > Things that can easily make LaTeX become crazy is changing the color of the > titles. In such a case, LaTeX will allow much more easily to break after the > title, even if at bottom of page, as changing color somehow affects penalty. > Never heard of that one (but I haven't been on comp.text.tex for many years now): do you have a reference to the problem somewhere? Thanks, Nick
Re: [O] Controlling pagination on headings in Latex/PDF export?
Hi Nick, Nick Dokos wrote: > Sebastien Vauban wrote: > >> You cannot reproduce it, because I misplaced the call to mykeewithnextpar: it >> must be between the two things you want to see glue'd together. >> >> Hence, in the example you mention, it works perfectly. > > No, that's not what I'm talking about: I'm not using your mechanism at > all (note the disabling ## in front). What I'm saying is that I find it > exceedingly difficult to reproduce the behavior the OP reported at all: > no tricks, just export to LaTeX and process. That's why I wanted to see > an example of the input file. OK. Sorry for misreading... > My contention is that LaTeX is pretty good at keeping things together > that should be together, so the misbehavior indicates some *other* kind > of problem: e.g. there is a fairly well known problem that causes all of > the figures to end up at the end of the chapter, because the constraints > imposed by the user make it impossible to DTRT. Things that can easily make LaTeX become crazy is changing the color of the titles. In such a case, LaTeX will allow much more easily to break after the title, even if at bottom of page, as changing color somehow affects penalty. Best regards, Seb -- Sebastien Vauban
Re: [O] Controlling pagination on headings in Latex/PDF export?
Sebastien Vauban wrote: > You cannot reproduce it, because I misplaced the call to mykeewithnextpar: it > must be between the two things you want to see glue'd together. > > Hence, in the example you mention, it works perfectly. > No, that's not what I'm talking about: I'm not using your mechanism at all (note the disabling ## in front). What I'm saying is that I find it exceedingly difficult to reproduce the behavior the OP reported at all: no tricks, just export to LaTeX and process. That's why I wanted to see an example of the input file. My contention is that LaTeX is pretty good at keeping things together that should be together, so the misbehavior indicates some *other* kind of problem: e.g. there is a fairly well known problem that causes all of the figures to end up at the end of the chapter, because the constraints imposed by the user make it impossible to DTRT. Nick
[O] Bug: Remote state change of repeating TODO fails with calendar open [7.8.03]
Changing a repeating TODO's state to DONE remotely from the agenda fails to change the date when the calendar is open in another window. The reason is that `org-recenter-calendar' selects the agenda window after doing its work, also making the agenda the current buffer, but caller `org-auto-repeat-maybe' expects the current buffer to be the Org file that contains the TODO item. Here's how to reproduce it: Run `emacs -Q -l setup.el'. Type `M-x calendar'. Type `M-x org-agenda', then `a' for weekly agenda. Move point to first TODO. Press `t' to try to change TODO state to DONE. The result is that `Note stored' appears in the echo area but there is no change in the agenda view or in the scheduled date in `test-case.org'. Here is `test-case.org': * TODO Foo SCHEDULED: <2012-02-17 Fri .+1d> And here is `setup.el': (setq org-agenda-files '("./test-case.org")) Emacs : GNU Emacs 24.0.93.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2012-02-09 on tyl Package: Org-mode version 7.8.03 current state: == (setq org-export-blocks '((src org-babel-exp-src-block nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 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-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-blank-before-new-entry nil org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-export-first-hook '(org-beamer-initialize-open-trackers) org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] org-babel-hide-all-hashes) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-metadown-hook '(org-babel-pop-to-session-maybe) org-agenda-files '("./test-case.org") 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 )
[O] android mobile org question on capture
Hi, I have finally set up mobile org on my android phone, with calendar sync, and like it very much. Regarding the capture functionality, is it (or will it be) possible to: 1) define wich file and under which header the TODOs get written to. I have a notes.org file with Todo section where I store all my generic TODOs... alternativly I guess I could set up an automated refile when calling org-mobile-pull 2) define SCHEDULED and DEADLINE for the note. This would also be handy because captured notes would appear right away in my android calendar, without having to get to my pc, org-mobile-pull, add a deadline, refile, and finally org-mobile-push. I just upgraded from 0.8.0 to 0.8.3 cheers and a big thank you to who is writing this software, renato
[O] [BUG]? Constant-definition-lines in tables get exported.
Hello! org-mode tables currently allow defining table-local constants in lines marked with "$" (as described in the "Tables > Advanced Features" section of the manual). However, when exporting (to LaTeX), these lines are included in the output -- and a cannot find a possibility to re-exclude them. Using #+CONSTANTS: is no adequate replacement, as the table-local constants help to avoid accidentially defining a constant twice, maybe with different values. Also the local character allows to use shorter names, which are better understandable in the context, but maybe not at all outside. An example table from my work: | | site | N |E/N[eV] | E_surf[meV/A²] | |---++++| | * | on-top-1 | 32 | -7.2062959 | 138.89 | | * | bridge-2 | 32 | -7.2063544 | 138.85 | | * | bridge-3 | 32 | -7.2064131 | 138.81 | | $ | e_bulk=-8.30623|||| | $ | e_bulk_zn=-1.26671 |||| | $ | A_int=25.34335655 |||| #+TBLFM: $5=1000*($4*$3-($3-4)*$e_bulk-4*$e_bulk_zn)/(2*$A_int);%.2f My org-mode is a yesterday's pull from the git-repository. kind regards, Yu
Re: [O] Controlling pagination on headings in Latex/PDF export?
Jos'h Fuller writes: > Hi! > Thanks for your kind words! ; - ) > I did wrap the "mykeepwithnextpar" definition and I moved the call between > the heading > and the table as suggested, but it still doesn't seem to want to cooperate > (heading on > one page, table on the next). I just tried to export the example posted by Nick. The tabluar is wrapped in a center environment. I think this is the problem. Without the help of something like the minipage environment I think it is impossible to prevent page breaks before the centered object in the general case (the problem is not the centering but the environment "center" is implemented with the help of a list environment and IIRC lists allow page breaks around them). As I'm not a LaTeX expert it may be helpful to ask on comp.text.tex for some tipps. -- Until the next mail..., Stefan.
Re: [O] Controlling pagination on headings in Latex/PDF export?
Hi Nick, Nick Dokos wrote: > @ is a character that is reserved for .sty files: it's basically used as > a mechanism to manufacture private names that are not going to conflict > with other names. If you want to use @ in a macro in your .tex file, > then you have to do something like this: > > #+LaTeX_HEADER: \makeatletter > #+LaTeX_HEADER: \def\mykeepwithnextpar{\par\nobreak\@afterheading} > #+LaTeX_HEADER: \makeatother > > However the best thing is to put the definition in a .sty file: > > --8<---keeper.sty---start->8--- > \def\mykeepwithnextpar{\par\nobreak\@afterheading} > --8<---keeper.sty---end--->8--- > > and then use > > #+LaTeX_HEADER: \usepackage{keeper} > > in your .org file. In my case, yes, that's in a style file... reason allowing me to forget to mention the makeatletter thingie. > However, I find it exceedingly difficult to manufacture an example that > will produce the bad break that the OP reports: LaTeX seems very > reluctant to break after the headline. E.g. in the appended file, I can > vary the number of foo lines from 0 to enough to fill the page and I > cannot split the DEPARTMENT headline from the table. I also tried > various lengths for the table (not very systematically, I must admit) > and I still cannot get the default settings to misbehave. This leads me > to believe that there are those "other" factors that affect badness: > LaTeX thinks that there is something so severely out of whack in the > "other" factors that it is willing to make the supreme sacrifice of > splitting the headline from the table. > > So if the OP can provide a misbehaving example, that could help clarify > things. > > Nick > > PS. Note that the call to \mykeewithnextpar is disabled in the file > below. If I enable it, I actually get a foo line at the top of the > second page before the DEPARTMENT headline, so it certainly affects > the output, but not in a good way. You cannot reproduce it, because I misplaced the call to mykeewithnextpar: it must be between the two things you want to see glue'd together. Hence, in the example you mention, it works perfectly. For answering the OP's question, the call must be moved between the DEPARTMENT title and the table... > #+LaTeX_HEADER: \usepackage{keeper} > > * Period 2012-02-06 to 2012-02-12 > ** Asset > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo > ##+LATEX: \mykeepwithnextpar{} > *** DEPARTMENT > | Data| Data | Data | Data | > |-+--+--+--| > | XX |1 |1 |0 | > | YY |5 |4 |0 | > | XX |1 |1 |0 | Best regards, Seb -- Sebastien Vauban
Re: [O] Controlling pagination on headings in Latex/PDF export?
Jos'h Fuller writes: > but it still doesn't seem to want to cooperate (heading on one page, > table on the next). Reading this again, another hint: If the table is exported to tabular and wrapped in a figure environment, then that might be the problem. I'm not familiar with org-modes latex export. But if you show me the resulting LaTeX code, maybe I could help on the LaTeX side. -- Until the next mail..., Stefan.
Re: [O] Integration of RefTeX and LaTeX export
Hi, it is a version problem. I have just downloaded the latest version of org-mode (7.8.03) and now the handler gets called. Sorry for the fuss ... Thanks again, i really appreciate the quick help i have received here!! Andreas -Original Message- From: Andreas Willig Sent: Fri 2/17/2012 9:10 PM To: Andreas Willig; nicholas.do...@hp.com Cc: nicholas.do...@hp.com; emacs-orgmode@gnu.org Subject: RE: [O] Integration of RefTeX and LaTeX export I should have added that the rt-follow-hander is properly called ... Is this a version problem? -Original Message- From: emacs-orgmode-bounces+andreas.willig=canterbury.ac...@gnu.org on behalf of Andreas Willig Sent: Fri 2/17/2012 8:39 PM To: nicholas.do...@hp.com Cc: nicholas.do...@hp.com; emacs-orgmode@gnu.org Subject: Re: [O] Integration of RefTeX and LaTeX export Hi Nick, thanks for this, but i cannot get it to work ... I have started a vanilla emacs without any init file (emacs -q), have loaded your snippet from a file and evaluated the buffer. Again, the export-handler does not get called. I am running Debian 6.0.4 and my emacs is the one coming with it (see below). I feel so stupid :-)) Andreas M-x emacs-version says: GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-12 on raven, modified by Debian M-x org-version says: Org-mode version 6.33x Debian version is 6.0.4 (/etc/debian_version) -Original Message- From: Nick Dokos [mailto:nicholas.do...@hp.com] Sent: Fri 2/17/2012 6:31 PM To: Andreas Willig Cc: Thomas S.Dye; emacs-orgmode@gnu.org; nicholas.do...@hp.com Subject: Re: [O] Integration of RefTeX and LaTeX export Andreas Willig wrote: > > Hi Thomas, > > thanks for this hint. I have looked at this, the changed / added functions are > below, everything else has not changed. I still have a problem. > > I have created a new link type as you suggested and have consulted google > on how to do it (my emacs-lisp-fu is not good enough to sort out directly what > this function is doing ...). In my understanding the third argument is a > function > that is called when an export process has started and a link is about to be > exported. My first problem is: this handler function is never called, the > error > message that i have inserted below does never appear. I have seen that the > variable "org-link-types" contains the defined link type, and the variable > "org-link-protocols" shows my handler. > > My second problem is that the generated LaTeX output is > "\texttt{\cite{key}}" > but it should simply be "\cite{key}". I would guess that the second problem > is a corollary of the first one ... > > Any ideas? > > Andreas > I'm pretty sure the second function is not quoted properly in your org-add-link-type so it ends up actually getting called at the time of the org-add-link-type is called. Try the following: --8<---cut here---start->8--- (defun rt-follow-handler (path) (message "dummy handler called, path = %s" path) (let ((arg (concat "\\cite{" path "}"))) (reftex-view-crossref arg))) (defun rt-export-handler (path desc format) (message "my handler is called") (cond ((eq format 'latex) (if (or (not desc) (equal 0 (search "rtcite:" desc))) (format "\\cite{%s}" path) (format "\\cite[%s]{%s}" desc path) (require 'org) (org-add-link-type "rtcite" (function rt-follow-handler) (function rt-export-handler)) --8<---cut here---end--->8--- By way of explanation: I had this as part of a minimal .emacs and it seems to work more or less OK: I replaced the error call with a message call, because it actually triggered and blew up :-) The rt-export-handler needs tweaking but you 'll know what to do better than I do when you see the latex output. I had to (require 'org) to pick up the definition of org-add-link-type: that seems to be a missing autoload somewhere. And finally I like to quote functions with function, not quote, for compiled-code reasons, but in most cases, it won't make any difference: use quotes if you prefer. Nick > > > (defun rt-handler (path) > (message "dummy handler called, path = %s" path) > (let ((arg (concat "\\cite{" path "}"))) > (reftex-view-crossref arg))) > > (org-add-link-type "rtcite" > 'rt-handler > (lambda (path desc format) >(error "my handler is called") >(cond ((eq format 'latex) > (if (or (not desc) (equal 0 (search "rtcite:" > desc))) > (format "\\cite{%s}" path) > (format "\\cite[%s]{%s}" desc path)) > > > This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If y
Re: [O] Killing list and subtree?
Hello, pin...@iro.umontreal.ca (François Pinard) writes: > Is there an easy command to kill a list and its subtree hierarchy? > Something like `C-c C-x C-w' but which would work at the list level > rather than at the item level? > > For now, I'm either repeating a string of `C-k' or setting a region to > cut, and it happens that neither is very efficient, human-wise :-). It depends on how you set the region. You may have a look into `org-mark-list' command. Regards, -- Nicolas Goaziou
Re: [O] Controlling pagination on headings in Latex/PDF export?
On 17/02/12 08:05, Stefan Nobis wrote: Nick Dokos writes: \def\mykeepwithnextpar{\par\nobreak\@afterheading} However, I find it exceedingly difficult to manufacture an example that will produce the bad break that the OP reports: LaTeX seems very reluctant to break after the headline. I am just starting to use Latex, so apologies for any noobish blunders:) In conventional typesetting this problem is referred to as "Widows and Orphans". There is a bit in the FAQ at http://www.tex.ac.uk/cgi-bin/texfaq2html?label=widows which might offer some additional help. Ian.
Re: [O] Integration of RefTeX and LaTeX export
I should have added that the rt-follow-hander is properly called ... Is this a version problem? -Original Message- From: emacs-orgmode-bounces+andreas.willig=canterbury.ac...@gnu.org on behalf of Andreas Willig Sent: Fri 2/17/2012 8:39 PM To: nicholas.do...@hp.com Cc: nicholas.do...@hp.com; emacs-orgmode@gnu.org Subject: Re: [O] Integration of RefTeX and LaTeX export Hi Nick, thanks for this, but i cannot get it to work ... I have started a vanilla emacs without any init file (emacs -q), have loaded your snippet from a file and evaluated the buffer. Again, the export-handler does not get called. I am running Debian 6.0.4 and my emacs is the one coming with it (see below). I feel so stupid :-)) Andreas M-x emacs-version says: GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-12 on raven, modified by Debian M-x org-version says: Org-mode version 6.33x Debian version is 6.0.4 (/etc/debian_version) -Original Message- From: Nick Dokos [mailto:nicholas.do...@hp.com] Sent: Fri 2/17/2012 6:31 PM To: Andreas Willig Cc: Thomas S.Dye; emacs-orgmode@gnu.org; nicholas.do...@hp.com Subject: Re: [O] Integration of RefTeX and LaTeX export Andreas Willig wrote: > > Hi Thomas, > > thanks for this hint. I have looked at this, the changed / added functions are > below, everything else has not changed. I still have a problem. > > I have created a new link type as you suggested and have consulted google > on how to do it (my emacs-lisp-fu is not good enough to sort out directly what > this function is doing ...). In my understanding the third argument is a > function > that is called when an export process has started and a link is about to be > exported. My first problem is: this handler function is never called, the > error > message that i have inserted below does never appear. I have seen that the > variable "org-link-types" contains the defined link type, and the variable > "org-link-protocols" shows my handler. > > My second problem is that the generated LaTeX output is > "\texttt{\cite{key}}" > but it should simply be "\cite{key}". I would guess that the second problem > is a corollary of the first one ... > > Any ideas? > > Andreas > I'm pretty sure the second function is not quoted properly in your org-add-link-type so it ends up actually getting called at the time of the org-add-link-type is called. Try the following: --8<---cut here---start->8--- (defun rt-follow-handler (path) (message "dummy handler called, path = %s" path) (let ((arg (concat "\\cite{" path "}"))) (reftex-view-crossref arg))) (defun rt-export-handler (path desc format) (message "my handler is called") (cond ((eq format 'latex) (if (or (not desc) (equal 0 (search "rtcite:" desc))) (format "\\cite{%s}" path) (format "\\cite[%s]{%s}" desc path) (require 'org) (org-add-link-type "rtcite" (function rt-follow-handler) (function rt-export-handler)) --8<---cut here---end--->8--- By way of explanation: I had this as part of a minimal .emacs and it seems to work more or less OK: I replaced the error call with a message call, because it actually triggered and blew up :-) The rt-export-handler needs tweaking but you 'll know what to do better than I do when you see the latex output. I had to (require 'org) to pick up the definition of org-add-link-type: that seems to be a missing autoload somewhere. And finally I like to quote functions with function, not quote, for compiled-code reasons, but in most cases, it won't make any difference: use quotes if you prefer. Nick > > > (defun rt-handler (path) > (message "dummy handler called, path = %s" path) > (let ((arg (concat "\\cite{" path "}"))) > (reftex-view-crossref arg))) > > (org-add-link-type "rtcite" > 'rt-handler > (lambda (path desc format) >(error "my handler is called") >(cond ((eq format 'latex) > (if (or (not desc) (equal 0 (search "rtcite:" > desc))) > (format "\\cite{%s}" path) > (format "\\cite[%s]{%s}" desc path)) > > > This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If you are not an intended recipient, please notify the sender immediately and erase all copies of the message and any attachments. Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more information. This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If you are not an intended recipient, please notify the sender immediately and
Re: [O] Controlling pagination on headings in Latex/PDF export?
Nick Dokos writes: > \def\mykeepwithnextpar{\par\nobreak\@afterheading} > However, I find it exceedingly difficult to manufacture an example > that will produce the bad break that the OP reports: LaTeX seems > very reluctant to break after the headline. Yes. That's because the above snippet is already part of the definition of a section (from chapter down to paragraph). IIRC it's defined in the latex kernel. Therefore it should not make any difference if the command is only used directly after a sectioning command. One way to ensure that some part of the document is always seen as a single entity by latex is to put it in a minipage (maybe there are better options, but that's my fallback if I need to ensure that something is always kept together). -- Until the next mail..., Stefan.