[O] The problem with `flet' in Org-mode and (future) Emacs 24.2
Hello, I'm using Emacs compiled from BZR trunk and Org-mode compiled from GIT. Begining from some revision (I don't remember exact revno) function `flet' was declared obsolete so Org-mode compilation is accompanied with warnings about that. If just ignore them then I get malfunction Org-mode. I made patch to change all `flet's to appropriate functions and it works. The problem is that these functions are new too. As I see it, the patch will break compatability with current and older versions of Emacs. WDYT? P.S. As I remember there are at least two problems with Org-mode compiled _without_ patch: exporting to HTML and code tangling. -- Nouvelle cuisine, n.: French for not enough food. Continental breakfast, n.: English for not enough food. Tapas, n.: Spanish for not enough food. Dim Sum, n.: Chinese for more food than you've ever seen in your entire life. flet2cl-flet.patch.bz2 Description: BZip2 compressed data
Re: [O] DevonThink links in org mode?
On 16 juil. 2012, at 20:22, John Wiegley wrote: I created org-devonthink.el a long time ago: https://github.com/jwiegley/dot-emacs/blob/master/lisp/org-devonthink.el Really nice, thanks a lot! Alan
Re: [O] [BUG] new exporter and #+BEGIN_CENTER
Hello, cbe...@tajo.ucsd.edu writes: Jambunathan K kjambunat...@gmail.com writes: Center within Src. I don't think you can nest the blocks. It seems you are right. At least as far as executing the src block is concerned. It's perfectly fine to nest blocks (as long as you don't nest blocks of the same type – maybe I should allow this, btw). It looks like a limitation from `org-export-blocks-preprocess' (that is Babel). Unless there's a good reason behind it, I think it can be removed. Eric Schulte (CCed) may have an answer. There are a couple of changes to make in this function anyway once org-element hits core. Regards, -- Nicolas Goaziou
Re: [O] Feature that org mode needs most
Hi, Joseph, (I cc'ed also Bernt Hansen, aka the king of clocking ;-) maybe he has better ideas; he's more experience than me, for sure ;) Da: Joseph Thomas six50...@gmail.com Inviato: Martedì 17 Luglio 2012 23:15 there's no easy way I can see to make quick adjustments to clocked time between activities. Every day I will forget to clock to a new activity at some point. By the time I remember, time has passed. For example, I come back from a meeting and begin to work on a project. 20 minutes into it, I clock in. But I must then manually adjust both the previous activity and the current one so that they are accurate and don't overlap in the agenda view. When you can back from a meeting you can resolve idel time [[info:org#Resolving%20idle%20time][info:org#Resolving idle time]] If you changed your task but you forgot to clock outyou should check: [[info:org#Clocking%20commands][info:org#Clocking commands]] (`org-clock-in-last')' Reclock the last clocked task. With one `C-u' prefix argument, select the task from the clock history. With two `C-u' prefixes, force continuous clocking by starting the clock when the last clock stopped. Be careful to have a recent git version since this is a new feature, but it had bugs and the bugs have been fixed. Other thoughts: You can change the time from the agenda (never tried) but: [[info:org#Agenda%20commands][info:org#Agenda commands]] `v c' Show overlapping clock entries, clocking gaps, and other clocking problems in the current agenda range. You can then visit clocking lines and fix them manually. See the variable `org-agenda-clock-consistency-checks' for information on how to customize the definition of what constituted a clocking problem. To return to normal agenda display, press `l' to exit Logbook mode. Finally you can also use the brute force method: clock in the new task then run M-x org-resolve-clocks so that you can restart your current task by, say, 20 minutes then you can set (defcustom org-clock-out-remove-zero-time-clocks t Non-nil means remove the clock line when the resulting time is zero. :group 'org-clock :type 'boolean) However the last clocked-out task (the meeting) has been clocked out 20 minutes later. cheers, Giovanni
Re: [O] Feature that org mode needs most
Am 17.07.2012 23:33, schrieb Mehul Sanghvi: On Tue, Jul 17, 2012 at 5:15 PM, Joseph Thomas six50...@gmail.com wrote: Hello. I couldn't believe I hadn't been aware of org mode until a few months ago, as someone who's been using emacs for everything for many years. I use it to journal how all my time is spent in a given work day- for both work related tasks and non-work tasks (ex. getting coffee, lunch, conversations, etc.). Org mode is the only GTD software package I've seen that makes this possible without getting in the way. It just needs one small thing that keeps it from being perfect. Those who use it the same way I do (as a log of how all time was spent in a given day), there's no easy way I can see to make quick adjustments to clocked time between activities. Every day I will forget to clock to a new activity at some point. By the time I remember, time has passed. For example, I come back from a meeting and begin to work on a project. 20 minutes into it, I clock in. But I must then manually adjust both the previous activity and the current one so that they are accurate and don't overlap in the agenda view. This can be cumbersome, which seems to go against the overall idea of org mode. All that is needed to correct it is either a new fn and key binding, or a prefix arg to org-clock-in that allows you to enter an adjustment (in this example, 20) to subtract from the previous clock's out time and current clock's in time. Seems like it would be a minor thing to add that would make an enormous difference for users like me. Thanks for reading my request! Regards, Joe Joe, You can use the S-up and S-down key combinations to adjust the clocks for the current activity and the previous one. Move over to the hour and do S-up or S-down, then do the same with the minutes. The date gets adjusted automatically if you're straddling midnight. cheers, mehul p.s. does that make org-mode perfect now ? :) Hi, as a help being in agenda view pressing v c will: v c Show overlapping clock entries, clocking gaps, and other clocking problems in the current agenda range. You can then visit clocking lines and fix them manually. See the variable org-agenda-clock-consistency-checks for information on how to customize the definition of what constituted a clocking problem. To return to normal agenda display, press l to exit Logbook mode. Cheers, Rainer
[O] [new exporter] no caption and no label in tables exported to LaTeX
Hello, still I am testing the new exporter. Labels and captions are not exported to LaTeX. ECM: #+BEGIN_SRC org * Captions for Tables #+CAPTION: A Caption for Testing #+LABEL: tbl:Label #+ATTR_LaTeX: placement=[H] | one | two | three | |-+-+---| | 1 | 2 | 3 | | 2 | 4 | 6 | #+END_SRC With old exporter this becomes #+BEGIN_SRC latex \begin{table}[H] \caption{A Caption for Testing} \label{tbl:Label} \begin{center} \begin{tabular}{rrr} onetwothree \\ \hline 1 23 \\ 2 46 \\ \end{tabular} \end{center} \end{table} #+END_SRC in LaTeX. Wheras with the new exporter I get: #+BEGIN_SRC latex \begin{center} \begin{tabular}{rrr} one two three\\ \hline 1 2 3\\ 2 4 6\\ \end{tabular} \end{center} #+END_SRC Images are exported correctly. This is with (emacs-version) GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-09-19 on 3249CTO (org-version) Org-mode version 7.8.11 (release_7.8.11-201-g528b17 @ c:/daten/users/de_hts2fe/git/org-mode/lisp/) P.S. Thanks to Nicolas for fixing the bug with two backslashes. I can confirm it works with org-version above. -- Bis neulich ... Thomas
Re: [O] [new exporter] no caption and no label in tables exported to LaTeX
Hello, Thomas Holst thomas.ho...@de.bosch.com writes: Labels and captions are not exported to LaTeX. ECM: #+BEGIN_SRC org * Captions for Tables #+CAPTION: A Caption for Testing #+LABEL: tbl:Label #+ATTR_LaTeX: placement=[H] | one | two | three | |-+-+---| | 1 | 2 | 3 | | 2 | 4 | 6 | #+END_SRC This is because affiliated keywords must be attached to the element they refer to. In other words, there mustn't be a blank link between #+ATTR_LATEX and the beginning of the table. Regards, -- Nicolas Goaziou
Re: [O] new exporter
Nicolas Goaziou n.goaz...@gmail.com writes: Achim Gratz strom...@nexgo.de writes: I used whatever I had pulled yesterday... again, that failure happens only with Emacs 23, which may well be a bug in that version or the particular build. It actually got worse in that I can't seem to find an eval limit that works today, so the corruption that backtraced yesterday is gone and I now have a truly infinite recursion apparently. Would you happen to have any backtrace for them? Nevermind: I fixed them. I think all tests should pass now, in both emacs 24 and emacs 23. If you confirm this, I will move org-element.el into core. Regards,
Re: [O] [new exporter] no caption and no label in tables exported to LaTeX
Hi Nicolas, · Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Thomas Holst thomas.ho...@de.bosch.com writes: Labels and captions are not exported to LaTeX. ECM: #+BEGIN_SRC org * Captions for Tables #+CAPTION: A Caption for Testing #+LABEL: tbl:Label #+ATTR_LaTeX: placement=[H] | one | two | three | |-+-+---| | 1 | 2 | 3 | | 2 | 4 | 6 | #+END_SRC This is because affiliated keywords must be attached to the element they refer to. In other words, there mustn't be a blank link between #+ATTR_LATEX and the beginning of the table. Thanks for explaining and sorry for the noise. I just let the new exporter run over various or my org files and noticed the difference. -- Bis neulich ... Thomas
[O] [PATCH] fix documentation for org-clock-in-last
Hi, this patch updates the key bindings in the manual for org-clock-in-last and org-clock-cancel, after commit fea1b82befb cheers, Giovanni org.texi Update the key sequence for org-clock-in-last and org-clock-cancel * doc/org.texi (org-clock-in-last and org-clock-cancel) Update the defkeys After commit fea1b82befb the manual has not been updated, let's do it now. --- org.texi 2012-07-17 20:49:31.0 +0200 +++ org-2.texi 2012-07-18 11:34:58.041089500 +0200 @@ -6066,5 +6066,5 @@ timestamp@footnote{The corresponding in-buffer setting is: @code{#+STARTUP: lognoteclock-out}}. -@orgcmd{C-c C-x C-I,org-clock-in-last} +@orgcmd{C-c C-x C-x,org-clock-in-last} @vindex org-clock-continuously Reclock the last clocked task. With one @kbd{C-u} prefix argument, @@ -6086,5 +6086,5 @@ Changing the TODO state of an item to DONE automatically stops the clock if it is running in this same item. -@orgcmd{C-c C-x C-x,org-clock-cancel} +@orgcmd{C-c C-x C-q,org-clock-cancel} Cancel the current clock. This is useful if a clock was started by mistake, or if you ended up working on something else.
[O] [new exporter] problems exporting mathmode to LaTeX
Hi, forgive me if I am nagging :-). One of my collegues and myself want to switch to new exporter. While testing the new exporter on our existing org-files we encounter these problems. So here is the next one: #+BEGIN_SRC org 160\(^\circ\}\nbsp{}C -11^{\circ}\nbsp{}C #+END_SRC With the old exporter this becomes: #+BEGIN_SRC latex 160\(^\circ\)~C -11$^{\circ}$~C #+END_SRC in LaTeX. Which looks well in pdf. With the new exporter it becomes: #+BEGIN_SRC latex 160\(^\circ\)~C -11$^{\mathrm{\^{}}}$~C #+END_SRC in LaTeX. Where the second construct obviously is not what is expected and looks totaly wrong in pdf. Again with emacs -Q (emacs-version) GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-09-19 on 3249CTO (org-version) Org-mode version 7.8.11 (release_7.8.11-201-g528b17 @ c:/daten/users/de_hts2fe/git/org-mode/lisp/) -- Bis neulich ... Thomas
Re: [O] [new exporter] problems exporting mathmode to LaTeX
Da: Thomas Holst thomas.ho...@de.bosch.com Inviato: Mercoledì 18 Luglio 2012 12:13 So here is the next one: #+BEGIN_SRC org 160\(^\circ\}\nbsp{}C -11^{\circ}\nbsp{}C # +END_SRC With the new exporter it becomes: #+BEGIN_SRC latex 160\(^\circ\)~C -11$^{\mathrm{\^{}}}$~C #+END_SRC in LaTeX. Where the second construct obviously is not what is expected same here: (emacs-version) GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-09-19 on 3249CTO GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN (org-version) Org-mode version 7.8.11 (release_7.8.11-201-g528b17 Org-mode version 7.8.11 (66767db5 -- Bis neulich ... Thomas - Messaggio originale -
[O] bug#11774: bug#11774: bug#11774: org-mode causes undo boundaries to be lost
self-insert-command. Even just turning that magic 20 number into a variable would help. Providing it as a variable would be very easy, indeed. Maybe the user should be able to set undo boundaries and have them work after self-insert-command? Dunno, I'm not familiar with internals enough to opine. I installed the patch below which makes self-insert-command more careful to only remove undo boundaries that were auto-added. So (add-hook 'post-self-insert-hook #'undo-boundary 'append) should give you pretty much the behavior you were looking for. Stefan === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-18 05:44:36 + +++ src/ChangeLog 2012-07-18 13:17:22 + @@ -1,3 +1,10 @@ +2012-07-18 Stefan Monnier monn...@iro.umontreal.ca + + * lisp.h (last_undo_boundary): Declare new var. + * keyboard.c (command_loop_1): Set it. + * cmds.c (Fself_insert_command): Use it to only remove boundaries that + were auto-added by the command loop (bug#11774). + 2012-07-18 Dmitry Antipov dmanti...@yandex.ru Return more descriptive data from Fgarbage_collect. === modified file 'src/cmds.c' --- src/cmds.c 2012-06-16 12:24:15 + +++ src/cmds.c 2012-07-18 13:08:43 + @@ -296,7 +296,10 @@ if (remove_boundary CONSP (BVAR (current_buffer, undo_list)) - NILP (XCAR (BVAR (current_buffer, undo_list + NILP (XCAR (BVAR (current_buffer, undo_list))) + /* Only remove auto-added boundaries, not boundaries +added be explicit calls to undo-boundary. */ + EQ (BVAR (current_buffer, undo_list), last_undo_boundary)) /* Remove the undo_boundary that was just pushed. */ BVAR (current_buffer, undo_list) = XCDR (BVAR (current_buffer, undo_list)); === modified file 'src/keyboard.c' --- src/keyboard.c 2012-07-12 03:45:46 + +++ src/keyboard.c 2012-07-18 13:13:31 + @@ -1318,6 +1318,9 @@ } #endif +/* The last boundary auto-added to buffer-undo-list. */ +Lisp_Object last_undo_boundary; + /* FIXME: This is wrong rather than test window-system, we should call a new set-selection, which will then dispatch to x-set-selection, or tty-set-selection, or w32-set-selection, ... */ @@ -1565,7 +1568,13 @@ #endif if (NILP (KVAR (current_kboard, Vprefix_arg))) /* FIXME: Why? --Stef */ + { + Lisp_Object undo = BVAR (current_buffer, undo_list); Fundo_boundary (); + last_undo_boundary + = (EQ (undo, BVAR (current_buffer, undo_list)) +? Qnil : BVAR (current_buffer, undo_list)); + } Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); #ifdef HAVE_WINDOW_SYSTEM === modified file 'src/lisp.h' --- src/lisp.h 2012-07-18 05:44:36 + +++ src/lisp.h 2012-07-18 13:05:33 + @@ -2921,7 +2921,7 @@ extern void syms_of_search (void); extern void clear_regexp_cache (void); -/* Defined in minibuf.c */ +/* Defined in minibuf.c. */ extern Lisp_Object Qcompletion_ignore_case; extern Lisp_Object Vminibuffer_list; @@ -2930,25 +2930,25 @@ extern void init_minibuf_once (void); extern void syms_of_minibuf (void); -/* Defined in callint.c */ +/* Defined in callint.c. */ extern Lisp_Object Qminus, Qplus; extern Lisp_Object Qwhen; extern Lisp_Object Qcall_interactively, Qmouse_leave_buffer_hook; extern void syms_of_callint (void); -/* Defined in casefiddle.c */ +/* Defined in casefiddle.c. */ extern Lisp_Object Qidentity; extern void syms_of_casefiddle (void); extern void keys_of_casefiddle (void); -/* Defined in casetab.c */ +/* Defined in casetab.c. */ extern void init_casetab_once (void); extern void syms_of_casetab (void); -/* Defined in keyboard.c */ +/* Defined in keyboard.c. */ extern Lisp_Object echo_message_buffer; extern struct kboard *echo_kboard; @@ -2956,6 +2956,7 @@ extern Lisp_Object Qdisabled, QCfilter; extern Lisp_Object Qup, Qdown, Qbottom; extern Lisp_Object Qtop; +extern Lisp_Object last_undo_boundary; extern int input_pending; extern Lisp_Object menu_bar_items (Lisp_Object); extern Lisp_Object tool_bar_items (Lisp_Object, int *); @@ -2976,13 +2977,13 @@ extern void syms_of_keyboard (void); extern void keys_of_keyboard (void); -/* Defined in indent.c */ +/* Defined in indent.c. */ extern ptrdiff_t current_column (void); extern void invalidate_current_column (void); extern int indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT); extern void syms_of_indent (void); -/* Defined in frame.c */ +/* Defined in frame.c. */ extern Lisp_Object Qonly; extern Lisp_Object Qvisible; extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); @@ -2995,7 +2996,7 @@ extern void frames_discard_buffer (Lisp_Object); extern void syms_of_frame (void); -/* Defined in emacs.c */ +/* Defined in emacs.c. */ extern char **initial_argv; extern int initial_argc; #if defined (HAVE_X_WINDOWS) ||
Re: [O] [new exporter] problems exporting mathmode to LaTeX
Hello, Thomas Holst thomas.ho...@de.bosch.com writes: So here is the next one: #+BEGIN_SRC org 160\(^\circ\}\nbsp{}C -11^{\circ}\nbsp{}C #+END_SRC With the old exporter this becomes: #+BEGIN_SRC latex 160\(^\circ\)~C -11$^{\circ}$~C #+END_SRC in LaTeX. Which looks well in pdf. With the new exporter it becomes: #+BEGIN_SRC latex 160\(^\circ\)~C -11$^{\mathrm{\^{}}}$~C #+END_SRC in LaTeX. Where the second construct obviously is not what is expected and looks totaly wrong in pdf. I don't know how you obtain this result, you may have settings different than mine. Anyway, the new exporter doesn't change anything with regards to src blocks. It basically runs `org-export-blocks-preprocess' in a temporary clone of the buffer being exported and then parses the obtained expansion. If you want to have a glimpse at what is really parsed, you can evaluate the following snippet in the buffer you want to export: (let ((org-current-export-file (current-buffer))) (org-export-blocks-preprocess)) It may help to understand what is going on. Regards, -- Nicolas Goaziou
[O] recurring floating appointments
I'm using the builtin org 7.8.11 in Emacs 24. In an org file, I have something like * Recurring Events #+CATEGORY: Meeting ** Monthly Third Thursday Meeting %%(org-float t 4 3) This displays on my agenda fine. However, that particular meeting always happens at 10:00 AM, and I'd prefer to show it at that time in my agenda, instead of an all-day event. I looked through the documentation for org-float (as well as diary-float in the Emacs manual), and I saw nothing on assigning a time to a floating event. I tried doing something like %%(org-float t 4 3) 10:00-11:00 but that didn't work. Is assigning a time like this to an org-float even possible? Am I missing something?
Re: [O] Feature that org mode needs most
Giovanni, thanks so much for taking the time to respond. I had learned about the idle time feature from the info docs when I first started using org. The reason this solution won't work for me though is that, if I understand correctly, it would only apply in scenarios where my emacs session detects inactivity for the configured amount of time, like when I leave my desk. If so, this doesn't cover the scenarios where I begin working on a new task at my computer but forget to clock-in to the new task in org (about 60% of the cases where I forget). However, I reviewed your other suggestions. I did download the latest snapshot of org from git, but as I need to maintain my todo.in NT emacs at work, I don't have make and so just hacked my config by replacing the emacs 23.4.1 distribution org .el files with the current ones. I needed to comment out the org-version.el warning, but otherwise everything seems to work fine. The new v c agenda view is great! Very useful. It appears for those like myself that what will work best under the latest functionality is the following use case, which I tested a little while ago: In my forget-to-clock-in-to-new-task scenario, 1. I use org-resolve-clocks, with the K option. 2. I then specify the number of minutes that passed since I forgot. 3. Clock in to the new task. 4. Org kindly asks me if I would like to clock-in but adjusting for the same amount of minutes. This solution best best allows me to keep accurate clocks without disrupting focus on my current activity, and will already make a big difference going forward. If, in the future though, you implemented S-up and S-down functionality so that it adjusted current and previous clocks simultaneously (or at least the ability to turn this on as an option), I would be your biggest fan :) Regards, Joe On Wed, Jul 18, 2012 at 4:50 AM, Giovanni Ridolfi giovanni.rido...@yahoo.it wrote: Hi, Joseph, (I cc'ed also Bernt Hansen, aka the king of clocking ;-) maybe he has better ideas; he's more experience than me, for sure ;) Da: Joseph Thomas six50...@gmail.com Inviato: Martedì 17 Luglio 2012 23:15 there's no easy way I can see to make quick adjustments to clocked time between activities. Every day I will forget to clock to a new activity at some point. By the time I remember, time has passed. For example, I come back from a meeting and begin to work on a project. 20 minutes into it, I clock in. But I must then manually adjust both the previous activity and the current one so that they are accurate and don't overlap in the agenda view. When you can back from a meeting you can resolve idel time [[info:org#Resolving%20idle%20time][info:org#Resolving idle time]] If you changed your task but you forgot to clock outyou should check: [[info:org#Clocking%20commands][info:org#Clocking commands]] (`org-clock-in-last')' Reclock the last clocked task. With one `C-u' prefix argument, select the task from the clock history. With two `C-u' prefixes, force continuous clocking by starting the clock when the last clock stopped. Be careful to have a recent git version since this is a new feature, but it had bugs and the bugs have been fixed. Other thoughts: You can change the time from the agenda (never tried) but: [[info:org#Agenda%20commands][info:org#Agenda commands]] `v c' Show overlapping clock entries, clocking gaps, and other clocking problems in the current agenda range. You can then visit clocking lines and fix them manually. See the variable `org-agenda-clock-consistency-checks' for information on how to customize the definition of what constituted a clocking problem. To return to normal agenda display, press `l' to exit Logbook mode. Finally you can also use the brute force method: clock in the new task then run M-x org-resolve-clocks so that you can restart your current task by, say, 20 minutes then you can set (defcustom org-clock-out-remove-zero-time-clocks t Non-nil means remove the clock line when the resulting time is zero. :group 'org-clock :type 'boolean) However the last clocked-out task (the meeting) has been clocked out 20 minutes later. cheers, Giovanni
Re: [O] Feature that org mode needs most
Forgot to ask in my last response- since I plan to use org-resolve-clocks much more regularly than perhaps it was intended, I would like to make a key biniding for it. If there are plans to do this in an emacs distribution at some point, I'd like to choose something logical- ideally something that the org team would choose. Could you make a suggestion? Thanks again! Joe On Wed, Jul 18, 2012 at 4:50 AM, Giovanni Ridolfi giovanni.rido...@yahoo.it wrote: Hi, Joseph, (I cc'ed also Bernt Hansen, aka the king of clocking ;-) maybe he has better ideas; he's more experience than me, for sure ;) Da: Joseph Thomas six50...@gmail.com Inviato: Martedì 17 Luglio 2012 23:15 there's no easy way I can see to make quick adjustments to clocked time between activities. Every day I will forget to clock to a new activity at some point. By the time I remember, time has passed. For example, I come back from a meeting and begin to work on a project. 20 minutes into it, I clock in. But I must then manually adjust both the previous activity and the current one so that they are accurate and don't overlap in the agenda view. When you can back from a meeting you can resolve idel time [[info:org#Resolving%20idle%20time][info:org#Resolving idle time]] If you changed your task but you forgot to clock outyou should check: [[info:org#Clocking%20commands][info:org#Clocking commands]] (`org-clock-in-last')' Reclock the last clocked task. With one `C-u' prefix argument, select the task from the clock history. With two `C-u' prefixes, force continuous clocking by starting the clock when the last clock stopped. Be careful to have a recent git version since this is a new feature, but it had bugs and the bugs have been fixed. Other thoughts: You can change the time from the agenda (never tried) but: [[info:org#Agenda%20commands][info:org#Agenda commands]] `v c' Show overlapping clock entries, clocking gaps, and other clocking problems in the current agenda range. You can then visit clocking lines and fix them manually. See the variable `org-agenda-clock-consistency-checks' for information on how to customize the definition of what constituted a clocking problem. To return to normal agenda display, press `l' to exit Logbook mode. Finally you can also use the brute force method: clock in the new task then run M-x org-resolve-clocks so that you can restart your current task by, say, 20 minutes then you can set (defcustom org-clock-out-remove-zero-time-clocks t Non-nil means remove the clock line when the resulting time is zero. :group 'org-clock :type 'boolean) However the last clocked-out task (the meeting) has been clocked out 20 minutes later. cheers, Giovanni
Re: [O] recurring floating appointments
Hello Carson, Carson Chittom car...@wistly.net writes: […] %%(org-float t 4 3) 10:00-11:00 but that didn't work. --8---cut here---start-8--- * Recurring Events #+CATEGORY: Meeting ** Monthly Third Thursday Meeting 10:00-11:00 %%(org-float t 4 3) --8---cut here---end---8--- Maybe like this. Thanks., -- ఎందరో మహానుభావులు అందరికి వందనములు YYR
Re: [O] [new exporter] problems exporting mathmode to LaTeX
Hello Nicolas, thanks for your answer. Perhaps there is a misunderstanding. In my original post #+BEGIN_SRC org / #+END_SRC means context of an org file *not* inside a block. #+BEGIN_SRC LaTeX / #+END_SRC is the content of the tex-file generated by the exporters. So it isn't about blocks. It is about LaTeX-fragments in org files. Hope that helps to clarify what it is about. -- Bis neulich ... Thomas -Ursprüngliche Nachricht- Von: Nicolas Goaziou [mailto:n.goaz...@gmail.com] Gesendet: Mittwoch, 18. Juli 2012 15:47 An: Holst Thomas (DGS-EC/ESE4) Cc: Orgmode Betreff: Re: [new exporter] problems exporting mathmode to LaTeX Hello, Thomas Holst thomas.ho...@de.bosch.com writes: So here is the next one: #+BEGIN_SRC org 160\(^\circ\}\nbsp{}C -11^{\circ}\nbsp{}C #+END_SRC With the old exporter this becomes: #+BEGIN_SRC latex 160\(^\circ\)~C -11$^{\circ}$~C #+END_SRC in LaTeX. Which looks well in pdf. With the new exporter it becomes: #+BEGIN_SRC latex 160\(^\circ\)~C -11$^{\mathrm{\^{}}}$~C #+END_SRC in LaTeX. Where the second construct obviously is not what is expected and looks totaly wrong in pdf. I don't know how you obtain this result, you may have settings different than mine. Anyway, the new exporter doesn't change anything with regards to src blocks. It basically runs `org-export-blocks-preprocess' in a temporary clone of the buffer being exported and then parses the obtained expansion. If you want to have a glimpse at what is really parsed, you can evaluate the following snippet in the buffer you want to export: (let ((org-current-export-file (current-buffer))) (org-export-blocks-preprocess)) It may help to understand what is going on. Regards, -- Nicolas Goaziou
Re: [O] recurring floating appointments
Yagnesh Raghava Yakkala h...@yagnesh.org writes: Carson Chittom car...@wistly.net writes: %%(org-float t 4 3) 10:00-11:00 but that didn't work. * Recurring Events #+CATEGORY: Meeting ** Monthly Third Thursday Meeting 10:00-11:00 %%(org-float t 4 3) Maybe like this. Yes, that works great. Thank you! I knew I had to be missing something obvious, since org's documentation is good.
Re: [O] [new exporter] problems exporting mathmode to LaTeX
Hello, Holst Thomas (DGS-EC/ESE4) thomas.ho...@de.bosch.com writes: Perhaps there is a misunderstanding. There was. Now I get it. So it isn't about blocks. It is about LaTeX-fragments in org files. Actually, it isn't about LaTeX-fragments but entities. Your first line contains a LaTeX-fragment: it appears (correctly) as-is in the LaTeX output. Though, the second line has an entity, \circ (see `org-entities' variable), which is going to be replaced with \^{}, as suggested by the variable. I think that's not what you expect. It seems that there is no Org entity providing \circ LaTeX symbol. Maybe one should be added, if only to compose functions. On the other hand, for your specific case, there is the deg entity that may fit your needs. I.e. -11\deg\nbsp{}C You can also enforce \circ by making it a real LaTeX-fragment. I.e. -11^{$\circ$}\nbsp{}C As a final note, it seems there is still a bug in the new exporter, since the expected output should be: -11$^{\^{}}$~C There shouldn't be a \mathrm{} for a single command. I am going to fix it. Regards, -- Nicolas Goaziou
[O] [new exporter] Links in definition list titles are not exported
Given the org file #+begin_src org ,* List Test ,** Plain List ,- A ,- [[http://www.google.com][google]] ,- [[http://www.google.com]] ,** Ordered List ,1. A ,2. [[http://www.google.com][google]] ,3. [[http://www.google.com]] ,** Definition List ,- A :: A ,- [[http://www.google.com][google]] :: Google ,- [[http://www.google.com]] :: google #+end_src org If I try to export to e-ascii =M-x org-export-dispatch RET A= I obtain the following export (omitting TOC and title) #+begin_ascii 1 List Test === [google] http://www.google.com 1.1 Plain List ~~ - A - [google] - [http://www.google.com] [google] http://www.google.com 1.2 Ordered List 1. A 2. [google] 3. [http://www.google.com] [google] http://www.google.com 1.3 Definition List ~~~ A: A [[http://www.google.com][google]]: Google [[http://www.google.com]]: google #+end_ascii This also occurs in e-html and e-latex. In the old exporter these would have also been formatted the same way they are in ordered and plain lists. Is this change by design? Regards, Jon
Re: [O] Feature that org mode needs most
Da: Joseph Thomas six50...@gmail.com Inviato: Mercoledì 18 Luglio 2012 16:01 I did download the latest snapshot of org from git, but as I need to maintain my todo.in NT emacs at work, I don't have make and so and so . you read the nice page on worg written by Achim Gratz http://orgmode.org/worg/org-hacks.html and followed the instructions for us leaving through the Windows great! juice of the instructions--- BUT PLEASE READ THEM ALL - your current directory must be where org has been unpacked into Windows CMD.exe has quite different quoting rules and this won't work, so your other option is to start Emacs like this emacs -Q -L lisp -l ../UTILITIES/org-fixup then paste the following into the *scratch* buffer (let ((org-fake-release 7.8.11) (org-fake-git-version 7.8.11-fake)) (org-make-autoloads)) position the cursor after the closing paren and press C-j or C-x C-e to evaluate the form. -
Re: [O] Feature that org mode needs most
Thanks so much, I'll follow the instructions on this page, it seems like a better approach than what I did earlier today. On Wed, Jul 18, 2012 at 11:46 AM, Giovanni Ridolfi giovanni.rido...@yahoo.it wrote: Da: Joseph Thomas six50...@gmail.com Inviato: Mercoledì 18 Luglio 2012 16:01 I did download the latest snapshot of org from git, but as I need to maintain my todo.in NT emacs at work, I don't have make and so and so . you read the nice page on worg written by Achim Gratz http://orgmode.org/worg/org-hacks.html and followed the instructions for us leaving through the Windows great! juice of the instructions---BUT PLEASE READ THEM ALL - your current directory must be where org has been unpacked into Windows CMD.exe has quite different quoting rules and this won't work, so your other option is to start Emacs like this emacs -Q -L lisp -l ../UTILITIES/org-fixup then paste the following into the *scratch* buffer (let ((org-fake-release 7.8.11) (org-fake-git-version 7.8.11-fake)) (org-make-autoloads)) position the cursor after the closing paren and press C-j or C-x C-e to evaluate the form. -
Re: [O] [new exporter] Links in definition list titles are not exported
Hello, Jonathan Leech-Pepin jonathan.leechpe...@gmail.com writes: Given the org file #+begin_src org ,* List Test ,** Plain List ,- A ,- [[http://www.google.com][google]] ,- [[http://www.google.com]] ,** Ordered List ,1. A ,2. [[http://www.google.com][google]] ,3. [[http://www.google.com]] ,** Definition List ,- A :: A ,- [[http://www.google.com][google]] :: Google ,- [[http://www.google.com]] :: google #+end_src org If I try to export to e-ascii =M-x org-export-dispatch RET A= I obtain the following export (omitting TOC and title) #+begin_ascii 1 List Test === [google] http://www.google.com 1.1 Plain List ~~ - A - [google] - [http://www.google.com] [google] http://www.google.com 1.2 Ordered List 1. A 2. [google] 3. [http://www.google.com] [google] http://www.google.com 1.3 Definition List ~~~ A: A [[http://www.google.com][google]]: Google [[http://www.google.com]]: google #+end_ascii This also occurs in e-html and e-latex. In the old exporter these would have also been formatted the same way they are in ordered and plain lists. Is this change by design? No, it isn't. I had forbidden links in item tags. This should be fixed now. Thank you for reporting this. Regards, -- Nicolas Goaziou
Re: [O] new exporter
Nicolas Goaziou writes: compile:: $(CP) contrib/lisp/org-{export,element,e-*}.el lisp/ Noted. Thank you. That should be all compile::, really. Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
Re: [O] The problem with `flet' in Org-mode and (future) Emacs 24.2
Vladimir Lomov writes: Begining from some revision (I don't remember exact revno) function `flet' was declared obsolete so Org-mode compilation is accompanied with warnings about that. If just ignore them then I get malfunction Org-mode. I made patch to change all `flet's to appropriate functions and it works. This should not happen if I understood Stefan correctly and you should log a bug against Emacs. The problem is that these functions are new too. As I see it, the patch will break compatability with current and older versions of Emacs. WDYT? Org needs to stay backwards compatible with older Emacs versions, so it will likely not be possible to directly replace things as you've done. I'm not sure a defsubst would cut it, so it looks like this will become another compatibility macro (expanding to either flet or cl-flet depending on Emacs version). Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Waldorf MIDI Implementation additional documentation: http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
Re: [O] The problem with `flet' in Org-mode and (future) Emacs 24.2
Vladimir Lomov lomov...@gmail.com writes: Hello, I'm using Emacs compiled from BZR trunk and Org-mode compiled from GIT. Begining from some revision (I don't remember exact revno) function `flet' was declared obsolete so Org-mode compilation is accompanied with warnings about that. If just ignore them then I get malfunction Org-mode. I made patch to change all `flet's to appropriate functions and it works. The problem is that these functions are new too. As I see it, the patch will break compatability with current and older versions of Emacs. WDYT? P.S. As I remember there are at least two problems with Org-mode compiled _without_ patch: exporting to HTML and code tangling. This attached alternate patch introduces two new compatibility macros named `org-flet' and `org-labels' in org-macs.el. These macros are aliased to the appropriate cl macro depending on the version of Emacs in use. With this patch I am able to successfully compile Org-mode on both trunk and Emacs 24 (I haven't tried on older versions). Best, From 8687829d88513dd4af0eb254a0e0b0a28f4263d0 Mon Sep 17 00:00:00 2001 From: Eric Schulte eric.schu...@gmx.com Date: Wed, 18 Jul 2012 07:35:46 -0600 Subject: [PATCH] replace flet/labels with org-flet/org-labels This patch ensure Org-mode will build on all supported versions of Emacs, after the renaming of the cl macros behind the cl- prefix in the recent Emacs trunk. --- lisp/ob-awk.el | 2 +- lisp/ob-comint.el | 2 +- lisp/ob-exp.el | 2 +- lisp/ob-gnuplot.el | 2 +- lisp/ob-lob.el | 4 ++-- lisp/ob-python.el | 2 +- lisp/ob-ref.el | 2 +- lisp/ob-sh.el | 2 +- lisp/ob-tangle.el | 6 +++--- lisp/ob.el | 30 +++--- lisp/org-bibtex.el | 8 lisp/org-exp-blocks.el | 2 +- lisp/org-exp.el| 2 +- lisp/org-macs.el | 25 - lisp/org-mouse.el | 8 lisp/org-odt.el| 4 ++-- lisp/org-plot.el | 4 ++-- lisp/org.el| 6 +++--- 18 files changed, 68 insertions(+), 45 deletions(-) diff --git a/lisp/ob-awk.el b/lisp/ob-awk.el index 682d802..f89f775 100644 --- a/lisp/ob-awk.el +++ b/lisp/ob-awk.el @@ -96,7 +96,7 @@ called by `org-babel-execute-src-block' (defun org-babel-awk-var-to-awk (var optional sep) Return a printed value of VAR suitable for parsing with awk. - (flet ((echo-var (v) (if (stringp v) v (format %S v + (org-flet ((echo-var (v) (if (stringp v) v (format %S v (cond ((and (listp var) (listp (car var))) (orgtbl-to-generic var (list :sep (or sep \t) :fmt #'echo-var))) diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el index a0712b9..a560401 100644 --- a/lisp/ob-comint.el +++ b/lisp/ob-comint.el @@ -74,7 +74,7 @@ or user `keyboard-quit' during execution of body. (full-body (cadr (cdr (cdr meta) `(org-babel-comint-in-buffer ,buffer (let ((string-buffer ) dangling-text raw) - (flet ((my-filt (text) + (org-flet ((my-filt (text) (setq string-buffer (concat string-buffer text ;; setup filter (add-hook 'comint-output-filter-functions 'my-filt) diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index 561d5f3..5c52ee2 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -219,7 +219,7 @@ org-mode text. (defun org-babel-exp-do-export (info type optional hash) Return a string with the exported content of a code block. The function respects the value of the :exports header argument. - (flet ((silently () (let ((session (cdr (assoc :session (nth 2 info) + (org-flet ((silently () (let ((session (cdr (assoc :session (nth 2 info) (when (not (and session (equal none session))) (org-babel-exp-results info type 'silent (clean () (unless (eq type 'inline) (org-babel-remove-result info diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el index 5d07366..0f84643 100644 --- a/lisp/ob-gnuplot.el +++ b/lisp/ob-gnuplot.el @@ -88,7 +88,7 @@ code. (time-ind (or (plist-get params :timeind) (when timefmt 1))) output) - (flet ((add-to-body (text) + (org-flet ((add-to-body (text) (setq body (concat text \n body ;; append header argument settings to body (when title (add-to-body (format set title '%s' title))) ;; title diff --git a/lisp/ob-lob.el b/lisp/ob-lob.el index 1c0cf04..ab56d9e 100644 --- a/lisp/ob-lob.el +++ b/lisp/ob-lob.el @@ -97,7 +97,7 @@ if so then run the appropriate source block from the Library. ;;;###autoload (defun org-babel-lob-get-info () Return a Library of Babel function call as a string. - (flet ((nonempty (a b) + (org-flet ((nonempty (a b) (let ((it (match-string a))) (if (= (length it) 0) (match-string b) it (let ((case-fold-search t)) @@ -119,7 +119,7 @@ if so then run the appropriate source block from the Library. (defun org-babel-lob-execute
[O] agenda: why are tags enclosed with two :?
This is an except of my agenda: 14 days-agenda (W29-W31): Wednesday 18 July 2012 TODO 12345 * ! :habit:: Why is the tag enclosed with two :?
Re: [O] Feature that org mode needs most
You might want to check out Brent's answer to a similar question I asked a bit back (basically an expanded version of some answers given above): - http://www.mail-archive.com/emacs-orgmode@gnu.org/msg40499.html Also, per your shortcut question, I have this in ~/.emacs: ,--- | (global-set-key \C-cr 'org-resolve-clocks) `--- Best regards, John
Re: [O] Don't show future TODO items in the agenda
mrigetitd...@safe-mail.net writes: I have a bunch of TODO items, each with a timestamp, which I would like to not being displayed in the agenda if the day of their timestamp/schedule is in the future. Can you share an example of .org file along with the custom agenda command (or the default agenda view) you are using? Sorry, I am on the road and have no access to my org files. I use the default agenda M-o a a, and regular entries. This could be one of my entries. *** TODO make backups SCHEDULED: 2012-07-21 Sat .+10d I want to show this item in my agenda only if this task is either due or overdue. When I generate a agenda starting from today, spawning two weeks, I do not want to be reminded that I'd need to take backups in 7 days. I only want to be reminded if I actually have to make backups today.
Re: [O] The problem with `flet' in Org-mode and (future) Emacs 24.2
Eric Schulte writes: This attached alternate patch introduces two new compatibility macros named `org-flet' and `org-labels' in org-macs.el. These macros are aliased to the appropriate cl macro depending on the version of Emacs in use. Wouldn't you want to use defmacro instead of defalias? Also, I'd think that these two macros should go into org-compat.el instead of org-macs.el. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] new exporter
[re-sent due to no-show on the list... sorry if you get it twice] Nicolas Goaziou writes: Nevermind: I fixed them. I think all tests should pass now, in both emacs 24 and emacs 23. Yes! If you confirm this, I will move org-element.el into core. Go ahead... and let us all celebrate that moment. REgards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] agenda: why are tags enclosed with two :?
The empty tag '::' means that your TODO 12345 has no tags. The :habit: tag was inherited from a parent heading. .j. On Wed, Jul 18, 2012 at 02:25:54PM -0400, mrigetitd...@safe-mail.net wrote: This is an except of my agenda: 14 days-agenda (W29-W31): Wednesday 18 July 2012 TODO 12345 * ! :habit:: Why is the tag enclosed with two :?
[O] Closing org buffers after agenda
I don't use agenda as often as a lot of folks. When I do, I notice that all org files in my agenda path end up open. Sometimes this has caused issues as I've been working on a file and then after agenda I notice that there's a file.org2 buffer. I'll go to save one and it will tell me it's changed on disk and I have a hard time figuring out which one I should keep! Is there a way to close the buffers opened by agenda? Does agenda leave them open for quicker searching for the next time? Or I wondered if they need to be open buffers to it to look at the contents. Thanks, John
Re: [O] Closing org buffers after agenda
John Hendy jw.he...@gmail.com wrote: I don't use agenda as often as a lot of folks. When I do, I notice that all org files in my agenda path end up open. Sometimes this has caused issues as I've been working on a file and then after agenda I notice that there's a file.org2 buffer. I'll go to save one and it will tell me it's changed on disk and I have a hard time figuring out which one I should keep! Is there a way to close the buffers opened by agenda? Does agenda leave them open for quicker searching for the next time? Or I wondered if they need to be open buffers to it to look at the contents. 'x' in the agenda (bound to org-agenda-exit) will do that. However, I find it easier to go from the agenda to the file, rather than navigating through the file system: C-c a a move cursor to entry TAB gets me there pretty quickly. Nick
Re: [O] Closing org buffers after agenda
On Wed, Jul 18, 2012 at 2:41 PM, Nick Dokos nicholas.do...@hp.com wrote: John Hendy jw.he...@gmail.com wrote: I don't use agenda as often as a lot of folks. When I do, I notice that all org files in my agenda path end up open. Sometimes this has caused issues as I've been working on a file and then after agenda I notice that there's a file.org2 buffer. I'll go to save one and it will tell me it's changed on disk and I have a hard time figuring out which one I should keep! Is there a way to close the buffers opened by agenda? Does agenda leave them open for quicker searching for the next time? Or I wondered if they need to be open buffers to it to look at the contents. 'x' in the agenda (bound to org-agenda-exit) will do that. Doh! Thanks :) However, I find it easier to go from the agenda to the file, rather than navigating through the file system: C-c a a move cursor to entry TAB gets me there pretty quickly. As in, if you're editing files linked in the agenda, you'd rather leave them open and navigate to them from agenda? If so, that makes sense. I keep nearly everything in one projects.org file but search other files for reference material (I have an education.org for classes I've taken at work, devel.org for goal tracking/evaluation stuff, contacts.org, etc.). I use those other files quite rarely, so I really only need projects.org open for the most part. Thanks! John Nick
[O] A bit of work around org-clock-idle-time
Hello, I was trying to get org-clock-idle-time to work on my machine, but it would never kick in. Looking at the doc (http://orgmode.org/manual/Resolving-idle-time.html), I was left under the impression that x11idle was an option for a better experience, but emacs idle time would be used otherwise. After digging around a bit, I found out it was not the case. If you are using X, emacs WILL use x11idle, wether you have it or not, and in the latter case always get an idle time of 0. From that, I have two patches to submit (next 2 emails): I made a few modifications to x11idle itself. It seemed it could crash in many ways, one that was noted in comments but somehow not averted by the addition of a if. I added a few more checks, and made it return more meaningful error codes (more on that later). Since org-mode doesn't depend on x11idle being installed on the machine (at least not on debian), I thought it could be interesting to add a few checks. First of all, I make sure that the command exists (I used this post to do it the most generic way, http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script), and then, that the command can execute properly (can connect to the display, there is enough memory for the info struct and the reporting of idle time is supported). I'm not sure this is the best implementation (how often does this get called? If it's often, it might be worth caching the results rather than invoking two shell commands every time), but that's as good as I could do with my knowledge of lisp (none, as of before looking into this). Hopefully, all this will respect what I read here: http://orgmode.org/worg/org-contribute.html. Thanks, -- Nicolas Calderon
[O] Patch for x11idle
From c4856a35a2118efb16d6b8eb674ff9e05fc7f65a Mon Sep 17 00:00:00 2001 From: Nicolas Calderon Asselin nicolas.calderon.asse...@gmail.com Date: Wed, 18 Jul 2012 14:19:10 -0400 Subject: [PATCH 1/2] Made x11idle more robust * UTILITIES/x11idle.c (org-clock-idle-time): Added multiple checks to functions return values to prevent segfault. Also fixed return codes to fail unless the value could be printed, in which case the program succeeds. TINYCHANGE --- UTILITIES/x11idle.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/UTILITIES/x11idle.c b/UTILITIES/x11idle.c index 33d0035..8d54468 100644 --- a/UTILITIES/x11idle.c +++ b/UTILITIES/x11idle.c @@ -8,14 +8,25 @@ * path */ main() { +Status querry = 0; XScreenSaverInfo *info = XScreenSaverAllocInfo(); +//open the display specified by the DISPLAY environment variable Display *display = XOpenDisplay(0); -//check that X11 is running or else you get a segafult/coredump -if (display != NULL) { - XScreenSaverQueryInfo(display, DefaultRootWindow(display), info); +//display could be null if there is no X server running +if (info == NULL || display == NULL) { +return -1; } -XScreenSaverQueryInfo(display, DefaultRootWindow(display), info); + +//X11 is running, retrieve and print idle time + querry = XScreenSaverQueryInfo(display, DefaultRootWindow(display), info); + +if (querry == 0) { +return -1; +} + +//idle time was retrieved successfully, print it printf(%u\n, info-idle); return 0; } + -- 1.7.10.4
[O] Patch for org-clock.el
From c8979b360749ecd66e298fdbdbc2450668be3a20 Mon Sep 17 00:00:00 2001 From: Nicolas Calderon Asselin nicolas.calderon.asse...@gmail.com Date: Wed, 18 Jul 2012 14:58:31 -0400 Subject: [PATCH 2/2] Added checks to determine which idle time to use * lisp/org-clock.el (org-clock-idle-time): Org-mode assumed that x11idle was an available command, and returned an idle time of 0 if it was not (never idle). Added checks so that org-idle-time will come from emacs' own current-idle-time if x11idle cannot be found or if it cannot retrieve the idle time from X11 TINYCHANGE --- lisp/org-clock.el |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 162ee07..a913014 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1010,7 +1010,12 @@ This routine returns a floating point number. (cond ((eq system-type 'darwin) (org-mac-idle-seconds)) - ((eq window-system 'x) + ((and + (eq window-system 'x) + ;; Check that x11idle exists + (eq (call-process-shell-command command nil nil nil -v x11idle) 0) + ;; Check that x11idle can retrieve the idle time + (eq (call-process-shell-command x11idle nil nil nil ) 0)) (org-x11-idle-seconds)) (t (org-emacs-idle-seconds -- 1.7.10.4
Re: [O] Embed Interactive Charts from R/Google Visualization API into Web Page Generated with Emacs-Org-Babel Mode
Aloha Feiming Chen, Thanks for the pointer to googleVis. All the best, Tom Feiming Chen feimingc...@yahoo.com writes: Hi, I would like to submit a simple example of embedding interactive charts in emacs-org-babel mode. I am very excited after discovering these tools. See the attached .org and .html file. Thanks! Sincerely, Feiming Chen style type=text/css!-- DIV {margin:0px;} --/styleHi, I would like to submit a simple example of embedding interactive charts in emacs-org-babel mode. I am very excited after discovering these tools. See the attached .org and .html file. Thanks! Sincerely, Feiming Chen -- Thomas S. Dye http://www.tsdye.com
Re: [O] A bit of work around org-clock-idle-time
Nicolas Calderon nicolas.calderon.asse...@gmail.com wrote: Hello, I was trying to get org-clock-idle-time to work on my machine, but it would never kick in. Looking at the doc (http://orgmode.org/manual/Resolving-idle-time.html), I was left under the impression that x11idle was an option for a better experience, but emacs idle time would be used otherwise. After digging around a bit, I found out it was not the case. If you are using X, emacs WILL use x11idle, wether you have it or not, and in the latter case always get an idle time of 0. From that, I have two patches to submit (next 2 emails): I made a few modifications to x11idle itself. It seemed it could crash in many ways, one that was noted in comments but somehow not averted by the addition of a if. I added a few more checks, and made it return more meaningful error codes (more on that later). Since org-mode doesn't depend on x11idle being installed on the machine (at least not on debian), I thought it could be interesting to add a few checks. First of all, I make sure that the command exists (I used this post to do it the most generic way, http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script), and then, that the command can execute properly (can connect to the display, there is enough memory for the info struct and the reporting of idle time is supported). I'm not sure this is the best implementation (how often does this get called? If it's often, it might be worth caching the results rather than invoking two shell commands every time), but that's as good as I could do with my knowledge of lisp (none, as of before looking into this). Hopefully, all this will respect what I read here: http://orgmode.org/worg/org-contribute.html. Fixing these problems is a good idea, but I have some comments on your fixes: o The x11idle.c fixes have whitespace problems, there is an unnecessary (badly named *and* misspelled) variable introduced[fn:1] and, at least on my (64-bit) platform the %u format causes the compiler to complain: it needs to be %lu in my case. This last is of course an original problem, not a problem that you introduced, but if you are going to fix things, maybe it should be fixed as well, but I'm not sure whether %lu is OK on a 32-bit system - can somebody check? o in org-clock.el, instead of checking whether x11idle exists or not, how about something like this: ... (eq window-system 'x) (max (org-x11-idle-seconds) (org-emacs-idle-seconds)) ... This is no worse than it is today as far as efficiency goes, but in any case, it's not so much the inefficiency of calling out to the shell that I object to, it's more the unnecessary complications added to the code. Also, it is easy to memoize org-x11-idle-seconds so that it doesn't call out to the shell every time, if that seems desirable, but that can be deferred for later. Thanks for finding and fixing the problems: I wouldn't have looked if you hadn't pointed the way! Hope the comments are useful. Nick Footnotes: [fn:1] I'm talking about querry - you can leave it out altogether: ... //X11 is running, try to retrieve info if (XScreenSaverQueryInfo(display, DefaultRootWindow(display), info) == 0) { return -1; } //info was retrieved successfully, print idle time printf(%lu\n, info-idle); ... will do just as well.
[O] changing all timestamps in a document by a certain value?
Hi, I'm revising my course syllabi for next Fall and therefore need to update all the timestamps. In this case, I need to add 361 days to every stamp. Is there a function somewhere that can read a timestamp, convert it to a numerical value, change the value, and then record the new value in the right format? It would make my life easier if I could at least define a macro to do this. Thanks guys! Matt
Re: [O] changing all timestamps in a document by a certain value?
Matt Price mopto...@gmail.com wrote: I'm revising my course syllabi for next Fall and therefore need to update all the timestamps. In this case, I need to add 361 days to every stamp. Is there a function somewhere that can read a timestamp, convert it to a numerical value, change the value, and then record the new value in the right format? It would make my life easier if I could at least define a macro to do this. You might be able to do more precise surgery with org-element (just guessing here: I haven't done anything with org-element yet), but if you can search for the timestamps simply, you might be able to get away with just a keyboard macro, e.g. if all timestamps are of the form -MM-DD ... and *nothing else* looks like that, then a keyboard macro that does something like the following: search for 201 advance a few chars to get to the DD part ESC 361 S-up might be all that you need. Then you repeat (once) with C-x e or (many times) with C-u 1000 C-x e. But it really depends on identifying a search string that will not lead you astray. Also make sure you save a backup of your file before you start - you may have to do this a couple of times before you get it right. Assuming that the simple search above is sufficient, doing C-x ( C-s 2 0 1 RET 6*C-f ESC 3 6 1 S-up C-x ) to define the macro should be enough. kmacro-edit-macro then shows me this: --8---cut here---start-8--- ;; Keyboard Macro Editor. Press C-c C-c to finish; press C-x k RET to cancel. ;; Original keys: C-s 2 0 1 RET 6*C-f ESC 3 6 1 S-up Command: last-kbd-macro Key: none Macro: C-s ;; isearch-forward ;; self-insert-command 2 ;; self-insert-command 0 ;; self-insert-command 1 ;; self-insert-command RET ;; org-return 6*C-f ;; forward-char ESC 3 ;; self-insert-command 6 ;; self-insert-command 1 ;; self-insert-command S-up ;; org-shiftup --8---cut here---end---8--- HTH, Nick
Re: [O] The problem with `flet' in Org-mode and (future) Emacs 24.2
Achim Gratz strom...@nexgo.de writes: Eric Schulte writes: This attached alternate patch introduces two new compatibility macros named `org-flet' and `org-labels' in org-macs.el. These macros are aliased to the appropriate cl macro depending on the version of Emacs in use. Wouldn't you want to use defmacro instead of defalias? Why? Using `defalias' seems simpler because with `defmacro' I would have to copy the macro arguments and stub out a trivial macro body. Also, this way the version check only happens once (at load time), rather than every time the macro is called. Also, I'd think that these two macros should go into org-compat.el instead of org-macs.el. Agreed, I forgot about org-compat. The alternate patch below moves these definitions from org-macs.el to org-compat.el. Thanks, From bdc1181b1860cf423f58fde19a9bf831c0f8dd9f Mon Sep 17 00:00:00 2001 From: Eric Schulte eric.schu...@gmx.com Date: Wed, 18 Jul 2012 22:11:36 -0600 Subject: [PATCH] replace flet/labels with org-flet/org-labels This patch ensure Org-mode will build on all supported versions of Emacs, after the renaming of the cl macros behind the cl- prefix in the recent Emacs trunk. * lisp/org-compat.el (org-emacs-full-version): For checking versions smaller than the minor version. (org-flet): Compatibility function now that flet has been removed from cl-macs. (org-labels): Compatibility function now that labels has been removed from cl-macs. * lisp/ob-R.el (org-compat): Require org-compat. * lisp/ob-comint.el: Require org-compat. * lisp/ob-exp.el (org-babel-exp-do-export): Switch to compatibility function. * lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Switch to compatibility function. * lisp/ob-lob.el (org-babel-lob-get-info): Switch to compatibility function. (org-babel-lob-execute): Switch to compatibility function. * lisp/ob-python.el (org-babel-python-evaluate-session): Switch to compatibility function. * lisp/ob-ref.el (org-babel-ref-index-list): Switch to compatibility function. * lisp/ob-sh.el (org-babel-sh-var-to-string): Switch to compatibility function. * lisp/ob-tangle.el (org-babel-load-file): Switch to compatibility function. (org-babel-tangle): Switch to compatibility function. (org-babel-spec-to-string): Switch to compatibility function. * lisp/ob.el (org-babel-view-src-block-info): Switch to compatibility function. (org-babel-execute-src-block): Switch to compatibility function. (org-babel-edit-distance): Switch to compatibility function. (org-babel-switch-to-session-with-code): Switch to compatibility function. (org-babel-sha1-hash): Switch to compatibility function. (org-babel-balanced-split): Switch to compatibility function. (org-babel-join-splits-near-ch): Switch to compatibility function. (org-babel-get-rownames): Switch to compatibility function. (org-babel-format-result): Switch to compatibility function. (org-babel-insert-result): Switch to compatibility function. (org-babel-examplize-region): Switch to compatibility function. (org-babel-merge-params): Switch to compatibility function. (org-babel-noweb-p): Switch to compatibility function. (org-babel-expand-noweb-references): Switch to compatibility function. * lisp/org-bibtex.el (org-bibtex-headline): Switch to compatibility function. (org-bibtex-fleshout): Switch to compatibility function. (org-bibtex-read): Switch to compatibility function. (org-bibtex-write): Switch to compatibility function. * lisp/org-exp-blocks.el (org-export-blocks-preprocess): Switch to compatibility function. * lisp/org-exp.el (org-export-format-source-code-or-example): Switch to compatibility function. * lisp/org-macs.el (org-called-interactively-p): Indentation fix. * lisp/org-mouse.el (org-mouse-timestamp-today): Switch to compatibility function. (org-mouse-set-priority): Switch to compatibility function. (org-mouse-popup-global-menu): Switch to compatibility function. (org-mouse-context-menu): Switch to compatibility function. * lisp/org-odt.el (org-odt-do-image-size): Switch to compatibility function. * lisp/org-plot.el (org-plot/gnuplot-to-grid-data): Switch to compatibility function. (org-plot/gnuplot-script): Switch to compatibility function. * lisp/org.el (org-entry-get): Switch to compatibility function. (org-fill-paragraph): Switch to compatibility function. (org-auto-fill-function): Switch to compatibility function. --- lisp/ob-awk.el | 3 ++- lisp/ob-comint.el | 3 ++- lisp/ob-exp.el | 2 +- lisp/ob-gnuplot.el | 2 +- lisp/ob-lob.el | 4 ++-- lisp/ob-python.el | 2 +- lisp/ob-ref.el | 2 +- lisp/ob-sh.el | 2 +- lisp/ob-tangle.el | 6 +++--- lisp/ob.el | 30 +++--- lisp/org-bibtex.el | 8 lisp/org-compat.el | 21 + lisp/org-exp-blocks.el | 2 +- lisp/org-exp.el| 2 +- lisp/org-macs.el | 3 ++-