Re: org-clock idle time in pgtk Emacs
Ihor Radchenko writes: >> +(defcustom org-clock-pgtkidle-program-name >> + (if (executable-find "jc-idle-time") >> + "jc-idle-time") >> + "Name of the program which prints idle time in milliseconds. > > May I know where "jc-idle-time" is coming from? Is it a built-in command > on wayland? Sorry, I forgot to mention. It's a custom python program, working both in X11 and wayland. I didn't find a built-in command. --8<---cut here---start->8--- #!/usr/bin/env python3 from idle_time import IdleMonitor monitor = IdleMonitor.get_monitor() print(f"{1000*monitor.get_idle_time():.0f}") --8<---cut here---end--->8--- -- Julien Cubizolles
Re: org-clock idle time in pgtk Emacs
Ihor Radchenko writes: > > As Tim pointed out, we cannot guarantee that things working on 'x build > will also work on 'pgtk. Instead of abusing settings for 'x window > system, can you please introduce a new function org-pgtk-idle-seconds > using a new variable org-clock-pgtkidle-program-name, similar to > org-x11-idle-seconds, and then update org-user-idle-seconds? Sorry for the delay, here is a patch to that effect. diff --git a/lisp/org-clock.el b/lisp/org-clock.el index ceb1fc833..81be37448 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -453,6 +453,15 @@ https://orgmode.org/worg/code/scripts/x11idle.c"; :package-version '(Org . "9.7") :type 'string) +(defcustom org-clock-pgtkidle-program-name + (if (executable-find "jc-idle-time") + "jc-idle-time") + "Name of the program which prints idle time in milliseconds. +Case of a pgtk Emacs instance." + :group 'org-clock + :package-version '(Org . "9.7") + :type 'string) + (defcustom org-clock-goto-before-context 2 "Number of lines of context to display before currently clocked-in entry. This applies when using `org-clock-goto'." @@ -1199,6 +1208,17 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling "Return the current Mac idle time in seconds." (string-to-number (shell-command-to-string "ioreg -c IOHIDSystem | perl -ane 'if (/Idle/) {$idle=(pop @F)/10; print $idle; last}'"))) +(defvar org-pgtkidle-exists-p + ;; Check that org-clock-pgtkidle-program-name exists. But don't do that on DOS/Windows, + ;; since the command definitely does NOT exist there, and invoking + ;; COMMAND.COM on MS-Windows is a bad idea -- it hangs. + (and (null (memq system-type '(windows-nt ms-dos))) + (eq 0 (call-process-shell-command + (format "command -v %s" org-clock-pgtkidle-program-name))) + ;; Check that x11idle can retrieve the idle time + ;; FIXME: Why "..-shell-command" rather than just `call-process'? + (eq 0 (call-process-shell-command org-clock-pgtkidle-program-name + (defvar org-x11idle-exists-p ;; Check that x11idle exists. But don't do that on DOS/Windows, ;; since the command definitely does NOT exist there, and invoking @@ -1214,6 +1234,10 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling "Return the current X11 idle time in seconds." (/ (string-to-number (shell-command-to-string org-clock-x11idle-program-name)) 1000)) +(defun org-pgtk-idle-seconds () + "Return the current X11 idle time in seconds." + (/ (string-to-number (shell-command-to-string org-clock-pgtkidle-program-name)) 1000)) + (defun org-user-idle-seconds () "Return the number of seconds the user has been idle for. This routine returns a floating point number." @@ -1222,6 +1246,8 @@ This routine returns a floating point number." (org-mac-idle-seconds)) ((and (eq window-system 'x) org-x11idle-exists-p) (org-x11-idle-seconds)) + ((and (eq window-system 'pgtk) org-pgtkidle-exists-p) +(org-pgtk-idle-seconds)) (t (org-emacs-idle-seconds > Please, make sure that the pgtk option works on Wayland as well (or not, > but we will then need to wait until someone tests the patch on Wayland). It's working in Wayland, with a pgtk build. -- Julien Cubizolles
Re: org-x11idle-exists-p with emacs --daemon
Ihor Radchenko writes: > Does the attached patch work for you? Yes it does, thanks. Also, org-user-idle-seconds uses (eq window-system 'x) which according to its docstring should be replaced by (display-graphic-p). I've tested the change and it's working, with the added advantage that it works both in a X11 and in a wayland session (provided your org-clock-x11idle-program-name works in both, mine does). There is another use of window-sytem in the org-mode source, namely in org-get-x-clipboard in org-compat.el, but I don't know if it's safe to make the switch there. -- Julien Cubizolles
org-x11idle-exists-p with emacs --daemon
All the org-*-idle-seconds func test at some point for org-x11idle-exists-p which is defvar-ed at load time. For me, org-x11idle-exists-p is always nil at startup, but is set to true if I eval it later on. I guess it's because I'm starting Emacs in daemon mode, (as a systemd user service actually), and org-x11idle-exists-p relies on (eq window-system 'x) which is somehow not set in the terminal when the daemon. For the time being, it manually set org-x11idle-exists-p to true but shouldn't all this tests on (eq-window-system) be run each time a new frame is created ? -- Julien Cubizolles
Font-locking lost when using some local variables
With the latest git version of org, all face specifications are lost in the following org file after the dialog asking about the unsafe buffer-auto-save-file-name local variable is answered. Previous versions of org handled it without any problem. --8<---cut here---start->8--- # -*- buffer-auto-save-file-name: nil -*- * Test ** Hello --8<---cut here---end--->8--- -- Julien Cubizolles
org-clock idle time in pgtk Emacs
org-clock checks for the 'x window-system in order to use the program set up by org-clock-x11idle-program-name. Recent Emacs versions use the 'pgtk instead of 'x and as such will default to using org-emacs-idle-seconds in org-user-idle-seconds. The following patch provides a crude workaround. I'm using a python program (included below) to report idletime in wayland, using the idle-time module. It can be used for org-clock-x11idle-program-name. --8<---cut here---start->8--- modified lisp/org-clock.el @@ -1196,7 +1196,7 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling (defvar org-x11idle-exists-p ;; Check that x11idle exists - (and (eq window-system 'x) + (and (or (eq window-system 'pgtk) (eq window-system 'x)) (eq 0 (call-process-shell-command (format "command -v %s" org-clock-x11idle-program-name))) ;; Check that x11idle can retrieve the idle time @@ -1213,7 +1213,7 @@ This routine returns a floating point number." (cond ((eq system-type 'darwin) (org-mac-idle-seconds)) - ((and (eq window-system 'x) org-x11idle-exists-p) + ((and (or (eq window-system 'x) (eq window-system 'pgtk)) org-x11idle-exists-p) (org-x11-idle-seconds)) (t (org-emacs-idle-seconds --8<---cut here---end--->8--- --8<---cut here---start->8--- #!/usr/bin/env python3 from idle_time import IdleMonitor monitor = IdleMonitor.get_monitor() print(f"{1000*monitor.get_idle_time():.0f}") --8<---cut here---end--->8--- -- Julien Cubizolles
run org-clock-load after org-revert-all-org-buffers ?
org-revert-all-org-buffers is useful when synchronizing org data between different systems. In that case, one has to also synchronize clocking data. It would make sense to also run org-clock-load after org-revert-all-org-buffers. I didn't find an appropriate hook, is there a better way than advising org-revert-all-org-buffers? -- Julien Cubizolles
Re: reevaluating org-x11idle-exists-p with new org-clock-x11idle-program-name
Julien Cubizolles writes: > Tim Cross writes: > >> Julien Cubizolles writes: >> >>> I'm using a custom python program to display x11 idle time. I've set >>> org-clock-x11idle-program-name accordingly but org-x11idle-exists-p is >>> still nil. I'm guessing it's defvar'ed in org-clock.el before >>> org-clock-x11idle-program-name is set. Evaluating the defvar of >>> org-x11idle-exists-p afterwards indeed sets it to t. >>> >>> I could do (setq org-x11idle-exists-p t) but there must be a better way >>> to handle the definition of a new org-clock-x11idle-program-name. >> >> How are you setting org-clock-x11idle-program-name? In your init file or >> via custom? > > Setting it via custom works thanks. Somehow org was loaded by some > dependency before I explicitly used (require 'org). I guess I could also > use some use-package configuration. Actually it doesn't… Even with org-clock-x11idle-program-name set via custom, org-x11idle-exists-p is still nil at startup. And custom-set-variables is set at the very beginning of my init file. I'll file an issue. -- Julien Cubizolles
Re: reevaluating org-x11idle-exists-p with new org-clock-x11idle-program-name
Tim Cross writes: > Julien Cubizolles writes: > >> I'm using a custom python program to display x11 idle time. I've set >> org-clock-x11idle-program-name accordingly but org-x11idle-exists-p is >> still nil. I'm guessing it's defvar'ed in org-clock.el before >> org-clock-x11idle-program-name is set. Evaluating the defvar of >> org-x11idle-exists-p afterwards indeed sets it to t. >> >> I could do (setq org-x11idle-exists-p t) but there must be a better way >> to handle the definition of a new org-clock-x11idle-program-name. > > How are you setting org-clock-x11idle-program-name? In your init file or > via custom? Setting it via custom works thanks. Somehow org was loaded by some dependency before I explicitly used (require 'org). I guess I could also use some use-package configuration. -- Julien Cubizolles
reevaluating org-x11idle-exists-p with new org-clock-x11idle-program-name
I'm using a custom python program to display x11 idle time. I've set org-clock-x11idle-program-name accordingly but org-x11idle-exists-p is still nil. I'm guessing it's defvar'ed in org-clock.el before org-clock-x11idle-program-name is set. Evaluating the defvar of org-x11idle-exists-p afterwards indeed sets it to t. I could do (setq org-x11idle-exists-p t) but there must be a better way to handle the definition of a new org-clock-x11idle-program-name. -- Julien Cubizolles
Remove old clock entries
I'm clocking the time spent on daily tasks like email and for that I have a "Daily Routine" TODO entry. Clocking in this task adds a new clock line everyday, leading to a very populated CLOCK drawer. I'd like to limit its size by either a maximum number of clock entries by removing the older ones or better, removing the entries older than some date. Is there some variable to that effect ? -- Julien Cubizolles
removal of org-maybe-keyword-time-regexp
I'm using org-caldav (https://github.com/dengste/org-caldav/) to synchronize the calendar on my Android phone and Org. Recently this synchronization stopped working because org-caldav relies on org-maybe-keyword-time-regexp that has been dropped from Org. As a workaround, could this variable be reintroduced in org so as not to break this very useful package ? Julien.
Re: [O] folding columns/rows in tables
Nicolas Goaziou writes: > Hello, > > Julien Cubizolles writes: > >> I have some long tables with wide cells that are not easy to scroll >> through. It would be convenient to fold some columns or rows. Has >> someone managed it ? > > This is `C-c ' in master (for columns). That is so great ! Thanks a lot, I must have missed it in the changelogs. Regards, Julien.
[O] folding columns/rows in tables
I have some long tables with wide cells that are not easy to scroll through. It would be convenient to fold some columns or rows. Has someone managed it ? Julien.
Re: [O] #+bind options ignored during async export
Nicolas Goaziou writes: > Hello, > > Julien Cubizolles writes: > I don't think it is related. Maybe `org-export-allow-bind-keywords' is > nil in your async configuration. You're right, it was nil. When it is set, #+BIND: works as expected. Thanks. Julien.
[O] #+bind options ignored during async export
The options specified by #+ keywords are set during asynchronous export whereas those specified by the #+BIND: method aren't. In the following example, org-latex-image-default-width is set to .25\linewidth only in synchronous export whereas the author is set regardless of the type of export. --8<---cut here---start->8--- #+AUTHOR: myself #+BIND: org-latex-image-default-width ".25\\linewidth" * 1st heading [[file:some_picture.png]] --8<---cut here---end--->8--- I think both the #+KEYWORD: and #+BIND: should have the same behaviour whereas one is using async export or not. Julien.
Re: [O] org-latex-image-default-width ignored
Eric S Fraga writes: > On Sunday, 25 Mar 2018 at 09:52, Julien Cubizolles wrote: >> Found the cause of the problem, my default configuration exports in >> async mode, so this variable should be set in >> org-export-async-init.el. >> >> Is there a way to have a variable set during export to avoid setting it >> for all exports? > > I've never used the async export so I am not sure but maybe check out > the #+bind: directive? I tried --8<---cut here---start->8--- #+BIND: org-latex-image-default-width ".3\\linewidth" --8<---cut here---end--->8--- with no success in async mode, but it works in synchronous mode. I guess I'll avoid async mode for now on, or use a set of different org-export-async-init.el files for different files. Nevertheless I think it would make sense to have a way to set some variables during async export. According to the Org Manual: --8<---cut here---start->8--- Emacs variables can become buffer-local during export by using the BIND keyword. Its syntax is ‘#+BIND: variable value’. This is particularly useful for in-buffer settings that cannot be changed using keywords. --8<---cut here---end--->8--- But the options set using #+ keywords are used during async export while those set using #+BIND are ignored. A "+BIND-ASYNC would come in handy. Julien.
Re: [O] org-latex-image-default-width ignored
Eric S Fraga writes: > On Saturday, 24 Mar 2018 at 16:20, Julien Cubizolles wrote: >> I'd like all inline images resized during beamer and latex export. I >> tried setting org-latex-image-default-width to ".3\\linewidth" but after >> export the latex file still uses the default .9\linewidth default. See >> the following examples. > > Your example works for me with up to date org from git. What version > are you using? Found the cause of the problem, my default configuration exports in async mode, so this variable should be set in org-export-async-init.el. Is there a way to have a variable set during export to avoid setting it for all exports? Julien.
[O] org-latex-image-default-width ignored
I'd like all inline images resized during beamer and latex export. I tried setting org-latex-image-default-width to ".3\\linewidth" but after export the latex file still uses the default .9\linewidth default. See the following examples. Julien. orgmode file: --8<---cut here---start->8--- #+begin_src emacs-lisp :exports none (setq org-latex-image-default-width ".3\\linewidth") #+end_src #+RESULTS: : .3\linewidth * hello [[file:file:/home/wilk/enseignement/schemas/plickers/mvmt-circ-F-faux.png]] --8<---cut here---end--->8--- gets exported to: --8<---cut here---start->8--- % Created 2018-03-24 sam. 16:06 % Intended LaTeX compiler: pdflatex \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{grffile} \usepackage{longtable} \usepackage{wrapfig} \usepackage{rotating} \usepackage[normalem]{ulem} \usepackage{amsmath} \usepackage{textcomp} \usepackage{amssymb} \usepackage{capt-of} \usepackage{hyperref} \author{Julien Cubizolles} \date{\today} \title{} \hypersetup{ pdfauthor={Julien Cubizolles}, pdftitle={}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 27.0.50 (Org mode 9.1.7)}, pdflang={English}} \begin{document} \tableofcontents \section{hello} \label{sec:org55b} \begin{center} \includegraphics[width=.9\linewidth]{file:/home/wilk/enseignement/schemas/plickers/mvmt-circ-F-faux.png} \end{center} \end{document}--8<---cut here---end--->8---
Re: [O] Different kinds of enumerate in the same latex export
Eric S Fraga writes: > On Tuesday, 5 Sep 2017 at 11:41, Julien Cubizolles wrote: >> Does orgmode allow to pass some properties to a list that could be used >> to alter its format ? > > Try maybe: > > #+attr_latex: :environment plickers > 1. first > 2. second > > Works for me with the etaremune environment (reverse ordered numbering). It does, thanks. However my plickers environment depends on enumitem that doesn't play nice with beamer. It turns out that --8<---cut here---start->8--- #+attr_latex: :options [a)] 1. first 2. second --8<---cut here---end--->8--- works as well, without the need to define a new enumerate-like environment. Julien.
[O] Different kinds of enumerate in the same latex export
I have to use two different enumerate items in the same document, one numbered (the default enumerate) and the other one ordered alphabetically (which I will now call "plickers"). In my LaTeX class, I've defined the "plickers" environment --8<---cut here---start->8--- \RequirePackage{enumitem} \newlist{plickers}{enumerate}{2} \setlist[plickers]{label=\alph*.} --8<---cut here---end--->8--- But I don't know how to have org-mode use one or the other to export an ordered list. With: --8<---cut here---start->8--- (setq org-beamer-environments-extra '( ("Plickers" "P" "\\begin{plickers}%a%U" "\\end{plickers}"))) --8<---cut here---end--->8--- The following obviously creates a enumerate environment nested within a plickers one, not what's intended. --8<---cut here---start->8--- essai:B_Plickers: :PROPERTIES: :BEAMER_env: Plickers :END: 1. 1st item 2. 2nd item --8<---cut here---end--->8--- Does orgmode allow to pass some properties to a list that could be used to alter its format ? Julien.
Re: [O] tags-todo error with #+FILETAGS: inheritance
Just correcting an error in the title to something more relevant. > When an entry inherits a tag from a #+FILETAGS: line, all its parents > get matched by a tags-todo agenda, even when they don't have a todo > keyword. > > Consider the following: > > --8<---cut here---start->8--- > (setq org-agenda-files '("/home/wilk/tmp/test-org/test-todo.org")) > (setq org-agenda-custom-commands > (quote ( > ("wt" "Boulot" > ( > (tags-todo "enseignement") > ) > ) > ))) > (org-agenda) > --8<---cut here---end--->8--- > > > with the following test-todo.org : > > --8<---cut here---start->8--- > #+FILETAGS: enseignement > * Contenu > ** TODO Cours électrocinétique > --8<---cut here---end--->8--- > > The agenda called by "org-agenda w t" displays the "Cours > électrocinétique" (as it should) but also the "Contenu" even though it > doesn't have a TODO keyword. > > The offending commit is: > > commit 942b6267a09e167ad3a546e83205601aa5c0704e > Author: Nicolas Goaziou > Date: Tue Apr 18 11:55:27 2017 +0200 > org-agenda: `tags-todo' command type includes DONE keywords > > Julien.
[O] tags-todo error with #+FILETAGS: enseignement
When an entry inherits a tag from a #+FILETAGS: line, all its parents get matched by a tags-todo agenda, even when they don't have a todo keyword. Consider the following: --8<---cut here---start->8--- (setq org-agenda-files '("/home/wilk/tmp/test-org/test-todo.org")) (setq org-agenda-custom-commands (quote ( ("wt" "Boulot" ( (tags-todo "enseignement") ) ) ))) (org-agenda) --8<---cut here---end--->8--- with the following test-todo.org : --8<---cut here---start->8--- #+FILETAGS: enseignement * Contenu ** TODO Cours électrocinétique --8<---cut here---end--->8--- The agenda called by "org-agenda w t" displays the "Cours électrocinétique" (as it should) but also the "Contenu" even though it doesn't have a TODO keyword. The offending commit is: commit 942b6267a09e167ad3a546e83205601aa5c0704e Author: Nicolas Goaziou Date: Tue Apr 18 11:55:27 2017 +0200 org-agenda: `tags-todo' command type includes DONE keywords Julien.
Re: [O] Can't remove deadline or schedule in bulk mode
Kyle Meyer writes: > Julien Cubizolles writes: > >> Julien Cubizolles writes: >> >>> Kyle Meyer writes: >>> >>> >>>> Since you have the git repo set up and have a good/bad range, you can use >>>> git bisect to find the offending commit. >> >> I finally found the offending commit, >> >> it's commit 4f578a3f7fe193229adc239c93d6983bcc030d41 org-agenda: Small >> refactoring by N. Goaziou. > > Yep, that's the same commit that I pointed to in the later part of the > message you quote, but my guess about what the problematic bits were was > wrong. Anyway, should be fixed with b900a85fe. It is, thanks.
Re: [O] Can't remove deadline or schedule in bulk mode
Julien Cubizolles writes: > Kyle Meyer writes: > > >> Since you have the git repo set up and have a good/bad range, you can use >> git bisect to find the offending commit. I finally found the offending commit, it's commit 4f578a3f7fe193229adc239c93d6983bcc030d41 org-agenda: Small refactoring by N. Goaziou. Julien.
Re: [O] Can't remove deadline or schedule in bulk mode
Kyle Meyer writes: > Since you have the git repo set up and have a good/bad range, you can use > git bisect to find the offending commit. I'm having trouble using setting it up. To go back to a previous state using magit, I'm * choosing a commit in the log view of magit-status * magit-checkout or magit-reset --soft to this commit * rebuild org-mode with make clean && make update --8<---cut here---start->8--- (add-to-list 'load-path "~/git-repositories/org-mode/lisp") (add-to-list 'load-path "~/git-repositories/org-mode/contrib/lisp") (org-reload) --8<---cut here---end--->8--- Somehow I'm missing something since even when going back to 8.xx versions of org-mode, the problem remains although the stock version (Org mode version 9.0.9 (release_9.0.9 @ /usr/share/emacs/26.0.50/lisp/org/)) doesn't exhibit it. What is the right way to load the org-mode from the git repo instead of the one already installed on the system ? Julien.
Re: [O] remove TODO state in agenda view
Adam Porter writes: > Julien Cubizolles writes: > >> Got it: the problem occurs when trying to clear the TODO state of >> several entries through a bulk action: >> >> * mark several entries >> >> * "B t" doesn't offer to clear the TODO state with space like "t" does >> on a single entry. > > Yes, I guess that's because it uses completing-read to complete the > tags, instead of using the single-key tag selection. At least, that's > how it works for me. That's also what it does. It's only a minor annoyance I just noticed because I'm in the process of cleaning long overdue tasks, but it would be nice if B t could use the same dialog. Julien.
Re: [O] Can't remove deadline or schedule in bulk mode
Adam Porter writes: > Julien Cubizolles writes: > >> In an agenda buffer, C-u B d should clear the deadline of the entries >> marked the way C-u does on a single entry. I think it's what it used to >> do some time ago. Instead, I get: >> >> org-agenda-deadline: Invalid function: 4 > > FWIW, works for me on Org 9.0.5. Indeed, works for me on Org mode version 9.0.9 (release_9.0.9 @ /usr/share/emacs/26.0.50/lisp/org/) but not on Org mode version 9.0.9 (release_9.0.9-738-g8ab9a8 @ /home/wilk/git-repositories/org-mode/lisp/) Julien.
Re: [O] remove TODO state in agenda view
Julien Cubizolles writes: > Adam Porter writes: > >> Julien Cubizolles writes: >> >>> Choosing "space" when changing the TODO state of an entry with C-c C-t >>> in an org buffer clears the TODO state. However it doesn't work in the >>> agenda view. >> >> Hi Julien, >> >> Just tried it, and it works for me. What version of Org are you using? > > It's working for me too now. Don't know what I was doing wrong, sorry. Got it: the problem occurs when trying to clear the TODO state of several entries through a bulk action: * mark several entries * "B t" doesn't offer to clear the TODO state with space like "t" does on a single entry. Julien.
[O] Can't remove deadline or schedule in bulk mode
In an agenda buffer, C-u B d should clear the deadline of the entries marked the way C-u does on a single entry. I think it's what it used to do some time ago. Instead, I get: --8<---cut here---start->8--- org-agenda-deadline: Invalid function: 4 --8<---cut here---end--->8--- Julien.
Re: [O] org-agenda time grid broken ?
Nicolas Goaziou writes: > Hello, > > Julien Cubizolles writes: > >> Did I miss an important change to the way org-agenda-files is to be >> used ? > > It is probably related to the change in `org-agenda-time-grid'. See new > docstring. I've looked into it but the example I provided is run from emacs -Q and no change to the default value of org-agenda-time-grid, set to ((daily today require-timed) (800 1000 1200 1400 1600 1800 2000) ".." "") Also, I noticed two other things: * when I'm using org from the git repo, a call to org-agenda throws this error: --8<---cut here---start->8--- org-agenda-format-item: Symbol’s function definition is void: org-duration-to-minutes --8<---cut here---end--->8--- * I'm using --8<---cut here---start->8--- (add-to-list 'load-path "~/git-repositories/org-mode/lisp") (add-to-list 'load-path "~/git-repositories/org-mode/contrib/lisp") --8<---cut here---end--->8--- to choose the git version of org-mode. If I run org-reload immediately afterwards (which I didn't use to do up to now), the error disappears, at least with the minimalist example from my previous post. Julien.
[O] org-agenda time grid broken ?
I noticed today (I hadn't used it in a long time) that the today and/or time-grid view in the agenda seems broken. With emacs -Q running Org mode version 9.0.9 (release_9.0.9 @ /usr/share/emacs/26.0.50/lisp/org/) (setq org-agenda-files '("~/tmp/test-org/todo.org")) todo.org --8<---cut here---start->8--- # -*- coding: utf-8 -*- * Beach <2017-08-05 sam. 14:00-15:00> --8<---cut here---end--->8--- org-agenda gives, as expected: --8<---cut here---start->8--- Week-agenda (W31): Monday 31 July 2017 W31 Tuesday 1 August 2017 Wednesday 2 August 2017 Thursday3 August 2017 Friday 4 August 2017 Saturday5 August 2017 8:00.. 10:00.. 12:00.. todo: 14:00-15:00 Beach 14:00.. 16:00.. 18:00.. 20:00.. 23:17.. now - - - - - - - - - - - - - - - - - - - - - - - - - Sunday 6 August 2017 --8<---cut here---end--->8--- However, with Org mode version 9.0.9 (release_9.0.9 @ /home/wilk/git-repositories/org-mode/lisp/) the info for today are missing: org-agenda gives (notice Saturday is missing) --8<---cut here---start->8--- Week-agenda (W31): Monday 31 July 2017 W31 Tuesday 1 August 2017 Wednesday 2 August 2017 Thursday3 August 2017 Friday 4 August 2017 --8<---cut here---end--->8--- and attempting to switch to the day view gives the following message --8<---cut here---start->8--- org-agenda-check-type: No Org agenda currently displayed --8<---cut here---end--->8--- Did I miss an important change to the way org-agenda-files is to be used ? Julien.
Re: [O] helm-org-agenda-files-headings and bulk actions in agenda mode
Adam Porter writes: > Julien Cubizolles writes: > >> helm-org-agenda-files-headings, used with helm-org-format-outline-path >> is very convenient for choosing entries when refiling one individual >> entry. I couldn't get it to refile *several* entries at once. > > Hi Julien, > > The helm-org-*-headings functions don't support multiple selection. > AFAIK this is mentioned in the docstrings. Indeed it's in the helm-org-heading-refile docstrings. > It would be nice to add that, but Helm is not part of Org mode, so you > should mention this on the Helm issue tracker. Will do.
Re: [O] remove TODO state in agenda view
Adam Porter writes: > Julien Cubizolles writes: > >> Choosing "space" when changing the TODO state of an entry with C-c C-t >> in an org buffer clears the TODO state. However it doesn't work in the >> agenda view. > > Hi Julien, > > Just tried it, and it works for me. What version of Org are you using? It's working for me too now. Don't know what I was doing wrong, sorry.
Re: [O] remove TODO state in agenda view
Adam Porter writes: > Julien Cubizolles writes: > >> Choosing "space" when changing the TODO state of an entry with C-c C-t >> in an org buffer clears the TODO state. However it doesn't work in the >> agenda view. > > Hi Julien, > > Just tried it, and it works for me. What version of Org are you using? It's working for me too now. Don't know what I was doing wrong, sorry.
[O] remove TODO state in agenda view
Choosing "space" when changing the TODO state of an entry with C-c C-t in an org buffer clears the TODO state. However it doesn't work in the agenda view. How can I clear the TODO state in agenda view, possibly in bulk-mode ? Julien.
[O] helm-org-agenda-files-headings and bulk actions in agenda mode
helm-org-agenda-files-headings, used with helm-org-format-outline-path is very convenient for choosing entries when refiling one individual entry. I couldn't get it to refile *several* entries at once. I tried + marking entries with C-space in helm-org-agenda-files-headings, moving to another entry then "Refile current or marked heading to selection C-c w" with no success: it only acts on one entry + marking the entries in the agenda view with m then again helm-org-agenda-files-headings, moving to another entry then "Refile current or marked heading to selection C-c w". It doesn't use the "m" marked entries + marking the entries in the agenda view with m and choosing the refile action in Bulk mode (B-r) but this doesn't use helm-org-agenda-files-headings. In my opinion, the most convenient way would be to have the "Refile current or marked heading to selection C-c w" action from helm-org-agenda-files-headings act on the "m" marked entries in the agenda mode. Julien.
Re: [O] Donating money to mobile org.
Rasmus writes: > I am not sure Mobileorg for android is still developed. According to https://github.com/matburt/mobileorg-android/commit/646cec8c82c77b02134b0fc01407859e1d31fa7d, it's not anymore.
Re: [O] org-publish-attachment doesn't follow symbolic links anymore
Nicolas Goaziou writes: > Hello, > > Julien Cubizolles writes: > >> I'm using symbolic links in a directory managed by >> org-publish-attachment. As of a few weeks ago, org-publish-attachment >> doesn't upload the files linked to to the ftp server like it used >> to. There is no error message, only: >> >> Copying filename.pdf to /ftp:login@ftpserver:/dir/...done >> >> but the file isn't uploaded. > > Fixed. Thank you. Thanks. Julien.
[O] org-publish-attachment doesn't follow symbolic links anymore
I'm using symbolic links in a directory managed by org-publish-attachment. As of a few weeks ago, org-publish-attachment doesn't upload the files linked to to the ftp server like it used to. There is no error message, only: --8<---cut here---start->8--- Copying filename.pdf to /ftp:login@ftpserver:/dir/...done --8<---cut here---end--->8--- but the file isn't uploaded. A regular file is correctly uploaded to the same ftp server by org-publish-attachment. Julien.
Re: [O] Is there a *Org PDF LaTeX Output* buffer ?
Nick Dokos writes: > No, it should be present: it is created when you export to PDF through > LaTeX (it is created by org-latex-compile which is called by > org-latex-export-to-pdf). I just tried a (successful, but I don't > think it matters) export and was able to visit it afterwards. I found it, but only when publishing a project synchronously. Actually that's not surprising since in this case it's another emacs process that's running but the message about the *Org PDF LaTeX Output* is then misleading. Here is a MWE[1]: --8<---cut here---start->8--- #+LATEX_HEADER:\RequirePackage{nosuchpackage} #+begin_src emacs-lisp :exports none (add-to-list 'load-path "~/git-repositories/org-mode/lisp") (add-to-list 'load-path "~/git-repositories/org-mode/contrib/lisp") (org-reload) (require 'ox) (require 'ox-latex) (setq org-export-in-background t) (setq org-export-async-init-file "~/tmp/test-init.el") (setq org-publish-project-alist `(("test" :base-directory "./" :publishing-directory "./" :publishing-function org-latex-publish-to-pdf :exclude ".*" :include ,(list (file-name-nondirectory buffer-file-name)) ))) #+end_src --8<---cut here---end--->8--- with ~/tmp/test-init.el: --8<---cut here---start->8--- (add-to-list 'load-path "~/git-repositories/org-mode/lisp") (add-to-list 'load-path "~/git-repositories/org-mode/contrib/lisp") (require 'org) (require 'ox) --8<---cut here---end--->8--- Julien. [1] Actually it's not really working when running emacs -Q: there are some error messages about for instance org-link-set-parameters which I can't iron out but I don't think it's relevant to the problem exhibited here.
[O] Is there a *Org PDF LaTeX Output* buffer ?
When an export from org to pdf fails, the error message refers to a *Org PDF LaTeX Output* buffer that doesn't seem to have been created on my setup. Is it an old message from a previous behaviour long gone ? Julien.
Re: [O] new syntax of completion and preparation functions for publishing
Arun Isaac writes: > In general, the preparation function having access to project-plist is a > very useful feature. Many a time, it avoids the need to get the plist > indirectly by accessing org-publish-project-alist or by some other means. I've never played with plists before, could you please provide a code sample ? Regards, Julien.
[O] new syntax of completion and preparation functions for publishing
According to ORG-NEWS: "Preparation and completion functions are now called with an argument, which is the project property list. It used to be dynamically scoped through the ~project-plist~ variable." I'd like to try to improve on my configuration of projects but I'm unsure hot to use this new feature. How do you use it ? Julien.
Re: [O] New Beamer environment selection problem
Nicolas Goaziou writes: > Hello, > > Julien Cubizolles writes: > >> I'm still experiencing this problem with the following example >> >> #+BEGIN_SRC elisp >> (add-to-list 'load-path "~/git-repositories/org-mode/lisp") >> (add-to-list 'load-path "~/git-repositories/org-mode/contrib/lisp") >> #+END_SRC >> >> #+RESULTS: >> : Successfully reloaded Org >> : Org-mode version 8.3.4 (release_8.3.4-695-gf07580 @ >> /home/wilk/git-repositories/org-mode/lisp/) > > This release is too old. You need to update Org. I was only doing byte-recompile-directory after pulling from git (from magit actually). According to the doc (that I should have read...) I should run make update. Julien.
Re: [O] New Beamer environment selection problem
Nicolas Goaziou writes: > Would the following patch solve the issue? I'm still experiencing this problem with the following example --8<---cut here---start->8--- #+BEGIN_SRC elisp (add-to-list 'load-path "~/git-repositories/org-mode/lisp") (add-to-list 'load-path "~/git-repositories/org-mode/contrib/lisp") #+END_SRC #+RESULTS: : Successfully reloaded Org : Org-mode version 8.3.4 (release_8.3.4-695-gf07580 @ /home/wilk/git-repositories/org-mode/lisp/) * Entry --8<---cut here---end--->8--- with emacs -Q evaluation the src block, reloading org-mode, org-beamer-select-environment with point on "Entry" fails with: Debugger entered--Lisp error: (wrong-number-of-arguments max 0) max() apply(max nil) org-fast-tag-selection(nil nil nil nil) org-set-tags() org-beamer-select-environment() funcall-interactively(org-beamer-select-environment) call-interactively(org-beamer-select-environment nil nil) command-execute(org-beamer-select-environment)
[O] org-ref breaks org-repair-export-blocks
Consider the following --8<---cut here---start->8--- #+BEGIN_SRC elisp (require 'package) (setq package-archives '(("ELPA" . "http://tromey.com/elpa/";) ("melpa" . "http://melpa.milkbox.net/packages/";) ("gnu" . "http://elpa.gnu.org/packages/";) ("org" . "http://orgmode.org/elpa/";) ("marmalade" . "http://marmalade-repo.org/packages/";) )) (package-initialize) (require 'org-ref) (defun org-repair-export-blocks () "Repair export blocks and INCLUDE keywords in current buffer." (interactive) (when (eq major-mode 'org-mode) (let ((case-fold-search t) (back-end-re (regexp-opt '("HTML" "ASCII" "LATEX" "ODT" "MARKDOWN" "MD" "ORG" "MAN" "BEAMER" "TEXINFO" "GROFF" "KOMA-LETTER") t))) (org-with-wide-buffer (goto-char (point-min)) (let ((block-re (concat "^[ \t]*#\\+BEGIN_" back-end-re))) (save-excursion (while (re-search-forward block-re nil t) (let ((element (save-match-data (org-element-at-point (when (eq (org-element-type element) 'special-block) (save-excursion (goto-char (org-element-property :end element)) (save-match-data (search-backward "_")) (forward-char) (insert "EXPORT") (delete-region (point) (line-end-position))) (replace-match "EXPORT \\1" nil nil nil 1)) (let ((include-re (format "^[ \t]*#\\+INCLUDE: .*?%s[ \t]*$" back-end-re))) (while (re-search-forward include-re nil t) (let ((element (save-match-data (org-element-at-point (when (and (eq (org-element-type element) 'keyword) (string= (org-element-property :key element) "INCLUDE")) (replace-match "EXPORT \\1" nil nil nil 1) #+END_SRC #+RESULTS: : org-repair-export-blocks #+BEGIN_LATEX \begin{equation*} P_{ext} = P_0 \end{equation*} #+END_LATEX --8<---cut here---end--->8--- After evaluating the elisp source block, org-repair-export-blocks doesn't repair the LATEX block. However, (require 'org-ref) is commented out, org-repair-export-blocks does its job. Julien.
Re: [O] isbn-to-bibtex (from org-ref) fails
Julien Cubizolles writes: > John Kitchin writes: > >> I found a (save-buffer) in the bibtex entry clean functions and took >> that out. I think it solves this problem. > > It's working fine now, thanks. Actually it seems to be broken again: --8<---cut here---start->8--- Debugger entered--Lisp error: (wrong-type-argument arrayp nil) isbn-to-bibtex("0062190377" "~/enseignement/papiers/bibliography.bib") funcall-interactively(isbn-to-bibtex "0062190377" "~/enseignement/papiers/bibliography.bib") call-interactively(isbn-to-bibtex record nil) command-execute(isbn-to-bibtex record) helm-M-x(nil "isbn-to-bibtex") funcall-interactively(helm-M-x nil "isbn-to-bibtex") call-interactively(helm-M-x nil nil) command-execute(helm-M-x) --8<---cut here---end--->8--- Also, the first time I call it, it doesn't even prompt for the ISBN number. When call it with point on an ISBN number, I get the ISBN prompt, with this value already filled for all subsequent calls, but with the same wrong-type-argument error. Regards, Julien.
Re: [O] org-passwords.el and encryption
Eric S Fraga writes: > On Wednesday, 27 Apr 2016 at 19:23, Julien Cubizolles wrote: >> also, running: >> >> keychain --eval --agents ssh,gpg id_rsa MYGPGKEY >> >> in a non login shell. > > The only thing I can think of is that maybe you have not installed all > the relevant packages for the agents or that the permissions on the > various directories (.ssh, .gnupg) are incorrectly set? Actually I noticed another weird behaviour: the problem disappears when I log onto the machine via ssh from another one. The keychain commands in the .bash_profile correctly activates ssh-agent and gpg-agent. I have the same setup on two machines and login into 2 via ssh from 1 works whereas login into 2 from 2 doesn't (and vice-versa). Maybe something different in the environment variables. I'll investigate. > Maybe ask on the bug system for keychain mentioned in the man page? I will. Regards, Julien.
Re: [O] org-passwords.el and encryption
Eric S Fraga writes: > On Wednesday, 27 Apr 2016 at 16:24, Julien Cubizolles wrote: >> there must be something wrong with my setup: keychain complains: >> >> * Adding 1 gpg key(s): 370D5DFF >> * Error: Problem adding (is pinentry installed?); giving up > > Which version(s) of pinentry do you have installed? I have pinentry-gnome3, pinentry-curses, pinentry-tty, and I try with all 3 of them, setup with update-alternatives. The error remains the same. > And is this error from your .profile (i.e. console login) yes (from .bash_profile actually) > or is it when you try manually? also, running: --8<---cut here---start->8--- keychain --eval --agents ssh,gpg id_rsa MYGPGKEY --8<---cut here---end--->8--- in a non login shell. Regards, Julien.
Re: [O] org-passwords.el and encryption
Eric S Fraga writes: > I have keychain in both my .bash_profile (for when I log in in console > mode or remotely) there must be something wrong with my setup: keychain complains: --8<---cut here---start->8--- * Adding 1 gpg key(s): 370D5DFF * Error: Problem adding (is pinentry installed?); giving up --8<---cut here---end--->8--- > eval $(keychain --eval --agents ssh,gpg id_rsa gpgkey ) I have the same here. I think I'll give up with keychain for now, ssh-agent and gpg-agent are automatically started when I log in, two passphrases per login are not too annoying. Thanks for your help.
Re: [O] org-passwords.el and encryption
Eric S Fraga writes: > I use gpg-agent in conjunction with keychain. Generally works very > well. I'm trying to set it up but I'm running into problems. Could you precise a few details: + do you run keychain from your ~/.profile, and so how ? If I follow the instructions at http://www.funtoo.org/Keychain, keychain can't start in the login screen of the display manager (lightdm on Ubuntu in my case) + do you use keychain to also manage ssh keys? If so does it use a graphical tool to ask for your passphrase ? + how does emacs ask for the gpg passphrase: graphical (pinentry), emacsclient or in a minibuffer ? Thanks for you help. Julien.
Re: [O] isbn-to-bibtex (from org-ref) fails
John Kitchin writes: > I found a (save-buffer) in the bibtex entry clean functions and took > that out. I think it solves this problem. It's working fine now, thanks. Regards, Julien.
Re: [O] fontification lost when using org-goto
Adam Porter writes: > Julien Cubizolles free.fr> writes: > >> I've encountered this problem with several themes (dracula, naquadah) >> but not with emacs -Q. Are there some special faces to define ? > > There are quite a few org-mode faces, like org-level-{1..8} for headings. > Do you see this behavior with all themes? For example, I use solarized, and > I've never seen this problem. > > I'm probably wrong, but I feel like it's not an issue with a theme. No you're not and I am. I investigated further and have narrowed the problem to the #+SETUPFILE keyword. The following minimal org file exhibits the problem: C-c C-j removes all fontification from the file, whatever the theme. Another keyword (invalide like #+SETUP or valid #+LATEX_HEADER:) doesn't trigger this bug. --8<---cut here---start->8--- #+SETUPFILE: setup.org * Bilan --8<---cut here---end--->8--- Julien.
[O] fontification lost when using org-goto
I'm using an emacs theme for fontification. The fontification is lost whenever I use org-goto: no more colors, no more hidden stars. When I leave the temporary buffer, the fontification is not restored until I run M-x org-mode or update the #+ lines with C-c C-c. I've encountered this problem with several themes (dracula, naquadah) but not with emacs -Q. Are there some special faces to define ? Julien.
Re: [O] isbn-to-bibtex (from org-ref) fails
John Kitchin writes: > thanks for the report. I think I have fixed it in a recent push. It now gets the bibtex entry right however its behaviour is strange: it asks twice for a file name to save. The first query seems ok but if you give again the bib file as argument the second time, you get a worrying message about overwriting it. Julien.
[O] isbn-to-bibtex (from org-ref) fails
I've just tried isbn-to-bibtex with the isbn entry "0201500647" (Feynman lectures on physics). It fails with: --8<---cut here---start->8--- funcall-interactively: Wrong type argument: stringp, [((url . ["http://www.worldcat.org/oclc/67451431?referer=xid";]) (publisher . "Addison-Wesley") (form . ["BA"]) (lccn . ["89000433"]) (lang . "eng") (city . "Reading, Mass.") (author . "Feynman, Leighton, Sands.") (ed . "8th print.") (year . "1996") (isbn . ["0201500647"]) ...)] --8<---cut here---end--->8--- However, isbn-to-bibtex-lead gets me to the right page with a bibtex entry ready to be copied. Julien.
Re: [O] org-ref, abstracts
John Kitchin writes: > no problem. I am not sure when that happened though ;) Do you mean you didn't add this functionnality recently and it's been here all along ? Julien.
Re: [O] org-ref, abstracts
John Kitchin writes: > If the data exists, then arxiv-add-bibtex-entry could probably add the > abstract if it existed. I am not too familiar with arxiv so I am not > sure. Just noticed that arxiv-get-pdf-add-bibtex-entry now includes the abstract. Thanks a lot for implementing it. Julien.
Re: [O] org-ref, abstracts
John Kitchin writes: > I am pretty sure the metadata from dx.doi.org doesn't contain any > abstract information, so there is not a way to put anything useful in > it. The abstract is often covered by copyright. I hadn't thought of that. But for some sources (arXiv comes to mind) that could be done, right ? > You can add your own abstract with bibtex-make-field (C-c C-f) in a > bibtex entry, or you can copy the bibtex entries from publisher sites > which usually do contain the abstract if you ask for it. Since the url of the paper is included in the bibtex entry, it's pretty easy to get to the journal site and copy the abstract. Julien.
Re: [O] org-ref and link to pdf file ?
Julien Cubizolles writes: > org-ref makes it very easy to download a pdf paper when creating a new > bibtex entry. However, there is no way that I could find to directly > open the pdf from the bibtex entry. Could org-ref add some custom field > like file={...} created when the pdf file is downloaded ? > > Julien. I just realized that clicking on the cite: link offer to open the pdf if it's named like the bibtex entry, so no need for a custom field. Julien.
[O] org-ref and link to pdf file ?
org-ref makes it very easy to download a pdf paper when creating a new bibtex entry. However, there is no way that I could find to directly open the pdf from the bibtex entry. Could org-ref add some custom field like file={...} created when the pdf file is downloaded ? Julien.
[O] org-ref, abstracts
I'm starting to use org-ref to manage bibtex file, and it's impressively useful ! However I couldn't find a variable to have the *-add-bibtex-entry create an abstract field in the bibtex entry. Is it possible? If not, I think it would be a useful addition. J. Cubizolles
Re: [O] org-passwords.el and encryption
Eric S Fraga writes: > On Saturday, 12 Mar 2016 at 11:50, Julien Cubizolles wrote: >> I've recently started using org-passwords.el. I'm using symmetric >> encryption for the gpg file where the passwords are stored. I've seen >> mention of several ways to avoid typing the passphrase over and over in >> one session: using gpg-agent or not... What would you recommend ? > > I use gpg-agent in conjunction with keychain. Generally works very > well. I'll give it a try, thanks.
[O] org-passwords.el and encryption
I've recently started using org-passwords.el. I'm using symmetric encryption for the gpg file where the passwords are stored. I've seen mention of several ways to avoid typing the passphrase over and over in one session: using gpg-agent or not... What would you recommend ? Wilk.
[O] resuming an interrupted org-publish to ftp
I have a huge number of files to publish to a ftp server (I had to reexport them after an Org upgrade) and org-publish fails because the ftp server closes the connection before the *whole* transfer is done. And it seems that in this case none of the timestamps used to control which file has to be uploaded are updated. So I have to start the whole upload again, it fails again... Shouldn't org-publish update the timestamps after each successful upload of a file, and not wait for the end of the whole upload ? In the meantime, I'd like to resort to a "manual" ftp upload and inform org-publish that the ftp site is up to date. I've looked into the timestamps, but I don't see how I could put the right information into it. Julien.
Re: [O] #+BEGIN_LaTeX deprecated
Nicolas Goaziou writes: > Hello, > > Kaushal Modi writes: > >> Check out this announcement email about the syntax change: >> https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00525.html >> >> It has a snippet to convert the old syntax files to new syntax. > > For completeness, the function is included in ORG-NEWS relative to Org > 9.0. Thanks, it saved me a lot of manual changes. Julien.
Re: [O] org-pdfview-open doesn't work anymore
Nicolas Goaziou writes: > I think the simplest solution may be to follow the advice in ORG-NEWS > and use > > (lambda (file link) (org-pdfview-open file)) It's working, thanks. Julien.
[O] #+BEGIN_LaTeX deprecated
The #+BEGIN_LaTeX... #+END_LaTeX has been deprecated in favor of #+BEGIN_EXPORT latex ... #+END_EXPORT. I have however a lot of older org files that I will need to export again. I can manually change the blocks but I was wondering if some automatic conversion function has been implemented. Julien.
Re: [O] Strange problems when exporting asynchronously in beamer mode
Nicolas Goaziou writes: > You could try adding (require 'ox-beamer) above. That did it. For some reason, it wasn't needed before. Julien.
[O] org-pdfview-open doesn't work anymore
I've been using org-pdfview (from https://github.com/markus1189/org-pdfview) to have org-mode open pdf files generated during export. --8<---cut here---start->8--- (pdf-tools-install) (eval-after-load 'org '(progn (require 'org-pdfview) (add-to-list 'org-file-apps '("\\.pdf\\'" . org-pdfview-open)) )) --8<---cut here---end--->8--- Since a recent upgrade, this fails with: --8<---cut here---start->8--- (wrong-number-of-arguments #[(link) "\304\305\"\2031\306\307\"\310\306\311\"!\310\306\312\"!\313 \307\"\210\314 !\210\315\316\317 @_\320 \245!!+\207\304\321\"\203N\306\307\"\310\306\311\"!\313\307\"\210\314 !*\207\313\307\"\207" [link path page height string-match "\\(.*\\)::\\([0-9]*\\)\\+\\+\\([[0-9]\\.*[0-9]*\\)" match-string 1 string-to-number 2 3 org-open-file pdf-view-goto-page image-set-window-vscroll round pdf-view-image-size frame-char-height "\\(.*\\)::\\([0-9]+\\)$"] 4 ("/home/wilk/.emacs.d/elpa/org-pdfview-20160125.1254/org-pdfview.elc" . 662)] 2) org-pdfview-open("/home/wilk/enseignement/2015-2016/topos/topo-tipe-beamer.pdf" "/home/wilk/enseignement/2015-2016/topos/topo-tipe-beamer.pdf") --8<---cut here---end--->8--- Is it a bug in Org-mode or should I report the issue to the org-pdfview author ? Julien.
[O] "Indented"" LaTeX compiler in ox.el should be Intended?
I noticed that org-latex-compiler-file-string mentions an "Indented LaTeX compiler". I guess it should be "Intended LaTeX compiler". --8<---cut here---start->8--- (defcustom org-latex-compiler-file-string "%% Indented LaTeX compiler: %s\n" "LaTeX compiler format-string. See also `org-latex-compiler'." :group 'org-export-latex :type '(choice (const :tag "Comment" "%% Indented LaTeX compiler: %s\n") (const :tag "latex-mode file variable" "%% -*- latex-run-command: %s -*-\n") (const :tag "AUCTeX file variable" "%% -*- LaTeX-command: %s -*-\n") (string :tag "custom format" "%% %s")) :version "25.1" :package-version '(Org . "9.0")) --8<---cut here---end--->8--- Julien.
[O] Strange problems when exporting asynchronously in beamer mode
I recently upgraded to the latest git version and every asynchronous export to pdf in beamer mode fails whereas the asynchronous mode has no problem. I didn't change anything in my setup, and it was working fine before. With the following Org file (the first lines are to ensure that the latest git version of Org is used) --8<---cut here---start->8--- #+BEGIN_SRC emacs-lisp :exports none :results none (add-to-list 'load-path (expand-file-name "~/info/emacs/org-mode/lisp")) (add-to-list 'load-path (expand-file-name "~/info/emacs/org-mode/contrib/lisp")) (setq org-export-async-init-file "/home/wilk/configuration/elisp/org-export-async-init.el") (org-reload) (setq org-export-async-debug t) #+END_SRC * Test essai --8<---cut here---end--->8--- Calling (in emacs -Q) an asynchronous export to Tex for Beamer (C-c C-e l b) gives the following error --8<---cut here---start->8--- Unknown "nil" back-end: Aborting export --8<---cut here---end--->8--- There is no error for an export to TeX in LateX mode (C-c C-e l l), of if the export to TeX in beamer mode isn't asynchronous. The contents of the "/home/wilk/configuration/elisp/org-export-async-init-test.el" file are: --8<---cut here---start->8--- ;;~/.emacs -*- mode: lisp-*- (setq org-export-async-debug t) (add-to-list 'load-path (expand-file-name "~/info/emacs/org-mode/lisp")) (add-to-list 'load-path (expand-file-name "~/info/emacs/org-mode/contrib/lisp")) (require 'org) (require 'ox) --8<---cut here---end--->8--- Any idea what went wrong ? Julien.
Re: [O] org-beamer-select-environment fails
Nicolas Goaziou writes: > Hello, > > Julien Cubizolles writes: > >> Did you issue a fix for org-mode or for emacs ? I've upgraded to Org-mode >> version 8.3.2 >> (release_8.3.2-356-gb2eb53) and the problem remains. > > This is an old release. I fixed the bug in Org stable branch, yet to be > released on ELPA. Sorry about that, I don't know why my git repo was not on the right branch. It's indeed fixed. Thanks.
Re: [O] org-beamer-select-environment fails
Nicolas Goaziou writes: >> Calling org-beamer-select-environment triggers the problem. I've tried >> with Org-mode version 8.2.10 (release_8.2.10 @ >> /usr/share/emacs/25.1.50/lisp/org/) (emacs -Q) and with Org-mode version >> 8.3.3 (8.3.3-43-g0b97a5-elpa @ /home/wilk/.emacs.d/elpa/org-20160201/) >> >> Since I was not having this problem previously, I guess it must have to >> do with a new version of Emacs (GNU Emacs 25.1.50.2 >> (x86_64-pc-linux-gnu, GTK+ Version 3.16.7) of 2016-01-31) > > Fixed. Thank you. Did you issue a fix for org-mode or for emacs ? I've upgraded to Org-mode version 8.3.2 (release_8.3.2-356-gb2eb53) and the problem remains. Julien.
Re: [O] org-beamer-select-environment fails
Eric S Fraga writes: > On Monday, 1 Feb 2016 at 14:56, Julien Cubizolles wrote: >> There is something wrong with org-beamer-select-environment. It fails >> with: > > I just tried this and it works fine for me. Maybe tell us a bit more > about your setup, such as what version of org? And maybe include a > small example? Just a test.org file with --8<---cut here---start->8--- * test --8<---cut here---end--->8--- Calling org-beamer-select-environment triggers the problem. I've tried with Org-mode version 8.2.10 (release_8.2.10 @ /usr/share/emacs/25.1.50/lisp/org/) (emacs -Q) and with Org-mode version 8.3.3 (8.3.3-43-g0b97a5-elpa @ /home/wilk/.emacs.d/elpa/org-20160201/) Since I was not having this problem previously, I guess it must have to do with a new version of Emacs (GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.16.7) of 2016-01-31) Julien.
[O] org-beamer-select-environment fails
There is something wrong with org-beamer-select-environment. It fails with: --8<---cut here---start->8--- Debugger entered--Lisp error: (wrong-type-argument listp t) delete((org-filtered) t) remove((org-filtered) t) org-move-to-column(147 t) org-fast-tag-show-exit(t) org-fast-tag-selection(nil nil ((:startgroup) ("B_againframe" . 65) ("B_appendix" . 120) ("B_column" . 99) ("B_columns" . 67) ("B_frame" . 102) ("B_fullframe" . 70) ("B_ignoreheading" . 105) ("B_note" . 110) ("B_noteNH" . 78) ("B_action" . 107) ("B_only" . 79) ("B_Definition" . 68) ("B_Indispensable" . 73) ("B_Consequence" . 83) ("B_Block" . 66) ("B_Theoreme" . 84) ("B_Exemple" . 88) ("B_block" . 98) ("B_alertblock" . 97) ("B_verse" . 118) ("B_quotation" . 113) ("B_quote" . 81) ("B_structureenv" . 115) ("B_theorem" . 116) ("B_definition" . 100) ("B_example" . 101) ("B_exampleblock" . 69) ("B_proof" . 112) ("B_beamercolorbox" . 111) (:endgroup) ("BMCOL" . 124)) nil) org-set-tags() org-beamer-select-environment() funcall-interactively(org-beamer-select-environment) call-interactively(org-beamer-select-environment nil nil) command-execute(org-beamer-select-environment) --8<---cut here---end--->8--- Julien.
[O] New error when setting the publishing directory
I've been using the following for a long time to export to a remote ftp site. --8<---cut here---start->8--- #+begin_src emacs-lisp :exports none (setq org-export-in-background t) (setq org-publish-project-alist '(("orgfiles" :publishing-directory "/ftp:login@ftpserver:" ))) #+end_src --8<---cut here---end--->8--- Since a few days, this fails with: --8<---cut here---start->8--- Debugger entered--Lisp error: (wrong-type-argument listp org-table) org-activate-plain-links(#) font-lock-fontify-keywords-region(251 # nil) font-lock-default-fontify-region(251 # nil) font-lock-fontify-region(251 #) org-table-align() org-babel-insert-result((("orgfiles" :publishing-directory "/ftp:mpsi2...@ftpperso.free.fr:")) ("replace") ("emacs-lisp" "(setq org-export-in-background t)\n(setq org-publish-project-alist\n '((\"orgfiles\"\n :publishing-directory \"/ftp:mpsi2...@ftpperso.free.fr:\"\n )))" ((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "none") (:results . "replace") (:session . "none") (:hlines . "no") (:result-type . value) (:result-params "replace") (:rowname-names) (:colname-names)) "" nil 0 1) nil 0 "emacs-lisp") org-babel-execute-src-block(nil) org-babel-execute-src-block-maybe() org-babel-execute-maybe() org-babel-execute-safely-maybe() run-hook-with-args-until-success(org-babel-execute-safely-maybe) org-ctrl-c-ctrl-c(nil) funcall-interactively(org-ctrl-c-ctrl-c nil) call-interactively(org-ctrl-c-ctrl-c nil nil) command-execute(org-ctrl-c-ctrl-c) --8<---cut here---end--->8--- Julien.
[O] BUG: org-set-property should not accept an empty string as property
According to http://orgmode.org/worg/dev/org-syntax.html#Node_Properties, the NAME of a property cannot be an empty string. However, the interactive version of org-set-property accepts such a string, resulting in a malformed drawer. When giving an empty string at the prompt for the property NAME, org-set-property should instead gracefully exit without creating a new property in the drawer.
Re: [O] How to call org-set-property from a function
Rasmus writes: > For more fine grained control you probably need to write something akin to > org-set-property and check the actual values (e.g. to signal quit if an > empty quote is returned). Actually, shouldn't org-set-property check for an empty quote for the property name since it will result :: ie a malformed drawer ? Julien.
Re: [O] How to call org-set-property from a function
Rasmus writes: > When you enter no value (C-j when ido is enabled) or C-return with helm. > it insert :: VALUE. But then you end up with a malformed drawer, so C-g is better for the moment. > For more fine grained control you probably need to write something akin to > org-set-property and check the actual values (e.g. to signal quit if an > empty quote is returned). I'll give it a try someday. Thanks for your help, Julien.
Re: [O] command to skip the :PROPERTIES: drawer
Nicolas Goaziou writes: > Hello, > > Julien Cubizolles writes: > >> Let's say you have an entry like the followin, with the point in the >> Entry line. Is there an org command to put the mark on a newline after >> :END: ? At the moment, I have too many C-n to type for my taste :-) >> >> *** Entry :B_action: >> :PROPERTIES: >> :BEAMER_env: action >> :BEAMER_COL: 0.6 >> :END: > > See `org-end-of-meta-data'. Thanks, the following works. #+begin_src emacs-lisp (define-key org-mode-map "\C-ct" (lambda () (interactive) (org-end-of-meta-data))) #+end_src I'm curious as to why this isn't an interactive function. My workflow is usually 1. create an entry by C-return and eventually M-right or M-left 2. add the required properties 3. type the text in the entry Without org-end-of-meta-data, going fro 2m to 3 is not straightforward. Julien.
Re: [O] How to call org-set-property from a function
Rasmus writes: > Does this do what you want: > > (call-interactively 'org-set-property) Thanks, indeed it does, Marcin beat you to it though :-) >> Also, I will sometimes need to include several different >> properties. What would be the right way to run a loop where a new >> property is set until the user answers something like C-return at the >> prompt ? > > Here's naive approach. Probably you can find a more elegant way. > > (condition-case nil > (while t > (call-interactively 'org-set-property)) > (quit nil)) That's working, I'm breaking out of the loop with C-g, is that what you intended ? Julien.
[O] command to skip the :PROPERTIES: drawer
Let's say you have an entry like the followin, with the point in the Entry line. Is there an org command to put the mark on a newline after :END: ? At the moment, I have too many C-n to type for my taste :-) --8<---cut here---start->8--- *** Entry :B_action: :PROPERTIES: :BEAMER_env: action :BEAMER_COL: 0.6 :END: --8<---cut here---end--->8--- Julien.
Re: [O] Bug: time duration in capture template broken
Nicolas Goaziou writes: > Julien Cubizolles writes: > >> --8<---cut here---start->8--- >> ("t" "todo" entry (fileheadline "~/org/orgfiles/refile.org" "Tâches") >> "* TODO %? %^G\n DEADLINE: %^t" :clock-resume t :kill-buffer >> t)--8<---cut here---end--->8--- > > I do not see any error. Could you update Org and try again? I can't reproduce the error now, don't know how I messed it up before. Sorry for the noise. Julien.
Re: [O] How to call org-set-property from a function
Marcin Borkowski writes: > What about call-interactively? Thanks, that's the way to do it: #+begin_src emacs-lisp (interactive) (save-excursion (org-beamer-select-environment) (org-set-tags-command) (call-interactively 'org-set-property) ) #+end_src >> Also, I will sometimes need to include several different >> properties. What would be the right way to run a loop where a new >> property is set until the user answers something like C-return at the >> prompt? > > That I don't know. I can still run C-x-p afterwards, I've already saved many keystrokes. Julien.
[O] How to call org-set-property from a function
I have the following function to automate the creation of a new entry: #+begin_src emacs-lisp (interactive) (save-excursion (org-beamer-select-environment) (org-set-tags-command) ) #+end_src I'd like to add the possibility to set some properties through (org-set-property) but I can't figure out how to call it in its interactive way, so that it prompts me for a property and value ? Of course adding (org-set-property) or (interactive (org-set-property)) doesn't work. Also, I will sometimes need to include several different properties. What would be the right way to run a loop where a new property is set until the user answers something like C-return at the prompt ? Julien.
Re: [O] Bug: time duration in capture template broken
Nicolas Goaziou writes: > Hello, > > Julien Cubizolles writes: > >> Maybe it's related, but I just noted that the %^G and %^t fields >> %-escapes don't work anymore: they just insert the "%^G" and "%^t" >> strings instead of prompting. > > Could you provide a template where those fail? Sure: --8<---cut here---start->8--- ("t" "todo" entry (fileheadline "~/org/orgfiles/refile.org" "Tâches") "* TODO %? %^G\n DEADLINE: %^t" :clock-resume t :kill-buffer t)--8<---cut here---end--->8---
Re: [O] Bug: time duration in capture template broken
Maybe it's related, but I just noted that the %^G and %^t fields %-escapes don't work anymore: they just insert the "%^G" and "%^t" strings instead of prompting. Julien;
Re: [O] Embedding and extracting license/author information in an image file
John Kitchin writes: > This is usually done manually in a citation in the caption I think. I'm using it for beamer presentations for teaching, I'd rather have them all at the end of the pdf. > This would not work reliably. I could imagine an insert figure link > which would check for the data and do that, or perhaps a > post-insert-link hook function, but neither of these would work if you > simply type in a link. What should happen with images that don't contain > the data? I guess being able to write and read the metadata from emacs would be enough for now. > None I know of. I looked at something similar for pdf, but did not find > anything but external programs. As I mentioned image-dired has image-dired-set-exif-data and image-dired-get-exif-data: it might be useful. Julien.
Re: [O] Embedding and extracting license/author information in an image file
Eric S Fraga writes: > On Monday, 7 Dec 2015 at 22:08, Julien Cubizolles wrote: >> I often include images in my org documents and would like to properly >> cite the license, and/or author. I was thinking that this could be >> simplified by: >> >> * embedding the license/author information in some metadata of the jpg >> or png file (it seems that some standard called xmp can be used to >> embed data in png/jpg [fn:1]) preferably using some emacs tool > > I use jhead for adding a copyright statement to my photos (in > JPEG). Thanks, is there a dedicated field for copyright statements ? Did some good soul already code some lisp around it ? Julien.
Re: [O] Embedding and extracting license/author information in an image file
Eric S Fraga writes: > On Monday, 7 Dec 2015 at 22:08, Julien Cubizolles wrote: >> I often include images in my org documents and would like to properly >> cite the license, and/or author. I was thinking that this could be >> simplified by: >> >> * embedding the license/author information in some metadata of the jpg >> or png file (it seems that some standard called xmp can be used to >> embed data in png/jpg [fn:1]) preferably using some emacs tool > > I use jhead for adding a copyright statement to my photos (in > JPEG). Thanks, is there a dedicated field for copyright statements ? Did some good soul already code some lisp around it ? Julien.
[O] Use synctex for latex export
While some are trying to get org<->pdf syncing with synctex, I'm still struggling with getting synctec syncing between the pdf file and the tex file generated from an org file. I thought adding --synctex=1 to org-latex-pdf-process would be enough but it doesn't work. Julien.
Re: [O] Embedding and extracting license/author information in an image file
Rasmus writes: > You could probably use exiftool with org-babel or dynamic blocks to > extract the required data and generated the syntax you want. Thanks for the pointer, I'll give it a try with image-dired-get-exif-data, and image-dired-set-exif-data. There doesn't seem to be an interactive use for the latter, that's unfortunate: you can't add an exif tag from dired. Julien.
[O] Embedding and extracting license/author information in an image file
I often include images in my org documents and would like to properly cite the license, and/or author. I was thinking that this could be simplified by: * embedding the license/author information in some metadata of the jpg or png file (it seems that some standard called xmp can be used to embed data in png/jpg [fn:1]) preferably using some emacs tool * getting org to add a footnote with this information when linking to a file with this kind of information. Could it be done ? Do you know of an emacs package providing read/write access to this metadata ? Footnotes: [fn:1] https://en.wikipedia.org/wiki/Extensible_Metadata_Platform
Re: [O] :completion function isn't run anymore?
Nicolas Goaziou writes: > I forgot that :preparation-function could also be a single function. > Attached is the updated patch to test. It's fixed, thanks. Once again, I'm amazed by the reactivity and efficiency of everyone in the org-mode community. > See `org-reload'. Thanks for that too. That will come in handy. Julien.
Re: [O] :completion function isn't run anymore?
Nicolas Goaziou writes: > I didn't investigate much the issue yet, but, out of curiosity, would > the following patch solve the issue: Thanks for looking into it. It seems the completion-function is now being accessed but unfortunately something is still wrong. The error message is --8<---cut here---start->8--- org-publish-projects: Wrong type argument: sequencep, jc-org-publish-rename-beamer-pdf --8<---cut here---end--->8--- On a related note, I finally figured why rebasing the gif tree didn't fix this problem: I was forgetting to recompile and was still using the former .elc files... If I'm to bisect, is it possible to reload all org-mode files without restarting emacs ? Would M-x org-mode be enough ? Julien.
Re: [O] :completion function isn't run anymore?
Julien Cubizolles writes: > I noticed that the :preparation-function defined in > org-publish-project-alist isn't run anymore when publishing a project. It seems the preparation-function isn't run either. Consider the following more simple examples --8<---cut here---start->8--- #+TITLE: Hello #+begin_src emacs-lisp :tangle none :exports none (setq org-export-in-background nil) (defun jc-preparation () "Preparation functions to be run before actually pubishing" (setq org-latex-title-command "") ) (setq org-publish-project-alist `(("pdf" :base-directory "./" :publishing-directory "./" :preparation-function jc-preparation :publishing-function org-beamer-publish-to-pdf :exclude ".*" :include ,(list (file-name-nondirectory buffer-file-name)) ) )) #+end_src #+RESULTS: | pdf | :base-directory | ./ | :publishing-directory | ./ | :preparation-function | jc-preparation | :publishing-function | org-beamer-publish-to-pdf | :exclude | .* | :include | (test.org) | * 1st section ** 1st subsection ** 2nd subsection --8<---cut here---end--->8--- Save the to test.org and publish using the "pdf" project. org-beamer-publish-to-pdf creates test.pdf as it should but the preparation-function should remove the titlepage wich it doesn't. However, with emacs -Q (and the version of org-mode shipped with it), I recover the expected behaviour. With emacs -Q -l ~/test.el, the problem reoccurs ~/test.el --8<---cut here---start->8--- (add-to-list 'load-path "~/info/emacs/org-mode/lisp") (add-to-list 'load-path "~/info/emacs/org-mode/contrib/lisp") --8<---cut here---end--->8--- ~/info/emacs/org-mode/ is my git repo of org-mode. I'm running GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.14.13) of 2015-10-21 Julien.
[O] :completion function isn't run anymore?
I noticed that the :preparation-function defined in org-publish-project-alist isn't run anymore when publishing a project. Consider the following, it's a stripped-down version of the setup I have been using on many documents for a few years. --8<---cut here---start->8--- #+begin_src emacs-lisp :tangle none :exports none (setq org-export-in-background nil) (defun remove-org-suffix (name) "Remove the .org from a file name" (if (string-match "\\(.*\\)\\.org" name) (substring name (match-beginning 1) (match-end 1)) name)) (defun jc-org-publish-rename (suffix version) "Rename file.suffix to file-version.suffix when buffer is visiting file.org" (let* ((file-base-name (remove-org-suffix (buffer-file-name))) (file-suffix-name (concat file-base-name "." suffix)) (file-version-suffix-name (concat file-base-name "-" version "." suffix))) (if (file-exists-p file-suffix-name) (rename-file file-suffix-name file-version-suffix-name t)) ) ) (defun jc-org-publish-rename-pdf (suffix) "Rename file.pdf to file-suffix.pdf when buffer is visiting file.org" (let* ((file-base-name (remove-org-suffix (buffer-file-name))) (file-pdf-name (concat file-base-name ".pdf")) (file-suffix-pdf-name (concat file-base-name "-" suffix ".pdf"))) (if (file-exists-p file-pdf-name) (rename-file file-pdf-name file-suffix-pdf-name 1)) ) ) (defun jc-org-publish-rename-beamer-pdf () "Rename file.pdf to file-beamer.pdf and file.tex to file-beamer.tex when buffer is visiting file.org" (jc-org-publish-rename '"pdf" '"beamer") (jc-org-publish-rename '"tex" '"beamer")) (setq org-publish-project-alist `(("beamer" :base-directory "./" :publishing-directory "./" :publishing-function org-beamer-publish-to-pdf :exclude ".*" :include ,(list (file-name-nondirectory buffer-file-name)) :completion-function jc-org-publish-rename-beamer-pdf ) )) #+end_src #+RESULTS: | beamer | :base-directory | ./ | :publishing-directory | ./ | :publishing-function | org-beamer-publish-to-pdf | :exclude | .* | :include | (test.org) | :completion-function | jc-org-publish-rename-beamer-pdf | * 1st section ** 1st subsection ** 2nd subsection --8<---cut here---end--->8--- Save the to test.org and publish using the "beamer" project. org-beamer-publish-to-pdf creates test.pdf as it should but the completion-function should rename test.tex and test.pdf test-beamer.tex and test-beamer.pdf. It doesn't. Even worse, you can type whatever function name for :completion-function, even if it's not defined, and the exporter won't complain. However, with emacs -Q (and the version of org-mode shipped with it), I recover the expected behaviour With emacs -Q -l ~/test.el, the problem reoccurs ~/test.el --8<---cut here---start->8--- (add-to-list 'load-path "~/info/emacs/org-mode/lisp") (add-to-list 'load-path "~/info/emacs/org-mode/contrib/lisp") --8<---cut here---end--->8--- ~/info/emacs/org-mode/ is my git repo of org-mode. I'm running GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.14.13) of 2015-10-21 Julien.
Re: [O] anyone syncing orgmode calendar with google cal, and if so how?
Eric S Fraga writes: > On Tuesday, 6 Oct 2015 at 12:21, Julien Cubizolles wrote: >> I'm using org-caldav, it's working fine for me. > > How do you have this working with Google? It quit working for me due to > authentication changes at the Google end. I cannot remember the details > unfortunately. Just followed the instructions on the github README page. I've not looked this authentification problem in Google but from what I gathered it's still working using the old endpoint for the time being. I'll reconsider when it won't.