Re: [O] org-read-date with pop-up-frames set to t
On 2014-12-12 23:47, Nicolas Goaziou writes: > Hello, > > Alan Schmitt writes: > >> Here is a patch that honors the setting for `calendar-setup' when it's >> 'calendar-only: is now correctly creates a new frame for the calendar, >> and removes is and restores the focus when the date is selected. As a >> side effect, is also fixes the bug I reported in this thread. > > Thank you. It looks good. Please push. Pushed. Best, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 signature.asc Description: PGP signature
Re: [O] [RFC] Display most recent log item in Agenda
Nicolas Goaziou writes: > Eric Abrahamsen writes: > >> I thought that's what `org-log-beginning' was for: finding where the >> log-note list would be (drawer or no), if it exists. > > Not exactly. It finds where the next note is to be inserted. This may > not be in front of the log-note list even if it exists (e.g., if > `org-log-states-order-reversed' is nil you may end up in front of the > following paragraph). > >> If users aren't using `org-log-into-drawer', `org-log-beginning' >> should still go to the spot where the list would be, right? > > Not necessarily. It actually doesn't look for such a list. It could end > up after the list (see above) or even in a different location (see > below). > > Also, it doesn't tell if there is a list at all, so if you rely on it, > you need to double-check if you really are close to a log-note. Well sure, I was already aware of all this (except I hadn't caught that `org-log-beginning' would go to the intended location of the *newest note*, not just the location of the list, thanks for that). There were also some checks in the code I sent to make sure there was actually a list in the spot where `org-log-beginning' deposited us. > Unfortunately, recognizing a log note is impossible, since it is > a regular plain list. Contents change, and templates are customizables > (see `org-log-note-headings'). See, for example, the hack in > `org-skip-over-state-notes'. I'm not terribly worried about finding the real last state note with 100% accuracy -- as you say, that's not really possible. This would be a convenience function displaying a useful bit of information, and if it fails to do so no planes will crash. Anyone who cares enough to use it probably already knows where their notes are. ("You've got to know where your towel is.") I'd be inclined just to go to the location of `org-log-beginning', look around for likely log notes, show the most recent one if we can find it, and bail if not. What do you think? >> Then, if there's a list there, I take the first or last note (depending >> on log-state-notes-reversed). >> >> I don't know why the notes would be scattered across the section... > > Because in this case, the list is not necessarily re-used. The first > note is inserted after planning info and properties drawer. If, later, > you insert some text before it, logging process will create a new list > above, and so on. E.g., > > Step 1: > > * Headline > - Note 1 > > Step 2: > > * Headline > Some text > - Note 1 > > Step 3: > > * Headline > - Note 2 > Some text > - Note 1 > > > Regards,
Re: [O] getting calc-units working in table formulas
Michael Brand writes: > Hi Eric > > On Wed, Dec 17, 2014 at 2:09 AM, Eric Abrahamsen > wrote: >> Lastly, is there a way to both use output formatting, and retain the >> unit name (if desired)? Right now I get this: >> >> | km| units | conversion | >> |---+---+| >> | 2.5km | ft|8202.10 | >> #+TBLFM: $3=uconvert($1, $2); %.2f >> >> Ie, the "ft" falls off the results when I add the "%.2f". Is it possible >> to retain that and have formatting? > > Yes, see > "org-spreadsheet: formatting chops off units" > http://thread.gmane.org/gmane.emacs.orgmode/59928 I'm certainly late to this party! My only excuse is that it's far from obvious, given the current manual, that all this is available (even after your documentation patch in the referenced thread). Just to note, the second of the two formatting solutions you mentioned (manually adding the units as a string) seems to no longer work. The first does, however. I'll work up a slightly longer documentation patch in the next couple of days -- I really think people should be alerted to what's possible with units. The "uconvert" defmath could even just be an example in the manual, rather than code that ships with Org. E
Re: [O] getting calc-units working in table formulas
Hi Eric On Wed, Dec 17, 2014 at 2:09 AM, Eric Abrahamsen wrote: > Lastly, is there a way to both use output formatting, and retain the > unit name (if desired)? Right now I get this: > > | km| units | conversion | > |---+---+| > | 2.5km | ft|8202.10 | > #+TBLFM: $3=uconvert($1, $2); %.2f > > Ie, the "ft" falls off the results when I add the "%.2f". Is it possible > to retain that and have formatting? Yes, see "org-spreadsheet: formatting chops off units" http://thread.gmane.org/gmane.emacs.orgmode/59928 Michael
Re: [O] How do you show the entires in the logbook drawer in the agenda
jenia.iv...@gmail.com (jenia.ivlev) writes: > Hello. > > I thought that the entires in the logbook drawer - entered pressing `C-c > C-z` in orgmode - would show up in the agenda, pressing `C-c a a`, but > they do not. > Is possible to somehow list those notes in the agenda? > > Thanks in advnace for your kind help. Nice timing! If you hang on for just a couple of days, there ought to be a command like this available to you -- we're working it out in another thread. Eric
[O] How do you show the entires in the logbook drawer in the agenda
Hello. I thought that the entires in the logbook drawer - entered pressing `C-c C-z` in orgmode - would show up in the agenda, pressing `C-c a a`, but they do not. Is possible to somehow list those notes in the agenda? Thanks in advnace for your kind help.
Re: [O] How to show/hide the snippet block in org-babel when the cursor is inside the snippet text
I use `org-babel-next-src-block' and `org-babel-previous-src-block' to go up and down and rely on the org folding. Not a streamlined approach but it works because I use it rarely. On Tue, Dec 16, 2014 at 6:01 AM, Oleh wrote: > > Hi Dmitry, > > > I would like to implement the following. Suppose, we have this org file: > > > > #+BABEL: :cache yes :tangle yes :noweb yes > > > > #+NAME: top_block > > #+begin_src perl :tangle "test.pl" :noweb tangle :shebang > #!/usr/bin/perl > > use strict; > > use warnings; > > > > open(my $fh, "<", "test.txt") > > or die "cannot open < file name: $!"; > > <> > > close($fh); > > #+end_src > > > > #+NAME: output-all > > #+begin_src perl > > while (my $line = <$fh>) { > > print $line; > > } > > #+end_src > > > > I can expand/collapse src blocks only when the cursor is on the top > lines: > > > > > > #+NAME: top_block > > #+begin_src perl ... > > > > But when it is inside any text in the scr block, expand/collapse doesn't > > work. How can I add this functionality as moving the cursor every time is > > not nice. > > There's a feature like this in https://github.com/abo-abo/worf > (installable also from MELPA). > > If you're in a source block, "[" will bring you to its start, and "i" > will hide/unhide it. > > You can use "j"/"k"/"i" to quickly navigate and fold many source > blocks within one heading. > > regards, > Oleh > > -- Grant Rettke g...@wisdomandwonder.com | http://www.wisdomandwonder.com/ “Wisdom begins in wonder.” --Socrates ((λ (x) (x x)) (λ (x) (x x))) “Life has become immeasurably better since I have been forced to stop taking it seriously.” --Thompson
Re: [O] getting calc-units working in table formulas
Michael Brand writes: > Hi Eric > > This answers only one of your questions: > > On Tue, Dec 16, 2014 at 5:21 AM, Eric Abrahamsen > wrote: >> #+BEGIN_SRC emacs-lisp >> (defmath uconvert (expr target-units) >> (math-convert-units expr target-units)) >> #+END_SRC > > I would prefer > > #+BEGIN_SRC emacs-lisp > (defmath uconv (expr target-units &optional pure) > (math-convert-units expr target-units pure)) > #+END_SRC > > >> | km| ft | >> |---+-| >> | 2.5km | uconvert(2.5 km ft) | >> #+TBLFM: $2=uconvert($1 ft) > > Calc syntax uses comma to separate the function arguments, see > examples in e. g. > http://orgmode.org/manual/Formula-syntax-for-Calc.html I was hoping I'd made a more interesting mistake than that! Thanks for clearing that up. > | km | ft | > |+--| > | 2.5 km | 8202.0997 ft | > > #+TBLFM: $2 = uconv($1, ft) > > Btw, to have the units only in the column header: > > | km |ft | > |-+---| > | 2.5 | 8202.0997 | > > #+TBLFM: $2 = uconv($1 * @<$1, @<$2, t) > > The same without a user's defmath: > > | km |ft | > |-+---| > | 2.5 | 8202.0997 | > > #+TBLFM: $2 = usimplify($1 * @<$1 / @<$2) Wow, interesting stuff. I had no idea... I'd still like to provide a small patch to the documentation, alerting users to the fact that units work out of the box. Does anyone have any opinions on including a defmath for `math-convert-units'? (The 'pure variant seems like a fine choice.) Lastly, is there a way to both use output formatting, and retain the unit name (if desired)? Right now I get this: | km| units | conversion | |---+---+| | 2.5km | ft|8202.10 | #+TBLFM: $3=uconvert($1, $2); %.2f Ie, the "ft" falls off the results when I add the "%.2f". Is it possible to retain that and have formatting? Eric
Re: [O] [PATCH] Selectively archive by timestamp
Toby Cubitt writes: > On Tue, Dec 16, 2014 at 10:52:09PM +0100, Nicolas Goaziou wrote: >> Toby Cubitt writes: >> >> > Here it is again (attached). >> >> Thank you. However, could you provide an appropriate commit message >> (functions modified, reason...)? >> >> Sorry for not catching that earlier. > > Sorry, not sure why I forgot to do that. Here's an updated version with > suitable commit message. BTW, would you mind also providing an entry in ORG-NEWS? Thanks,
Re: [O] [PATCH] Selectively archive by timestamp
Toby Cubitt writes: > Sorry, not sure why I forgot to do that. Here's an updated version with > suitable commit message. Applied. Thank you. Regards,
Re: [O] Bug: Effort vs column "day" impedence mismatch [8.2.10 (release_8.2.10 @ c:/Users/yhluc00/emacs/share/emacs/24.4/lisp/org/)]
Hello, yary writes: > In general, would like the formatting of a time interval in column mode > to respect "org-effort-durations" when it is summarizing effort > durations. Below is a specific example. > > Using the default "org-effort-durations" variable and default column > mode settings, the following buffer shows a confusing total: > > | Task| Estimate | > |-+--| > | * Estimate | 1d 8:00 | > | ** Little Thing | 1d | > | ** Big Mess | 3d | > > > vvv effort_days.org vvv > > #+COLUMNS: %40ITEM(Task) %12Effort(Estimate){:} > > * Estimate > > ** Little Thing >:PROPERTIES: >:Effort: 1d >:END: > > ** Big Mess >:PROPERTIES: >:Effort: 3d >:END: > > ^^^ effort_days.org ^^^ > > The mis-match is due to "Effort" days being an 8-hour workday, whereas > the Column-view day is a 24-hour calendar day. I would like all the days > to be 8-hour work days, including the total, resulting in: > > | Task| Estimate | > |-+--| > | * Estimate | 4d | > | ** Little Thing | 1d | > | ** Big Mess | 3d | You can modify the "d" entry in `org-effort-durations' so it becomes 1440 minutes instead of 480. You may also want to modify "m" and "y". Regards, -- Nicolas Goaziou
Re: [O] Bug: est+ not working, or perhaps under-documented [8.2.10 (release_8.2.10 @ c:/Users/yhluc00/emacs/share/emacs/24.4/lisp/org/)]
Hello, yary writes: > I'm trying to use effort estimate ranges with the {est+} summarizing, > but get "org-estimate-print: Wrong type argument: sequencep, 0" with > every attempt. It could be that I don't have the proper format for > entering the Effort property, since I haven't found any documentation > about effort ranges. I have tried: > >:Effort: +4.0-12.0 >:Effort: 4.0-12.0 >:Effort: 4-12 >:Effort: 4:00-12:00 >:Effort: 4:00-1.5d > and >:Effort_Low: 4:00 >:Effort_High: 1.5d > > as alternatives. Below is a buffer that reproduces the issue, load it, > type C-c C-x C-e on the Estimate line to see the error. I would expect > to see a column view with a sensable combined estimate on the top > line. It should be fixed. Thank you. Proper syntax is simply :Effort: 4-12 Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Selectively archive by timestamp
On Tue, Dec 16, 2014 at 10:52:09PM +0100, Nicolas Goaziou wrote: > Toby Cubitt writes: > > > Here it is again (attached). > > Thank you. However, could you provide an appropriate commit message > (functions modified, reason...)? > > Sorry for not catching that earlier. Sorry, not sure why I forgot to do that. Here's an updated version with suitable commit message. Best, Toby -- Dr T. S. Cubitt Royal Society University Research Fellow Fellow of Churchill College, Cambridge Centre for Quantum Information DAMTP, University of Cambridge email: ts...@cantab.net web: www.dr-qubit.org >From e4ad9035f2fe50d2f4272621453bf5761c5802fa Mon Sep 17 00:00:00 2001 From: "Toby S. Cubitt" Date: Fri, 17 Jan 2014 15:14:13 + Subject: [PATCH] org-archive.el: Add command to archive entries with timestamps before today. * lisp/org-archive.el (org-archive-all-old): archive all entries with timestamps prior to today. (org-archive-subtree): double prefix argument invokes org-archive-all-old. (org-archive-all-matches, org-archive-all-done): factor out common code into org-archive-all-matches. --- doc/org.texi| 4 lisp/org-archive.el | 68 +++-- 2 files changed, 60 insertions(+), 12 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index d617259..10463ff 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -7512,6 +7512,10 @@ the archive. To do this, each subtree is checked for open TODO entries. If none are found, the command offers to move it to the archive location. If the cursor is @emph{not} on a headline when this command is invoked, the level 1 trees will be checked. +@orgkey{C-u C-u C-c C-x C-s} +As above, but check subtree for timestamps instead of TODO entries. The +command will offer to archive the subtree if it @emph{does} contain a +timestamp, and that timestamp is in the past. @end table @cindex archive locations diff --git a/lisp/org-archive.el b/lisp/org-archive.el index 96ef021..3e14291 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -204,9 +204,11 @@ The archive can be a certain top-level heading in the current file, or in a different file. The tree will be moved to that location, the subtree heading be marked DONE, and the current time will be added. -When called with prefix argument FIND-DONE, find whole trees without any +When called with a single prefix argument FIND-DONE, find whole trees without any open TODO items and archive them (after getting confirmation from the user). -If the cursor is not at a headline when this command is called, try all level +When called with a double prefix argument, find whole trees with timestamps before +today and archive them (after getting confirmation from the user). +If the cursor is not at a headline when these commands are called, try all level 1 trees. If the cursor is on a headline, only try the direct children of this heading." (interactive "P") @@ -219,8 +221,10 @@ this heading." (org-archive-subtree ,find-done)) org-loop-over-headlines-in-active-region cl (if (outline-invisible-p) (org-end-of-subtree nil t -(if find-done - (org-archive-all-done) +(cond + ((equal find-done '(4)) (org-archive-all-done)) + ((equal find-done '(16)) (org-archive-all-old)) + (t ;; Save all relevant TODO keyword-relatex variables (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler (tr-org-todo-keywords-1 org-todo-keywords-1) @@ -383,7 +387,7 @@ this heading." (message "Subtree archived %s" (if (eq this-buffer buffer) (concat "under heading: " heading) - (concat "in file: " (abbreviate-file-name afile)) + (concat "in file: " (abbreviate-file-name afile))) (org-reveal) (if (looking-at "^[ \t]*$") (outline-next-visible-heading 1 @@ -464,13 +468,50 @@ sibling does not exist, it will be created at the end of the subtree." If the cursor is not on a headline, try all level 1 trees. If it is on a headline, try all direct children. When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag." - (let ((re org-not-done-heading-regexp) re1 - (rea (concat ".*:" org-archive-tag ":")) + (org-archive-all-matches + (lambda (beg end) + (unless (re-search-forward org-not-done-heading-regexp end t) + "no open TODO items")) + tag)) + +(defun org-archive-all-old (&optional tag) + "Archive sublevels of the current tree with timestamps prior to today. +If the cursor is not on a headline, try all level 1 trees. If +it is on a headline, try all direct children. +When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag." + (org-archive-all-matches + (lambda (beg end) + (let (ts) + (and (re-search-forward org-ts-regexp end t) + (setq ts (match-string 0)) + (< (org-time-stamp-to-now ts) 0) + (if (not (looking-at + (concat "--\\(" org-ts-regexp "\\)"))) + (concat "old timestamp " ts) +
[O] clocking adds whitespace after :logbook: and :end:
clocking adds whitespace after :logbook: and :end:. is this desired? -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. And ANYBODY can get it. Denmark: free Karina Hansen NOW.
Re: [O] doc patch: move footnote in external links
Alan Schmitt writes: > On 2014-12-13 15:17, Nicolas Goaziou writes: > >> Also, `org-link-search-must-match-exact-headline' docstring could be >> improved: "When nil, the link..." doesn't apply to "*headline" type >> paths. > > As I was writing this, I experimented a little. It seems that, for > "*headline" links, the following applies depending on the value of > `org-link-search-must-match-exact-headline': > - nil: do a substring search on headlines, jump to the first one that > matches, fail if no match > - t: do an exact search on headlines, fail if no match > - 'query-to-create: do an exact search on headlines, propose to create > if no match. I think "*headline" links should assume this variable is non-nil, notwithstanding its real value. Of course, a `query-to-create' value still makes sense. WDYT? Regards,
Re: [O] [PATCH] Selectively archive by timestamp
Toby Cubitt writes: > Here it is again (attached). Thank you. However, could you provide an appropriate commit message (functions modified, reason...)? Sorry for not catching that earlier. Regards,
Re: [O] org-log-reschedule: inactive time-stamp instead
Hello, Karl Voit writes: > I am using org-log-reschedule set to "time" to get LOGBOOK entries > when I reschedule a task. > > This is fine so far. However, I'd like to log *inactive* time-stamps > instead of active ones: > > ,[ what I get now ] > | :LOGBOOK: > | - Rescheduled from "<2014-12-17 Mi>" on [2014-12-16 Di 17:01] > | :END: > ` > > Those active time-stamps clutter my daily agenda a bit. Therefore: > > ,[ what I would like to get ] > | :LOGBOOK: > | - Rescheduled from "[2014-12-17 Mi]" on [2014-12-16 Di 17:01] > | :END: > ` > > So can someone please add an option for this variable to get > inactive time-stamps? This should be the default behaviour. Have you customized somehow `org-log-note-headings'? Regards, -- Nicolas Goaziou
[O] Bug: Effort vs column "day" impedence mismatch [8.2.10 (release_8.2.10 @ c:/Users/yhluc00/emacs/share/emacs/24.4/lisp/org/)]
--text follows this line-- In general, would like the formatting of a time interval in column mode to respect "org-effort-durations" when it is summarizing effort durations. Below is a specific example. Using the default "org-effort-durations" variable and default column mode settings, the following buffer shows a confusing total: | Task| Estimate | |-+--| | * Estimate | 1d 8:00 | | ** Little Thing | 1d | | ** Big Mess | 3d | vvv effort_days.org vvv #+COLUMNS: %40ITEM(Task) %12Effort(Estimate){:} * Estimate ** Little Thing :PROPERTIES: :Effort: 1d :END: ** Big Mess :PROPERTIES: :Effort: 3d :END: ^^^ effort_days.org ^^^ The mis-match is due to "Effort" days being an 8-hour workday, whereas the Column-view day is a 24-hour calendar day. I would like all the days to be 8-hour work days, including the total, resulting in: | Task| Estimate | |-+--| | * Estimate | 4d | | ** Little Thing | 1d | | ** Big Mess | 3d | Emacs : GNU Emacs 24.4.1 (i686-pc-mingw32) of 2014-10-24 on LEG570 Package: Org-mode version 8.2.10 (release_8.2.10 @ c:/Users/yhluc00/emacs/share/emacs/24.4/lisp/org/)
Re: [O] can I refile or archive from the agenda without rebuilding?
Alan Schmitt wrote: > On 2014-12-15 09:31, Samuel Loury writes: [...] > This is how I did it: > > #+begin_src emacs-lisp > (defun as/org-agenda-refile-noupdate (&optional goto rfloc) > "Call `org-agenda-refile' with arguments GOTO, RFLOC, and t." > (interactive "P") > (org-agenda-refile goto rfloc t)) > > (add-hook 'org-agenda-mode-hook > (lambda () > (local-set-key (kbd "C-c C-w") 'as/org-agenda-refile-noupdate))) > #+end_src You could also use (define-key org-agenda-mode-map [remap org-agenda-refile] 'as/org-agenda-refile-noupdate) > I'm curious: is it better to use an advice or to redefine a function? I usually prefer to define a new function because it allows you to use both the old and new variant. -- Kyle
[O] Bug: est+ not working, or perhaps under-documented [8.2.10 (release_8.2.10 @ c:/Users/yhluc00/emacs/share/emacs/24.4/lisp/org/)]
--text follows this line-- I'm trying to use effort estimate ranges with the {est+} summarizing, but get "org-estimate-print: Wrong type argument: sequencep, 0" with every attempt. It could be that I don't have the proper format for entering the Effort property, since I haven't found any documentation about effort ranges. I have tried: :Effort: +4.0-12.0 :Effort: 4.0-12.0 :Effort: 4-12 :Effort: 4:00-12:00 :Effort: 4:00-1.5d and :Effort_Low: 4:00 :Effort_High: 1.5d as alternatives. Below is a buffer that reproduces the issue, load it, type C-c C-x C-e on the Estimate line to see the error. I would expect to see a column view with a sensable combined estimate on the top line. A paragraph about proper formatting of effort ranges in the info doc "8.5 Effort estimates" would also help. vvv effort_range.org vvv #+COLUMNS: %40ITEM(Task) %12Effort(Estimate){est+} * Estimate ** Little Thing :PROPERTIES: :Effort: 1.0-5.5 :END: ** Big Mess :PROPERTIES: :Effort: 8.0-30.0 :END: ^^^ effort_range.org ^^^ Emacs : GNU Emacs 24.4.1 (i686-pc-mingw32) of 2014-10-24 on LEG570 Package: Org-mode version 8.2.10 (release_8.2.10 @ c:/Users/yhluc00/emacs/share/emacs/24.4/lisp/org/) current state: == (setq org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-latex-format-headline-function 'org-latex-format-headline-default-function org-html-format-inlinetask-function 'ignore org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-font-lock-hook '(org-inlinetask-fontify) org-html-format-headline-function 'ignore org-metaup-hook '(org-babel-load-in-session-maybe) org-reveal-start-hook '(org-decrypt-entry) org-confirm-elisp-link-function 'yes-or-no-p org-latex-format-drawer-function '(lambda (name contents) contents) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) ;; removed some binary hooks org-ascii-format-drawer-function '(lambda (name contents width) contents) org-footnote-auto-adjust t org-html-format-drawer-function '(lambda (name contents) contents) org-metadown-hook '(org-babel-pop-to-session-maybe) org-list-allow-alphabetical t org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-latex-format-inlinetask-function 'ignore org-confirm-shell-link-function 'yes-or-no-p )
Re: [O] Bug: est+ not working, or perhaps under-documented [8.2.10 (release_8.2.10 @ c:/Users/yhluc00/emacs/share/emacs/24.4/lisp/org/)]
On Tue, Dec 16, 2014 at 11:45 AM, yary wrote: > Below is a buffer that reproduces the issue, load it, > type C-c C-x C-e Apologies, the keypress is "type C-c C-x C-c" to start Column View. -y
Re: [O] Table block help
Aloha Subhan, Subhan Michael Tindall writes: > How does emacs choose what special editor (or if one exists) to call > when running org-edit-special at point? > > I work a lot with data in tables in my org files, and often have > tables hundreds of lines long that are often pasted in ascii and > converted to org tables using C-c | > I generally want the tables to start out folded, which I currently > accomplish by wrapping them in a #+BEGIN_TABLE/#+END_TABLE block Or, #+name: mytable, then TAB on the #+name: line. > I'd love to be able to pop them out into a separate frame for editing > using C-c ' (org-edit-special), remaining in org mode the whole time. > I DON"T want to call the formula editor with C-c ', even if I'm within > the table itself. I could live with this as long as I can jump to > start of line and pop out into a special buffer. > It looks like I should be looking toward org-edit-src-code, but it > does not appear to be easily configurable for new/different language > types. A low tech approach: put the table under its own heading then Subtree to Indirect Buffer, C-c C-x b. hth, Tom > A more advanced solution would be to pop the table out into a > specialized table-editing minor mode, org major mode with some > specialized keybindings to assist in editing the tables. > > Any ideas? Any quick solutions? > > Subhan > > This message is intended for the sole use of the individual and entity > to which it is addressed and may contain information that is > privileged, confidential and exempt from disclosure under applicable > law. If you are not the intended addressee, nor authorized to receive > for the intended addressee, you are hereby notified that you may not > use, copy, disclose or distribute to anyone the message or any > information contained in the message. If you have received this > message in error, please immediately advise the sender by reply email > and delete the message. Thank you. > How does emacs choose what special editor (or if one exists) to call > when running org-edit-special at point? > > I work a lot with data in tables in my org files, and often have > tables hundreds of lines long that are often pasted in ascii and > converted to org tables using C-c | > > I generally want the tables to start out folded, which I currently > accomplish by wrapping them in a #+BEGIN_TABLE/#+END_TABLE block > > I’d love to be able to pop them out into a separate frame for editing > using C-c ‘ (org-edit-special), remaining in org mode the whole time. > > I DON”T want to call the formula editor with C-c ‘, even if I’m within > the table itself. I could live with this as long as I can jump to > start of line and pop out into a special buffer. > > It looks like I should be looking toward org-edit-src-code, but it > does not appear to be easily configurable for new/different language > types. > > A more advanced solution would be to pop the table out into a > specialized table-editing minor mode, org major mode with some > specialized keybindings to assist in editing the tables. > > Any ideas? Any quick solutions? > > Subhan > > This message is intended for the sole use of the individual and entity > to which it is addressed and may contain information that is > privileged, confidential and exempt from disclosure under applicable > law. If you are not the intended addressee, nor authorized to receive > for the intended addressee, you are hereby notified that you may not > use, copy, disclose or distribute to anyone the message or any > information contained in the message. If you have received this > message in error, please immediately advise the sender by reply email > and delete the message. Thank you. -- Thomas S. Dye http://www.tsdye.com
[O] Table block help
How does emacs choose what special editor (or if one exists) to call when running org-edit-special at point? I work a lot with data in tables in my org files, and often have tables hundreds of lines long that are often pasted in ascii and converted to org tables using C-c | I generally want the tables to start out folded, which I currently accomplish by wrapping them in a #+BEGIN_TABLE/#+END_TABLE block I'd love to be able to pop them out into a separate frame for editing using C-c ' (org-edit-special), remaining in org mode the whole time. I DON"T want to call the formula editor with C-c ', even if I'm within the table itself. I could live with this as long as I can jump to start of line and pop out into a special buffer. It looks like I should be looking toward org-edit-src-code, but it does not appear to be easily configurable for new/different language types. A more advanced solution would be to pop the table out into a specialized table-editing minor mode, org major mode with some specialized keybindings to assist in editing the tables. Any ideas? Any quick solutions? Subhan This message is intended for the sole use of the individual and entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you.
Re: [O] Evaluating R source code line by line
Hi, I stand corrected. (Should test before I send...) Here is a reply I received from Ista which -- I think -- did not make it to the list: On Tue, Dec 16, 2014 at 11:32 AM, Andreas Leha wrote: > Hi Vikas, > > > Vikas Rawal writes: >> >> >> >> For your use case, I would suggest adding print() calls in >> strategic >> places in your long-running code, which will appear in the R >> buffer to >> let you know how it’s progressing. >> >> >> >> I don’t quite understand everything you wrote. But this would be >> helpful for my test case. Will use. >> >> Thanks. >> >> Vikas > > I am joining late. I suspect that this can be configured on the ESS > side rather than on orgmode's side. > > Take a look at ess-eval-visibly (but beware the performance loss). I thought so too, but I don't think that's the case. This affects how org-babel behaves with :results output, but not the behavior with :results value. At least that's the case here with org 8.2.10 Running these two examples: #+BEGIN_SRC R :results value :session *R* a <- 1 b <- 2 print(a + b) #+END_SRC #+RESULTS: : 3 #+BEGIN_SRC R :results output :session *R* a <- 1 b <- 2 print(a + b) #+END_SRC #+RESULTS: : [1] 3 I see >> + + [1] 3 >> for the first one and > a <- 1 b <- 2 print(a + b) 'org_babel_R_eoe' a <- 1 > b <- 2 > print(a + b) [1] 3 > 'org_babel_R_eoe' [1] "org_babel_R_eoe" > for the second one. I have ess-eval-visibly set to t. Best, Ista
[O] [html-export question] location with JS.
Hi, For my CV I'm trying to place a box (div, whatever) at the left edge of the content-div. My org-file looks like - year0–year1 :: FooCorp - note1 - note2 {{{BOL(year½)}}} And I want the ouput to look like: year0–year1FooCorp - note1 year½ - note2 In the attached example I have the desired output for LaTeX, and the output for html is also fine *as long as you don't zoom*. The issue is that the javascript that I use absolute position in pixels, and the browser doesn't update the location when zooming... Any ideas on how to solve this? Thanks, Rasmus -- Together we will make the possible totay impossible! test.org Description: Lotus Organizer
Re: [O] can I refile or archive from the agenda without rebuilding?
On 2014-12-15 09:31, Samuel Loury writes: >>> org-agenda-refile takes a NO-UPDATE argument. To set this >>> interactively, you could advise org-agenda-refile (or wrap it in another >>> command). >> >> This is a great suggestion, thanks! It works perfectly. > > For other readers to take advantage of the code, this is my > implementation of the advise. > > (defun my/org-agenda-refile (orig &optional goto rfloc no-update) > (funcall orig goto rfloc t)) > > (add-function :around > (symbol-function 'org-agenda-refile) > #'my/org-agenda-refile) This is how I did it: #+begin_src emacs-lisp (defun as/org-agenda-refile-noupdate (&optional goto rfloc) "Call `org-agenda-refile' with arguments GOTO, RFLOC, and t." (interactive "P") (org-agenda-refile goto rfloc t)) (add-hook 'org-agenda-mode-hook (lambda () (local-set-key (kbd "C-c C-w") 'as/org-agenda-refile-noupdate))) #+end_src I'm curious: is it better to use an advice or to redefine a function? Thanks, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 signature.asc Description: PGP signature
Re: [O] doc patch: move footnote in external links
On 2014-12-13 15:17, Nicolas Goaziou writes: > Also, `org-link-search-must-match-exact-headline' docstring could be > improved: "When nil, the link..." doesn't apply to "*headline" type > paths. As I was writing this, I experimented a little. It seems that, for "*headline" links, the following applies depending on the value of `org-link-search-must-match-exact-headline': - nil: do a substring search on headlines, jump to the first one that matches, fail if no match - t: do an exact search on headlines, fail if no match - 'query-to-create: do an exact search on headlines, propose to create if no match. The one case I'm less sure about is the first one, but this small org file shows it seems to be the case. Try to fool the search: ead * Head 1 Evaluate this: #+begin_src emacs-lisp (setq org-link-search-must-match-exact-headline nil) #+end_src * Head 2 Follow these links [[file:./test2.org::*ead 2]] goes to Head 2 [[file:./test2.org::*ead]] goes to Head 1 [[file:./test2.org::*had]] fails If this is correct, I'll add a footnote accordingly. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 signature.asc Description: PGP signature
[O] org-log-reschedule: inactive time-stamp instead
Hi! I am using org-log-reschedule set to "time" to get LOGBOOK entries when I reschedule a task. This is fine so far. However, I'd like to log *inactive* time-stamps instead of active ones: ,[ what I get now ] | :LOGBOOK: | - Rescheduled from "<2014-12-17 Mi>" on [2014-12-16 Di 17:01] | :END: ` Those active time-stamps clutter my daily agenda a bit. Therefore: ,[ what I would like to get ] | :LOGBOOK: | - Rescheduled from "[2014-12-17 Mi]" on [2014-12-16 Di 17:01] | :END: ` So can someone please add an option for this variable to get inactive time-stamps? Thank you very much! -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
Re: [O] Evaluating R source code line by line
Hi Vikas, Vikas Rawal writes: > > > > For your use case, I would suggest adding print() calls in > strategic > places in your long-running code, which will appear in the R > buffer to > let you know how it’s progressing. > > > > I don’t quite understand everything you wrote. But this would be > helpful for my test case. Will use. > > Thanks. > > Vikas I am joining late. I suspect that this can be configured on the ESS side rather than on orgmode's side. Take a look at ess-eval-visibly (but beware the performance loss). Andreas
Re: [O] [PATCH] Selectively archive by timestamp
On Sat, Dec 13, 2014 at 03:23:34PM +0100, Nicolas Goaziou wrote: > > It's a fairly straightforward one, which simply adds a useful new > > archiving function without touching much else. > > > > Archiving by date seems such an obvious omission from the existing > > archiving commands, I wouldn't have thought this patch was too > > controversial. (Unless someone doesn't like the choice of keybinding, in > > which case by all means change it!) > > Looks good. Could you send it again so I can apply it? Here it is again (attached). Best, Toby -- Dr T. S. Cubitt Royal Society University Research Fellow Fellow of Churchill College, Cambridge Centre for Quantum Information DAMTP, University of Cambridge email: ts...@cantab.net web: www.dr-qubit.org >From 3183bcf9c005a0d5633dcc8be1719e55e3dfa8c5 Mon Sep 17 00:00:00 2001 From: "Toby S. Cubitt" Date: Fri, 17 Jan 2014 15:14:13 + Subject: [PATCH] Add org-archive-all-old to archive entries with timestamps before today. Can be invoked from org-archive-subtree command with double prefix-arg. --- doc/org.texi| 4 lisp/org-archive.el | 68 +++-- 2 files changed, 60 insertions(+), 12 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 7d98d51..d2e61a8 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -7469,6 +7469,10 @@ the archive. To do this, each subtree is checked for open TODO entries. If none are found, the command offers to move it to the archive location. If the cursor is @emph{not} on a headline when this command is invoked, the level 1 trees will be checked. +@orgkey{C-u C-u C-c C-x C-s} +As above, but check subtree for timestamps instead of TODO entries. The +command will offer to archive the subtree if it @emph{does} contain a +timestamp, and that timestamp is in the past. @end table @cindex archive locations diff --git a/lisp/org-archive.el b/lisp/org-archive.el index 700e59b..418af3a 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -198,9 +198,11 @@ The archive can be a certain top-level heading in the current file, or in a different file. The tree will be moved to that location, the subtree heading be marked DONE, and the current time will be added. -When called with prefix argument FIND-DONE, find whole trees without any +When called with a single prefix argument FIND-DONE, find whole trees without any open TODO items and archive them (after getting confirmation from the user). -If the cursor is not at a headline when this command is called, try all level +When called with a double prefix argument, find whole trees with timestamps before +today and archive them (after getting confirmation from the user). +If the cursor is not at a headline when these commands are called, try all level 1 trees. If the cursor is on a headline, only try the direct children of this heading." (interactive "P") @@ -213,8 +215,10 @@ this heading." (org-archive-subtree ,find-done)) org-loop-over-headlines-in-active-region cl (if (outline-invisible-p) (org-end-of-subtree nil t -(if find-done - (org-archive-all-done) +(cond + ((equal find-done '(4)) (org-archive-all-done)) + ((equal find-done '(16)) (org-archive-all-old)) + (t ;; Save all relevant TODO keyword-relatex variables (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler (tr-org-todo-keywords-1 org-todo-keywords-1) @@ -375,7 +379,7 @@ this heading." (message "Subtree archived %s" (if (eq this-buffer buffer) (concat "under heading: " heading) - (concat "in file: " (abbreviate-file-name afile)) + (concat "in file: " (abbreviate-file-name afile))) (org-reveal) (if (looking-at "^[ \t]*$") (outline-next-visible-heading 1 @@ -456,13 +460,50 @@ sibling does not exist, it will be created at the end of the subtree." If the cursor is not on a headline, try all level 1 trees. If it is on a headline, try all direct children. When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag." - (let ((re org-not-done-heading-regexp) re1 - (rea (concat ".*:" org-archive-tag ":")) + (org-archive-all-matches + (lambda (beg end) + (unless (re-search-forward org-not-done-heading-regexp end t) + "no open TODO items")) + tag)) + +(defun org-archive-all-old (&optional tag) + "Archive sublevels of the current tree with timestamps prior to today. +If the cursor is not on a headline, try all level 1 trees. If +it is on a headline, try all direct children. +When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag." + (org-archive-all-matches + (lambda (beg end) + (let (ts) + (and (re-search-forward org-ts-regexp end t) + (setq ts (match-string 0)) + (< (org-time-stamp-to-now ts) 0) + (if (not (looking-at + (concat "--\\(" org-ts-regexp "\\)"))) + (concat "old timestamp " ts) + (setq ts (concat "old timestamp " ts (match-string
Re: [O] getting calc-units working in table formulas
Hi Eric This answers only one of your questions: On Tue, Dec 16, 2014 at 5:21 AM, Eric Abrahamsen wrote: > #+BEGIN_SRC emacs-lisp > (defmath uconvert (expr target-units) > (math-convert-units expr target-units)) > #+END_SRC I would prefer #+BEGIN_SRC emacs-lisp (defmath uconv (expr target-units &optional pure) (math-convert-units expr target-units pure)) #+END_SRC > | km| ft | > |---+-| > | 2.5km | uconvert(2.5 km ft) | > #+TBLFM: $2=uconvert($1 ft) Calc syntax uses comma to separate the function arguments, see examples in e. g. http://orgmode.org/manual/Formula-syntax-for-Calc.html | km | ft | |+--| | 2.5 km | 8202.0997 ft | #+TBLFM: $2 = uconv($1, ft) Btw, to have the units only in the column header: | km |ft | |-+---| | 2.5 | 8202.0997 | #+TBLFM: $2 = uconv($1 * @<$1, @<$2, t) The same without a user's defmath: | km |ft | |-+---| | 2.5 | 8202.0997 | #+TBLFM: $2 = usimplify($1 * @<$1 / @<$2) Michael
[O] [ox-html, patch] trim contents on list-items
Hi, I use CSS to make inlined lists in html: #text-sec ul {margin: 0; padding: 0; list-style: none;} #text-sec li {display: inline;} #text-sec li:after {content: ", ";} #text-sec li:last-child:after {content: "";} However, since (list-)items are formatted like whatever CSS adds a spurious space in front of my comma... Anybody feel strongly in favor of keeping this newline? Or can I push this patch? —Rasmus -- C is for Cookie >From c990d10b6a649e169ad6bfae61063b597d735771 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Tue, 16 Dec 2014 13:49:08 +0100 Subject: [PATCH] ox-html.el: Trim list items * ox-html.el (org-html-format-list-item): Trim contents to avoid spurious space. --- lisp/ox-html.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 178642d..82073dd 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2508,7 +2508,7 @@ INFO is a plist holding contextual information. See class (concat checkbox term)) "" (unless (eq type 'descriptive) checkbox) - contents + (org-trim contents) (case type (ordered "") (unordered "") -- 2.1.3
Re: [O] How to show/hide the snippet block in org-babel when the cursor is inside the snippet text
Hi Dmitry, > I would like to implement the following. Suppose, we have this org file: > > #+BABEL: :cache yes :tangle yes :noweb yes > > #+NAME: top_block > #+begin_src perl :tangle "test.pl" :noweb tangle :shebang #!/usr/bin/perl > use strict; > use warnings; > > open(my $fh, "<", "test.txt") > or die "cannot open < file name: $!"; > <> > close($fh); > #+end_src > > #+NAME: output-all > #+begin_src perl > while (my $line = <$fh>) { > print $line; > } > #+end_src > > I can expand/collapse src blocks only when the cursor is on the top lines: > > > #+NAME: top_block > #+begin_src perl ... > > But when it is inside any text in the scr block, expand/collapse doesn't > work. How can I add this functionality as moving the cursor every time is > not nice. There's a feature like this in https://github.com/abo-abo/worf (installable also from MELPA). If you're in a source block, "[" will bring you to its start, and "i" will hide/unhide it. You can use "j"/"k"/"i" to quickly navigate and fold many source blocks within one heading. regards, Oleh
[O] How to show/hide the snippet block in org-babel when the cursor is inside the snippet text
I would like to implement the following. Suppose, we have this org file: #+BABEL: :cache yes :tangle yes :noweb yes #+NAME: top_block#+begin_src perl :tangle "test.pl" :noweb tangle :shebang #!/usr/bin/perl use strict; use warnings; open(my $fh, "<", "test.txt") or die "cannot open < file name: $!"; <> close($fh);#+end_src #+NAME: output-all#+begin_src perl while (my $line = <$fh>) { print $line; }#+end_src I can expand/collapse src blocks only when the cursor is on the top lines: #+NAME: top_block#+begin_src perl ... But when it is inside any text in the scr block, expand/collapse doesn't work. How can I add this functionality as moving the cursor every time is not nice.
Re: [O] [RFC] Display most recent log item in Agenda
Eric Abrahamsen writes: > I thought that's what `org-log-beginning' was for: finding where the > log-note list would be (drawer or no), if it exists. Not exactly. It finds where the next note is to be inserted. This may not be in front of the log-note list even if it exists (e.g., if `org-log-states-order-reversed' is nil you may end up in front of the following paragraph). > If users aren't using `org-log-into-drawer', `org-log-beginning' > should still go to the spot where the list would be, right? Not necessarily. It actually doesn't look for such a list. It could end up after the list (see above) or even in a different location (see below). Also, it doesn't tell if there is a list at all, so if you rely on it, you need to double-check if you really are close to a log-note. Unfortunately, recognizing a log note is impossible, since it is a regular plain list. Contents change, and templates are customizables (see `org-log-note-headings'). See, for example, the hack in `org-skip-over-state-notes'. > Then, if there's a list there, I take the first or last note (depending > on log-state-notes-reversed). > > I don't know why the notes would be scattered across the section... Because in this case, the list is not necessarily re-used. The first note is inserted after planning info and properties drawer. If, later, you insert some text before it, logging process will create a new list above, and so on. E.g., Step 1: * Headline - Note 1 Step 2: * Headline Some text - Note 1 Step 3: * Headline - Note 2 Some text - Note 1 Regards,