[O] Bug: Remote column editing from agenda is broken [9.1.1 (9.1.1-6-gd40deb-elpa @ /Users/bnbeckwith/.emacs.d/elpa/org-20170925/)]
Given a list of agenda files, I can bring up a global view of all tasks. Then, if I enter into column mode and try to edit one of the columns (say priority), it complains about the marker. My config is the minimal one found on http://orgmode.org/manual/Feedback.html. The agenda file I used is very simple. --8<---cut here---start->8--- * TODO One * TODO Two * TODO Three --8<---cut here---end--->8--- I then add this to the agenda file list. And then use 'org-agenda' followed by 't' to bring up a list of all todo items. I enter into column mode and place my cursor into the PRIORITY column. When I try to press '1' to change the priority, I get the following stack trace. The stack trace is: --8<---cut here---start->8--- Debugger entered--Lisp error: (wrong-type-argument markerp nil) org-columns-remove-overlays() org-agenda-columns() org-columns-next-allowed-value(nil 1) (lambda nil (interactive) (org-columns-next-allowed-value nil 1))() funcall-interactively((lambda nil (interactive) (org-columns-next-allowed-value nil 1))) call-interactively((lambda nil (interactive) (org-columns-next-allowed-value nil 1)) nil nil) command-execute((lambda nil (interactive) (org-columns-next-allowed-value nil 1))) --8<---cut here---end--->8--- It seems that in `org-columns-remove-overlays` the `org-columns-top-level-marker` is nil, so the `set-marker` call fails. I'm not sure of the underlying mechanics of how the markers work, but mabye a nil check here would suffice? Emacs : GNU Emacs 25.3.1 (x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29)) of 2017-09-15 Package: Org mode version 9.1.1 (9.1.1-6-gd40deb-elpa @ /Users/bnbeckwith/.emacs.d/elpa/org-20170925/) current state: == (setq org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-shell-link-function 'yes-or-no-p org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-block-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("id" :follow org-id-open) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs") ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link) ("file" :complete org-file-complete-link) ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path ("help" :follow org--open-help-link) ("http" :follow (lambda (path) (browse-url (concat
[O] [PATCH] Columnview: Fix the case of #+ content present
* lisp/org-colview.el (org-dblock-write:columnview): Change the capture of pos to after inserting the original content The problem is with a block that has content preceding the table. Upon recreating the content, the `pos' gets set to the beginning of this content instead of the table. Later calls to `org-table-recalculate' or `org-table-align' will fail because the point is not at a table. This patch moves the capture of `pos' to right before the insertion of the table. TINYCHANGE --- lisp/org-colview.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index f3b8e42..8790ad4 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -1306,10 +1306,10 @@ PARAMS is a property list of parameters: (if (eq 'hline x) x (cons "" x))) tbl)) (setq tbl (append tbl (list (cons "/" (make-list nfields "<>")) - (setq pos (point)) (when content-lines (while (string-match "^#" (car content-lines)) (insert (pop content-lines) "\n"))) + (setq pos (point)) (insert (org-listtable-to-string tbl)) (when (plist-get params :width) (insert "\n|" (mapconcat (lambda (x) (format "<%d>" (max 3 x))) -- 1.8.1.2
[O] Field coordinates and moving averages
I'm trying to create a table of periodic data and calculate a moving average in an adjacent column. I was trying to use field coordinates, but they do not work how I would like them to work. Here is what I have for a 5-day moving average: | Daily Data | Moving Average | |+| | 10 || | 11 || | 12 || | 13 || | 14 || | 14 || | 16 || #+TBLFM: $2=if(@# >=7, vmean(@-5$1..@0$1),string("")); I expeced the if(@# >=7..) to protect the sub-clauses from executing unless the predicate is true. However, that is not the case. When I try to execute this formula, I receive the error: "Row descriptor -5 used in line ### leads outside table". I can see how this is true if the ranges are checked for every entry. Is there a better way for me to write this column forumla? Is this a limitation in the field coordinates? Thanks, Ben
Re: [Orgmode] Re: Context-sensitive word count in org mode (elisp)
> Nice. How hard would it be to make it org-aware (i.e. don't count > syntactic elements in an org buffer)? I use the how-many function to get the search. I'm not sure off the top of my head, but there would be some rework required to make it work properly and ignore those items. I'll gladly accept any ideas or patches into my code to make it org-friendly. -Ben ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Context-sensitive word count in org mode (elisp)
Hi Paul, I have a small emacs project that creates a word-count mode and function for use. It currently does not ignore sections like your proposal, but I think that would be interesting functionality. Mine does keep a running tally of adds/delete in the mode line. It also lets you set a goal and provides a visual indication when that goal is met -- I believe that this feature may be of interest to you. You can find it at: https://github.com/bnbeckwith/wc-mode Regards, Ben ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: How to customize the org-mode's BEGIN_SRC HTML output
Eric, I should mention that I am using the "Syntaxhighlighter Evolved" plugin for Wordpress. It allows shortcodes with just the language name. I probably should use the [sourcecode lang="..."] variant instead. Maybe that is why my version did not work for you? My latest page created with my code can be found at: http://bnbeckwith.com/index.php/writegood-mode/ As for the linebreaks, in my haste to share I forgot that I was advising the org2blog-strip-newlines function. Which effectively keeps all line breaks. -- (defadvice org2blog-strip-new-lines (around bnb/org2blog-disable-newline-removal) "Disables the function the removes newlines from the generated HTML" (setq ad-return-value (ad-get-arg 0))) -- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: How to customize the org-mode's BEGIN_SRC HTML output
Rafael, I had my shortcodes setup to accept the language directly. Your change should work as you indicated. I have an additional fix to my code that should behave better for you. I add a property, org-protected, that prevents processing of the text. I tried it on your code blocks by calling org-export directly (C-c C-e) and then choosing 'H' to see the html in a buffer. This really helps with debug. Fixed code follows (defun bnb/org2blog-src-blocks-to-wp-syntaxhighlighter () "Export #+BEGIN_SRC blocks as Wordpress Syntaxhighlighter tags. There is a special header option, :syntaxhl that contains the options to pass to syntaxhighlighter. This is intended to be added to `org-export-preprocess-hooks'" (interactive) (save-window-excursion (let ((case-fold-search t) (colon-re "^[ \t]*:\\([ \t]\\|$\\)") lang body headers syntaxhl block beg) (goto-char (point-min)) (while (re-search-forward colon-re nil t) (replace-match (match-string 1)) (beginning-of-line 1) (insert "[text light=\"true\"]\n") (setq beg (point)) (while (looking-at colon-re) (replace-match (match-string 1)) (end-of-line 1) (or (eobp) (forward-char 1))) (end-of-line 1) (add-text-properties beg (if (bolp) (1- (point)) (point)) '(org-protected t)) (insert "\n[/text]")) (unless (boundp 'org-babel-src-block-regexp) (require 'ob)) (while (re-search-forward (concat "\\(" org-babel-src-block-regexp "\\|" org-babel-inline-src-block-regexp "\\)") nil t) (setq lang (match-string-no-properties 3)) (if (string-match "-" lang) (error "SyntaxHighlighter does not support languages with '-' in the names")) (setq headers (match-string-no-properties 5)) (setq body (match-string-no-properties 6)) (save-match-data (setq syntaxhl (if (string-match ":syntaxhl[ ]+\\([^ ]+\\)" headers) (concat " " (replace-regexp-in-string "\;" " " (match-string 1 headers)) (setq block (concat "\n\n[" lang syntaxhl "]\n" body "[/" lang "]\n")) (add-text-properties 0 (length block) '(org-protected t) block) (replace-match block nil t) -- I also remembered that I made the following setting as well, but I do not know if I still need it. (setq org-export-preprocess-hook (list 'bnb/org2blog-src-blocks-to-wp-syntaxhighlighter 'org-export-blocks-preprocess)) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: How to customize the org-mode's BEGIN_SRC HTML output
Hi, I also was interested in posting these blocks (through org2blog in wordpress). The code I posted below is added to 'org-export-preprocess-hooks' where it looks for BEGIN_SRC blocks as well as ':' blocks of code. In the case of BEGIN_SRC blocks, I add a header option, :syntaxhl where I can pass in additional settings to the syntaxhighlighter code. The code below uses Wordpress shortcodes, but I am sure that you can adapt for your own purposes. (defun bnb/org2blog-src-blocks-to-wp-syntaxhighlighter () "Export #+BEGIN_SRC blocks as Wordpress Syntaxhighlighter tags. There is a special header option, :syntaxhl that contains the options to pass to syntaxhighlighter. This is intended to be added to `org-export-preprocess-hooks'" (interactive) (save-window-excursion (let ((case-fold-search t) (colon-re "^[ \t]*:\\([ \t]\\|$\\)") lang body headers syntaxhl beg) (goto-char (point-min)) (while (re-search-forward colon-re nil t) (replace-match (match-string 1)) (beginning-of-line 1) (insert "[text light=\"true\"]\n") (setq beg (point)) (while (looking-at colon-re) (replace-match (match-string 1)) (end-of-line 1) (or (eobp) (forward-char 1))) (end-of-line 1) (add-text-properties beg (if (bolp) (1- (point)) (point)) '(org-protected t)) (insert "\n[/text]")) (unless (boundp 'org-babel-src-block-regexp) (require 'ob)) (while (re-search-forward (concat "\\(" org-babel-src-block-regexp "\\|" org-babel-inline-src-block-regexp "\\)") nil t) (setq lang (match-string-no-properties 3)) (if (string-match "-" lang) (error "SyntaxHighlighter does not support languages with '-' in the names")) (setq headers (match-string-no-properties 5)) (setq body (match-string-no-properties 6)) (save-match-data (setq syntaxhl (if (string-match ":syntaxhl[ ]+\\([^ ]+\\)" headers) (concat " " (replace-regexp-in-string "\;" " " (match-string 1 headers)) (replace-match (concat "\n\n[" lang syntaxhl "]\n" body "[/" lang "]\n") nil t) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Issue with correctly resuming interrupted timer
I have an issue with my particular setup when using org-capture. Here is my relevant capture template: (setq org-capture-templates '(("t" "todo" entry (file "~/Documents/Org/Refile.org") "* TODO %?\n %U\n %a" :clock-in t :clock-resume t)) I have all tasks go to the file Refile.org as shown above. They are are first-level TODOs. Say I have a list of tasks such as * TODO A (Currently clocked in) * TODO B * TODO C Also let the point be on the task B line. Now if I call org-capture and store a task, B become the task that get clocked in after completing the capture. Which gives me: * TODO A * TODO B (Now clocked in) * TODO C * TODO New Capture I believe that the issue is within org-capture-finalize and the call to org-with-point-at, but I have exceeded my elisp debugging skills and need help. I am using the very latest org-mode master with emacs 23.1 on windows. Any ideas? ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode