[O] Using font-lock-add-keywords to display caption than various table and images headers
According to the http://stackoverflow.com/questions/22937393/emacs-lisp-prettify-symbols-mode-for-latexby using font-lock-add-keywords, I can display the latin symbols instead of the English word like \alpha without changing the real contents. It is pretty great. Then a good idea came to my brain, which is: Can i use this feature to display the caption and label of the table and image rather than headers which holds at least three lines? If it can be accomplished, which will make the article very compact and easier to read: Before re-display : #+CAPTION: caption #+ATTR_LaTeX: :align |c|c| #+LABEL: table:label | name | value | |--+---| | tony |30 | After re-display: table:label caption | name | value | |--+---| | tony |30 | I tried to alter some part of the code using regexp search to find the headers and capture the caption and label contents, and test to re-display the matched contents to test: (defvar pretty-alist (cl-pairlis '(#\\+CAPTION: \\(.+$\\)\n#\\+ATTR_LaTeX.+\n#\\+LABEL: \\(.+$\\)) (test))) (defun pretty-things() (mapc (lambda (x) (let ((word (car x)) (char (cdr x))) (font-lock-add-keywords nil `((,(concat \\(^\\|[^a-zA-Z0-9]\\)\\( word \\)[a-zA-Z]) (0 (progn (decompose-region (match-beginning 2) (match-end 2)) nil) (font-lock-add-keywords nil `((,(concat \\(^\\|[^a-zA-Z0-9]\\)\\( word \\)[^a-zA-Z]) (0 (progn (compose-region (1- (match-beginning 2)) (match-end 2) ,char) nil))) pretty-alist)) the results are below: test | name | value | |--+---| | tony |30 | Then i tried to change the test to \\2 \\1, error of 'no function \\2 \\1' appeared. It seems like that the the second parameter of cl-pairlis must be a function. I am a pretty beginner to elisp, so it is very hard for me to solve this problem, then i decide to ask for help here. If it can be accomplished, it will be really a progress to read and write articles. Thanks very much. Any help will be very appreciated. Best regard!
Re: [O] Trying to separate clocked time /ranges/ from scheduled times in a clean-ish view.
On 4/23/2014 8:09 PM, Brady Trainor wrote: On 4/23/2014 5:47 PM, Brady Trainor wrote: ... I really don't think I am using it the intended way, please disregard, there is plenty of other functionality I can continue to discover and leverage to my needs. Sorry for the noise. Brady (I should consider using reschedule or making time-stamp inactive, etc., for what I was trying to do.)
Re: [O] [RFC] Org Minor Mode?
On 4/19/2014 8:57 AM, Bastien wrote: Hi Thorsten, Thorsten Jolitz tjol...@gmail.com writes: In summary, its about: 1. generalize the regexp constants and vars (allow for comment-syntax, when org-minor-mode) 2. deal with hardcoded regexp-snippets in functions (my proposoal: replace ^ with org-BOL, $ with org-EOL, \\* with org-STAR) 3. outcomment new lines after calls to Org commands. I still think there is a simpler way, I'll explore this and I'll let you know. What about using advice on regexp functions to transform the regexps (when invoked in org-minor-mode buffers) so that $ is replaced with ; $ etc? One other issue is the use of the number of stars to determine outline level.
Re: [O] [RFC] Org Minor Mode?
On 4/10/2014 3:19 PM, Nicolas Goaziou wrote: I don't see why you would need the full power of Org-mode (whatever that means) in mere comments. There are actually many uses, especially if it becomes possible to treat language elements (functions, classes etc) as outline elements (cf. https://github.com/notestaff/outshine/blob/outshine-lang/outshine-lang.el ). Sparse trees and agenda views could be used to find all code elements related to a particular aspect of functionality, if items related to that aspect are tagged with a tag. Sparse trees could show just the public (interface) elements. Basically, outshine with the full power of Org and the ability to treat language elements as outline headings would add up to the first literate programming system I'd call usable.
[O] Holidays
Hi all, I'll be offline until wednesday, then [b/h]ack again. Let's keep the Orgball rolling, -- Bastien
Re: [O] auto-roll-over of org-todo's?
Sharon Kimble boudic...@talktalk.net writes: In my agenda I have several items I call my weeklies because they repeat weekly, this is one of them - Desert island discs - radio 2 @ 1100 SCHEDULED: 2014-04-27 Sun +7d Is there any way in which it can be auto-rolled-over every Sunday without intervention from myself please? What exactly do you want it to do? I don't understand what you mean by auto-roll-over. -- Nick
[O] [babel] Setting python interpreter version on per-block or per-subtree basis
Hi Is there an easy way to specify the python version to use for a particular block or sub-tree? My use case is that I have mainly migrated to python 3, but there is still the occasional library that has not been updated yet, so I need to fall back to python 2.7 for some tasks. I can work around the problem by putting the python 2 code in a separate org file and use # Local Variables: # org-babel-python-command: /path/to/python2 # End: but keeping everything in the same file would be preferable. Thanks Will -- Dr William Henney, Centro de Radioastronomía y Astrofísica, Universidad Nacional Autónoma de México, Campus Morelia
[O] run R code block in the background (currently emacs freezes when running code)
Hi all. how does one send the eval commands to the when running R code blocks to RSS to the background? currently when i evaluate a long code block it freezes Emacs until the process is done. here is an example code block i use: #+BEGIN_SRC R :session R1 :results output log.sga.270 - glm(NSGA ~ IQRfintempmabirth+sinetime+costime+age_centered+age_centered_sq+cig_preg+cig_pre+med_income+p_ospace+gender+prev_400+ diab+hyper+lungd+diab_other+prevpret+as.factor(kess)+as.factor(MRN)+as.factor(edu_group)+as.factor(byob)+parity,data=bd,family=binomial) summary(log.sga.270) #+END_SRC thx so much in advance Z
Re: [O] auto-roll-over of org-todo's?
Alexander Baier lexi.ba...@gmail.com writes: On 2014-04-24 05:47 Sharon Kimble wrote: In my agenda I have several items I call my weeklies because they repeat weekly, this is one of them - Desert island discs - radio 2 @ 1100 SCHEDULED: 2014-04-27 Sun +7d Is there any way in which it can be auto-rolled-over every Sunday without intervention from myself please? What do you mean by auto-rolled-over? I do nothing and the date passes and it resets itself to the next Sunday. Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots TGmeds = http://www.tgmeds.org.uk Debian testing, Fluxbox 1.3.5, emacs 24.4.50.10 signature.asc Description: PGP signature
Re: [O] problems while editing in org-columns mode
Hello Carsten and everyone else reading, yesterday I re-stumbled into the problem B described below, and had a look at the Org sources. I think the solution could be: if user sets a non-special property to or nil, then remove the property. An example of a possible (non-bulletproof, test-only-intended) patch for org-entry-put follows. *** c:/Users/andrea/AppData/Roaming/.emacs.d/elpa/org-20140422/org.el Wed Apr 23 22:15:51 2014 --- c:/Users/andrea/AppData/Roaming/.emacs.d/elpa/org-20140422/org.new.el Thu Apr 24 12:40:49 2014 *** *** 15557,15562 --- 15557,15563 ((member property org-special-properties) (error The %s property can not yet be set with `org-entry-put' property)) +((equal value ) (org-delete-property property)) (t ; a non-special property (let ((buffer-invisibility-spec (org-inhibit-invisibility))) ; Emacs 21 (setq range (org-get-property-block beg end 'force)) Does it make sense for you too? Kindest regards, Andrea Carsten Dominik carsten.domi...@gmail.com writes: Hi Andrea, I have fixed problem A. Problem B has to do with the fact that the property search function does not find a property with an empty value. I need to look into this some more. - Carsten On Nov 22, 2013, at 8:30 PM, andrea.rosse...@gmail.com wrote: ... HOW TO REPRODUCE PROBLEM A: 1) create an example Org file like this: * myproject ** mytask1 ** mytask2 2) click on the word myproject, C-c C-x C-c to enable column view 3) M-S-right, then answer the wizard questions: property=cost, title=cost, width=8, summary=add_numbers 4) now click on the word myproject, type q to leave org-columns mode 5) you will see that in the first row of the buffer a new line appears: #+COLUMNS: %25ITEM %8cost %TODO %3PRIORITY %TAGS I expected %8cost{+} instead of %8cost. Even if f I change manually %8cost to %8cost{+} the automatic sums (cost of myproject sums cost of mytask1+mytask2) still don't work. The sums work properly if I remove the entire #+COLUMNS statement and add to the :PROPERTIES: of row myproject the following property: :COLUMNS: %25ITEM %8cost{+} %TODO %3PRIORITY %TAGS HOW TO REPRODUCE PROBLEM B: 1, 2, 3) same steps than problem A 4) go on row mytask1 column cost, type e to edit the value, set it to 1234, type RET 5) type e and change the proposed value 1234 into the empty string, then type RET 6) type e and set the value to 3456, then type RET 7) go on row mytask1, type TAB to see the properties: you will see that the properties are now: :PROPERTIES: :cost: :cost: 3456 :END: (I did not expect that empty :cost: column)
Re: [O] auto-roll-over of org-todo's?
On 2014-04-24 05:47 Sharon Kimble wrote: In my agenda I have several items I call my weeklies because they repeat weekly, this is one of them - Desert island discs - radio 2 @ 1100 SCHEDULED: 2014-04-27 Sun +7d Is there any way in which it can be auto-rolled-over every Sunday without intervention from myself please? What do you mean by auto-rolled-over? -- Alexander Baier
[O] python babel not running startup file
I have the PYTHONSTARTUP environment variable set to ~/.pythonrc. That file is not run by Org babel. Can anyone recommend how to execute that file, or some other method for customizing all Org babel python executions. Specifically, I load a custom colorbar in my ~/.pythonrc and ~/.ipythonrc files, and would like Org python to behave the same. -k.
Re: [O] auto-roll-over of org-todo's?
Hi Sharon, just remove the SCHEDULED keyword. Detlef Am Thu, 24 Apr 2014 04:47:45 +0100 schrieb Sharon Kimble boudic...@talktalk.net: In my agenda I have several items I call my weeklies because they repeat weekly, this is one of them - --8---cut here---start-8--- Desert island discs - radio 2 @ 1100 SCHEDULED: 2014-04-27 Sun +7d --8---cut here---end---8--- Is there any way in which it can be auto-rolled-over every Sunday without intervention from myself please? Thanks Sharon.
Re: [O] observations on updating to recent org
Nicolas Goaziou n.goaz...@gmail.com writes: Nicolas Goaziou n.goaz...@gmail.com writes: Greg Troxel g...@ir.bbn.com writes: I didn't try to turn this on. My icalendar-relevant settings are (setq org-icalendar-alarm-time 10) (setq org-icalendar-use-scheduled nil) (setq org-icalendar-use-deadline nil) I am trying to get ics entries only for headlines with active timestamps. It is a bug then. I'll look into it in a few hours. This should be fixed. Thank you for the report. Thanks for the quick fix. export now behaves correctly, and it takes only 5s, which is way faster than 90! pgpsz1dUYxMam.pgp Description: PGP signature
Re: [O] [babel] Setting python interpreter version on per-block or per-subtree basis
William Henney when...@gmail.com writes: Hello, Will! Is there an easy way to specify the python version to use for a particular block or sub-tree? Is it something you can define an inherited property or a tag for, and then add some advice around org-babel-execute:python to check that property and use let to bind org-babel-python-comand? Maybe something like this, for example: #+begin_src emacs-lisp (defadvice org-babel-execute:python (around will activate) (if (member python2 (org-get-tags-at)) (let ((org-babel-python-command /path/to/python2)) ad-do-it) ad-do-it)) #+end_src * Test :python2: #+begin_src python return 1 + 3 #+end_src Sacha
[O] exporter bindings in agenda
I use org relatively normally, with notes, TODO items, and appointments (active timestamps), and way too many of them scheduled to be done on any given day. I export all agenda files to a combined ics file and then stick it someplace I can subscribe to it from non-emacs calendaring software. To do this, I first invoke the agenda (because I want to see that too), and then, because C-c C-e is not bound in the agenda view, pick a random item and hit return, and then C-c C-e c c to export. I realize there is C-x C-w in the agenda, but that does something else -- only exporting the items in the current agenda view. So, I'd like to suggest having the export key bindings work in the agenda buffer. The problem is that many of them do not make sense because there is not a single org file associated with the agenda. My proposal is that C-c C-e should behave similarly to when in an org file, but choices that require an associated org file should be omitted. Specifically, I think the following options make sense: c c (ical combined) c a (ical all) P x (publish - choose project) P a (publish - all projects One could omit P, because publishing and agendas are disconnected, But I don't see the harm in it working if someone types it; it's not like they are likely to have meant something else. pgps2IuZrKi00.pgp Description: PGP signature
[O] org-bibtex-read error calling bibtex-parse-entry
Hi, I cannot get org-bibtex to work for me. Tried in a clean emacs -Q. Emacs- Version: 24.4.50, org-vesion: 8.2.6 Calling org-bibtex-read leads, independent of the bibtex entry used on (I tried everything, including the example of the org-bibtex-documentation), to the following error: Debugger entered--Lisp error: (wrong-type-argument stringp nil) looking-at(nil) bibtex-parse-entry() org-bibtex-read() call-interactively(org-bibtex-read record nil) command-execute(org-bibtex-read record) execute-extended-command(nil org-bibtex-read) call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) I am sorry if this is the wrong place, but I am not sure how to test if bibtex-parse-entry is the real culprit. I would, of course, understand if I cannot get help here for the pre-release snapshot of Emacs I am using. Mathäus.
Re: [O] putting a element +UWa in table
Assuming you never want to use strike-through text (who does?), you can customise (or otherwise modify) the variable `org-emphasis-alist` to remove the entry for +. Will On Tue, Apr 22, 2014 at 8:09 AM, Bastien b...@gnu.org wrote: Neal Becker ndbeck...@gmail.com writes: How do I put such an item in a table without org table misinterpreting it? You can't. -- Bastien -- Dr William Henney, Centro de Radioastronomía y Astrofísica, Universidad Nacional Autónoma de México, Campus Morelia
Re: [O] org-review-schedule
Hi Bastien, On 2014-04-19 10:14, Bastien b...@gnu.org writes: Hi Alan, thanks for sharing -- some comments: - you need to update the copyright of the file; I changed the date. As I signed the FSF paper, do I need to change the name as well and put mine? - example code in section 3 of the header is mangled; I removed that example; it should not be in the file. - there are some dangling parentheses; Are those parentheses on a line by themselves? I could not find them. - use (get-text-property (point-min) ...) instead of (get-text-property 1 ...) Changed. - I'd use org-review instead of org-review-schedule as prefix; Changed. - maybe you can use naked timestamps like 2014-04-19 sam. instead of inactive ones, this way using [ in the agenda will not create false positives by inserting entries with a REVIEW property. This is now the case by default, with an option to have inactive or active time stamps. - I infer from a quick read that this works for the agenda but I guess this could work for both the agenda and Org buffers; It depends what this means ;-) My goal was to use it in an agenda view, but most of the functionality does not depend on it. Since you took inspirationg from org-expiry, I guess some of the comments above would apply there too... feel free to hack into this directions for both org-expiry.el and org-review.el! Actually, maybe both should be merged somehow, since expiring is just reviewing entries to interactively delete them. I'm still not sure where to take this ... I agree both are cases of adding dates to entries and doing things according to those dates, but I still need to think more about how to generalize it to cover both cases. I attach the new version. I would like to propose to add this to the contrib directory, but I don't know the procedure to submit this code. Thanks, Alan org-review.el Description: application/emacs-lisp
[O] To interrupt org-latex-pdf-process to regexp-replace some string of the .tex intermediate file and continue to export
I am using org-mode to write some article now. Org-mode is really a great tool to outline a article with great table and image support. Org-mode can display inline .png image but not .pdf file. Because now org-mode can not control the width or height of shown inline image, so i use matplotlib to produce low dpi .png image in PNG folder for inline display and higher dpi pdf image in PDF folder for finally article export. In .org file, the image link is like [[file:PNG\*.png]] and \includegraphics{PNG\*.png}in the produced .tex file. Then emacs will use org-latex-pdf-process to render it to pdf file. What I want is that before or in org-latex-pdf-process, a regexp replace function is added to replace the \includegraphics{PDF\*.pdf}, and then produce the final pdf file. Can anyone give a hand?
[O] Exporting to LaTeX Beamer
Hi, I am trying to export an org file to individual Beamer frames but fail as Org mode exports the sections, but not the frames. I use the following example org file (as given by http://orgmode.org/worg/exporters/beamer/tutorial.html) ## #+TITLE: Writing Beamer presentations in org-mode #+AUTHOR:Eric S Fraga #+EMAIL: e.fr...@ucl.ac.uk #+DATE: 2010-03-30 Tue #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [bigger] #+BEAMER_FRAME_LEVEL: 2 #+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %4BEAMER_col(Col) %10BEAMER_extra(Extra) * Introduction ** A simple slide This slide consists of some text with a number of bullet points: - the first, very @important@, point! - the previous point shows the use of the special markup which translates to the Beamer specific /alert/ command for highlighting text. The above list could be numbered or any other type of list and may include sub-lists. and get the following result, where ** is translated into subsection. % Created 2014-04-25 Fr 06:36 \documentclass[bigger]{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{fixltx2e} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \usepackage{wrapfig} \usepackage{rotating} \usepackage[normalem]{ulem} \usepackage{amsmath} \usepackage{textcomp} \usepackage{marvosym} \usepackage{wasysym} \usepackage{amssymb} \usepackage{hyperref} \tolerance=1000 \author{Eric S Fraga} \date{2010-03-30 Tue} \title{Writing Beamer presentations in org-mode} \hypersetup{ pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 24.3.1 (Org mode 8.2.6)}} \begin{document} \maketitle \tableofcontents \section{Introduction} \label{sec-1} \subsection{A simple slide} \label{sec-1-1} This slide consists of some text with a number of bullet points: \begin{itemize} \item the first, very @important@, point! \item the previous point shows the use of the special markup which translates to the Beamer specific \emph{alert} command for highlighting text. \end{itemize} The above list could be numbered or any other type of list and may include sub-lists. % Emacs 24.3.1 (Org mode 8.2.6) \end{document} ## What is needed to fix this? Uwe
Re: [O] auto-roll-over of org-todo's?
Hi Sharon, On 24 April 2014 04:47, Sharon Kimble boudic...@talktalk.net wrote: In my agenda I have several items I call my weeklies because they repeat weekly, this is one of them - --8---cut here---start-8--- Desert island discs - radio 2 @ 1100 SCHEDULED: 2014-04-27 Sun +7d --8---cut here---end---8--- Is there any way in which it can be auto-rolled-over every Sunday without intervention from myself please? So long as you just want to have weekly events in your agenda, simple active timestamps should do the trick. For example: --8---cut here---start-8--- ** Desert Island Disks on Radio 2 2014-04-27 Sun 11:00 +1w --8---cut here---end---8--- SCHEDULED is designed as a way to tell you that you should start a particular task or project, so SCHEDULED items will continue to show up on the current day's agenda from the time they are scheduled until you mark them done. Hope that helps, Leonard
Re: [O] setting left margin in PDF output of ORG file
Hi Dave, Please read http://en.wikipedia.org/wiki/Canons_of_page_construction before changing anything in the layout of margins. The typical LaTeX classes are made thorougly with those classic rules of page construction in mind. On 2014-04-23, J. David Boyd wrote: I can export an org file to a PDF no problem, looks great. However, how do I get rid of the huge left and right and top and bottom margins? I like my PDFs to have no more than .75 top, bottom, left and right. I've looked through all the latex, org-latex, org-beamer variables I can find with customize-apropos, but not having any luck. Thanks, Dave -- Michael Strey www.strey.biz
Re: [O] (org-insert-headline '(4)) should insert new headline before point
Leonard Randall leonard.a.rand...@gmail.com writes: Sorry, I should clarify that the C-RET functions as expected in the content of an entry, it is only problematic when it is called from the headline. All best, Leonard Yes, please, this has gotten really difficult to use all of a sudden! New headings are inserted between the old heading and the old heading's PROPERTIES drawer, which seems very wrong... On 23 April 2014 22:42, Leonard Randall leonard.a.rand...@gmail.com wrote: Hi Bastien, I just wanted to report an issue with this fix. In many use cases it makes C-RET less useful, and renders the speedkeys command `i' useless. It makes C-RET function much like M-RET, and it makes `i' insert headlines before any content. So if I call C-RET in the middle of the following headline: --- ** Important Meeting SCHEDULED: 2014-04-26 Sat 16:30 headline content... --- I get: --- ** Important ** Meeting SCHEDULED: 2014-04-26 Sat 16:00 headline content... --- And when I use the speedkeys command `i' at the beginning, I get --- ** Important Meeting ** SCHEDULED: 2014-04-26 Sat 16:00 headline content... --- Both of these break the scheduling cookie and defeat the main purpose of these commands. Reverting the change restores expected behavior in these cases, but then I suppose we are left with York's problem. All best, Leonard On 22 April 2014 10:23, Bastien b...@gnu.org wrote: Hi York, thanks for coming back to this. York Zhao gtdplatf...@gmail.com writes: What I meant was that with one prefix argument, the command `org-insert-heading' should insert a new heading *before* the current heading, not after. Actually, this has little to do with the prefix argument: when at the beginning of a heading or a list item, M-RET should add a new heading/item *before* the current heading/item. This is fixed now, thanks for reporting this, PS: Using C-u M-RET will force `org-insert-heading-respect-content' to `t', i.e. add the headline at the end of the subtree. As Nicolas noted, this is the same than C-RET. -- Bastien