emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [gnorb] completion for `gnorb-gnus-incoming-do-todo'


From: Eric Abrahamsen
Subject: Re: [O] [gnorb] completion for `gnorb-gnus-incoming-do-todo'
Date: Mon, 17 Aug 2015 15:01:42 +0800
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Thomas Holst <address@hidden> writes:

> ยท Eric Abrahamsen <address@hidden> wrote:
>
>>>
>>> [ ... snip ... ]
>>>
>>> [ ... snip completion issue with gnorb ... ]
>>

[...]

> ok here is what I did to reproduce behavior with ECM

All right, now that's a bug report!

I followed your steps, and can confirm the same behavior. Unfortunately,
I don't really understand what's going on, and don't have time to dive
into helm's guts at the moment.

Using these exact same settings, but loading helm from the package
manager instead of the git repo, everything works just fine. Would you
consider shifting to use the packaged version of helm (which I can't
believe lags the git repo by more than a couple of days) instead?

Yours,
Eric

>   emacs -Q -l "minimal.el"
>
> with minimal.el:
>
> #+begin_src emacs_lisp
>   ;; minimal.el to test org-refile helm
>   ;; most recent org-mode from git
>   (add-to-list 'load-path "/home/thommy/git-emacs/org-mode/lisp")
>
>   (require 'org)
>
>   (setq org-use-speed-commands t) ;; `g' on begining of heading calls 
> `(org-refile t)'
>   (setq org-refile-use-outline-path 'file)
>
>   (find-file "/home/thommy/git-emacs/gnorb/gnorb.org") ;; just any org-file 
> works
>
>
>   ;; most recent helm from git
>   (add-to-list 'load-path "~/git-emacs/helm")
>   (require 'helm-config)
>   (helm-mode 1)
> #+end_src
>
> Now when I hit `g' at begining of a headline I get "gnorb.org" as a
> candidate for first step. But no key (<TAB>, C - i, C - z) does
> completion. If I hit <RET> with partial or complete input for first step
> (e.g. "gn" or "gnorb.org") I get an error:
>
>   progn: Wrong type argument: integer-or-marker-p, nil
>
> Backtrace:
>
> Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
>   goto-char(nil)
>   (progn (org-pop-to-buffer-same-window nbuf) (goto-char pos) 
> (org-show-context (quote org-goto)))
>   (if (and arg (not (equal arg 3))) (progn
> (org-pop-to-buffer-same-window nbuf) (goto-char pos) (org-show-context
> (quote org-goto))) (if regionp (progn (org-kill-new (buffer-substring
> region-start region-end)) (org-save-markers-in-region region-start
> region-end)) (org-copy-subtree 1 nil t)) (save-current-buffer
> (set-buffer (setq nbuf (or (find-buffer-visiting file)
> (find-file-noselect file)))) (setq reversed
> (org-notes-order-reversed-p)) (save-excursion (save-restriction
> (widen) (if pos (progn (goto-char pos) (looking-at org-outline-regexp)
> (setq level (org-get-valid-level ... 1)) (goto-char (if reversed ...
> ...))) (setq level 1) (if (not reversed) (goto-char (point-max))
> (goto-char (point-min)) (or (outline-next-heading) (goto-char ...))))
> (if (not (bolp)) (newline)) (org-paste-subtree level nil nil t) (if
> org-log-refile (progn (org-add-log-setup (quote refile) nil nil (quote
> findpos) org-log-refile) (if (eq org-log-refile ...) nil
> (save-excursion ...)))) (and org-auto-align-tags (let
> ((org-loop-over-headlines-in-active-region nil)) (org-set-tags nil
> t))) (let ((bookmark-name (plist-get org-bookmark-names-plist
> :last-refile))) (if bookmark-name (progn (condition-case err ...
> ...)))) (if (and (boundp (quote org-refile-for-capture))
> org-refile-for-capture) (progn (let (...) (if bookmark-name ...))
> (move-marker org-capture-last-stored-marker (point)))) (if (fboundp
> (quote deactivate-mark)) (deactivate-mark)) (run-hooks (quote
> org-after-refile-insert-hook))))) (if org-refile-keep nil (if regionp
> (delete-region (point) (+ (point) (- region-end region-start)))
> (delete-region (and (org-back-to-heading t) (point)) (min (1+
> (buffer-size)) (org-end-of-subtree t t) (point))))) (if (featurep
> (quote org-inlinetask)) (progn (org-inlinetask-remove-END-maybe)))
> (setq org-markers-to-move nil) (message (concat actionmsg " to \"%s\"
> in file %s: done") (car it) file))
>   (progn (setq file (nth 1 it) re (nth 2 it) pos (nth 3 it)) (if (and
> (not arg) pos (equal (buffer-file-name) file) (if regionp (and (>= pos
> region-start) (<= pos region-end)) (and (>= pos (point)) (< pos
> (save-excursion (org-end-of-subtree t t)))))) (error "Cannot refile to
> position inside the tree or region")) (setq nbuf (or
> (find-buffer-visiting file) (find-file-noselect file))) (if (and arg
> (not (equal arg 3))) (progn (org-pop-to-buffer-same-window nbuf)
> (goto-char pos) (org-show-context (quote org-goto))) (if regionp
> (progn (org-kill-new (buffer-substring region-start region-end))
> (org-save-markers-in-region region-start region-end))
> (org-copy-subtree 1 nil t)) (save-current-buffer (set-buffer (setq
> nbuf (or (find-buffer-visiting file) (find-file-noselect file))))
> (setq reversed (org-notes-order-reversed-p)) (save-excursion
> (save-restriction (widen) (if pos (progn (goto-char pos) (looking-at
> org-outline-regexp) (setq level ...) (goto-char ...)) (setq level 1)
> (if (not reversed) (goto-char ...) (goto-char ...) (or ... ...))) (if
> (not (bolp)) (newline)) (org-paste-subtree level nil nil t) (if
> org-log-refile (progn (org-add-log-setup ... nil nil ...
> org-log-refile) (if ... nil ...))) (and org-auto-align-tags (let (...)
> (org-set-tags nil t))) (let ((bookmark-name ...)) (if bookmark-name
> (progn ...))) (if (and (boundp ...) org-refile-for-capture) (progn
> (let ... ...) (move-marker org-capture-last-stored-marker ...))) (if
> (fboundp (quote deactivate-mark)) (deactivate-mark)) (run-hooks (quote
> org-after-refile-insert-hook))))) (if org-refile-keep nil (if regionp
> (delete-region (point) (+ (point) (- region-end region-start)))
> (delete-region (and (org-back-to-heading t) (point)) (min (1+
> (buffer-size)) (org-end-of-subtree t t) (point))))) (if (featurep
> (quote org-inlinetask)) (progn (org-inlinetask-remove-END-maybe)))
> (setq org-markers-to-move nil) (message (concat actionmsg " to \"%s\"
> in file %s: done") (car it) file)))
>   (if (or (and (equal arg 2) org-clock-hd-marker (marker-buffer
> org-clock-hd-marker) (prog1 (setq it (list (or org-clock-heading
> "running clock") (buffer-file-name (marker-buffer
> org-clock-hd-marker)) "" (marker-position org-clock-hd-marker))) (setq
> arg nil))) (setq it (or rfloc (let (heading-text) (save-excursion (if
> (and arg ...) nil (org-back-to-heading t) (setq heading-text ...))
> (org-refile-get-location (cond ... ... ...) default-buffer (and ...
> org-refile-allow-creating-parent-nodes) arg)))))) (progn (setq file
> (nth 1 it) re (nth 2 it) pos (nth 3 it)) (if (and (not arg) pos (equal
> (buffer-file-name) file) (if regionp (and (>= pos region-start) (<=
> pos region-end)) (and (>= pos (point)) (< pos (save-excursion ...)))))
> (error "Cannot refile to position inside the tree or region")) (setq
> nbuf (or (find-buffer-visiting file) (find-file-noselect file))) (if
> (and arg (not (equal arg 3))) (progn (org-pop-to-buffer-same-window
> nbuf) (goto-char pos) (org-show-context (quote org-goto))) (if regionp
> (progn (org-kill-new (buffer-substring region-start region-end))
> (org-save-markers-in-region region-start region-end))
> (org-copy-subtree 1 nil t)) (save-current-buffer (set-buffer (setq
> nbuf (or (find-buffer-visiting file) (find-file-noselect file))))
> (setq reversed (org-notes-order-reversed-p)) (save-excursion
> (save-restriction (widen) (if pos (progn ... ... ... ...) (setq level
> 1) (if ... ... ... ...)) (if (not ...) (newline)) (org-paste-subtree
> level nil nil t) (if org-log-refile (progn ... ...)) (and
> org-auto-align-tags (let ... ...)) (let (...) (if bookmark-name ...))
> (if (and ... org-refile-for-capture) (progn ... ...)) (if (fboundp
> ...) (deactivate-mark)) (run-hooks (quote
> org-after-refile-insert-hook))))) (if org-refile-keep nil (if regionp
> (delete-region (point) (+ (point) (- region-end region-start)))
> (delete-region (and (org-back-to-heading t) (point)) (min (1+ ...)
> (org-end-of-subtree t t) (point))))) (if (featurep (quote
> org-inlinetask)) (progn (org-inlinetask-remove-END-maybe))) (setq
> org-markers-to-move nil) (message (concat actionmsg " to \"%s\" in
> file %s: done") (car it) file))))
>   (if (equal arg (quote (16))) (org-refile-goto-last-stored) (if (or
> (and (equal arg 2) org-clock-hd-marker (marker-buffer
> org-clock-hd-marker) (prog1 (setq it (list (or org-clock-heading
> "running clock") (buffer-file-name ...) "" (marker-position
> org-clock-hd-marker))) (setq arg nil))) (setq it (or rfloc (let
> (heading-text) (save-excursion (if ... nil ... ...)
> (org-refile-get-location ... default-buffer ... arg)))))) (progn (setq
> file (nth 1 it) re (nth 2 it) pos (nth 3 it)) (if (and (not arg) pos
> (equal (buffer-file-name) file) (if regionp (and (>= pos region-start)
> (<= pos region-end)) (and (>= pos ...) (< pos ...)))) (error "Cannot
> refile to position inside the tree or region")) (setq nbuf (or
> (find-buffer-visiting file) (find-file-noselect file))) (if (and arg
> (not (equal arg 3))) (progn (org-pop-to-buffer-same-window nbuf)
> (goto-char pos) (org-show-context (quote org-goto))) (if regionp
> (progn (org-kill-new (buffer-substring region-start region-end))
> (org-save-markers-in-region region-start region-end))
> (org-copy-subtree 1 nil t)) (save-current-buffer (set-buffer (setq
> nbuf (or ... ...))) (setq reversed (org-notes-order-reversed-p))
> (save-excursion (save-restriction (widen) (if pos ... ... ...) (if ...
> ...) (org-paste-subtree level nil nil t) (if org-log-refile ...) (and
> org-auto-align-tags ...) (let ... ...) (if ... ...) (if ... ...)
> (run-hooks ...)))) (if org-refile-keep nil (if regionp (delete-region
> (point) (+ ... ...)) (delete-region (and ... ...) (min ... ... ...))))
> (if (featurep (quote org-inlinetask)) (progn
> (org-inlinetask-remove-END-maybe))) (setq org-markers-to-move nil)
> (message (concat actionmsg " to \"%s\" in file %s: done") (car it)
> file)))))
>   (let* ((actionmsg (cond (msg msg) ((equal arg 3) "Refile (and
> keep)") (t "Refile"))) (cbuf (current-buffer)) (regionp
> (org-region-active-p)) (region-start (and regionp (region-beginning)))
> (region-end (and regionp (region-end))) (filename (buffer-file-name
> (buffer-base-buffer cbuf))) (org-refile-keep (if (equal arg 3) t
> org-refile-keep)) pos it nbuf file re level reversed) (setq
> last-command nil) (if regionp (progn (goto-char region-start) (or
> (bolp) (goto-char (point-at-bol))) (setq region-start (point)) (if (or
> (org-kill-is-subtree-p (buffer-substring region-start region-end))
> (prog1 org-refile-active-region-within-subtree (let (...)
> (org-toggle-heading) (setq region-end ...)))) nil (user-error "The
> region is not a (sequence of) subtree(s)")))) (if (equal arg (quote
> (16))) (org-refile-goto-last-stored) (if (or (and (equal arg 2)
> org-clock-hd-marker (marker-buffer org-clock-hd-marker) (prog1 (setq
> it (list ... ... "" ...)) (setq arg nil))) (setq it (or rfloc (let
> (heading-text) (save-excursion ... ...))))) (progn (setq file (nth 1
> it) re (nth 2 it) pos (nth 3 it)) (if (and (not arg) pos (equal
> (buffer-file-name) file) (if regionp (and ... ...) (and ... ...)))
> (error "Cannot refile to position inside the tree or region")) (setq
> nbuf (or (find-buffer-visiting file) (find-file-noselect file))) (if
> (and arg (not (equal arg 3))) (progn (org-pop-to-buffer-same-window
> nbuf) (goto-char pos) (org-show-context (quote org-goto))) (if regionp
> (progn (org-kill-new ...) (org-save-markers-in-region region-start
> region-end)) (org-copy-subtree 1 nil t)) (save-current-buffer
> (set-buffer (setq nbuf ...)) (setq reversed
> (org-notes-order-reversed-p)) (save-excursion (save-restriction ...
> ... ... ... ... ... ... ... ... ...))) (if org-refile-keep nil (if
> regionp (delete-region ... ...) (delete-region ... ...))) (if
> (featurep (quote org-inlinetask)) (progn
> (org-inlinetask-remove-END-maybe))) (setq org-markers-to-move nil)
> (message (concat actionmsg " to \"%s\" in file %s: done") (car it)
> file))))))
>   (if (member arg (quote (0 (64)))) (org-refile-cache-clear) (let*
> ((actionmsg (cond (msg msg) ((equal arg 3) "Refile (and keep)") (t
> "Refile"))) (cbuf (current-buffer)) (regionp (org-region-active-p))
> (region-start (and regionp (region-beginning))) (region-end (and
> regionp (region-end))) (filename (buffer-file-name (buffer-base-buffer
> cbuf))) (org-refile-keep (if (equal arg 3) t org-refile-keep)) pos it
> nbuf file re level reversed) (setq last-command nil) (if regionp
> (progn (goto-char region-start) (or (bolp) (goto-char (point-at-bol)))
> (setq region-start (point)) (if (or (org-kill-is-subtree-p
> (buffer-substring region-start region-end)) (prog1
> org-refile-active-region-within-subtree (let ... ... ...))) nil
> (user-error "The region is not a (sequence of) subtree(s)")))) (if
> (equal arg (quote (16))) (org-refile-goto-last-stored) (if (or (and
> (equal arg 2) org-clock-hd-marker (marker-buffer org-clock-hd-marker)
> (prog1 (setq it ...) (setq arg nil))) (setq it (or rfloc (let ...
> ...)))) (progn (setq file (nth 1 it) re (nth 2 it) pos (nth 3 it)) (if
> (and (not arg) pos (equal ... file) (if regionp ... ...)) (error
> "Cannot refile to position inside the tree or region")) (setq nbuf (or
> (find-buffer-visiting file) (find-file-noselect file))) (if (and arg
> (not ...)) (progn (org-pop-to-buffer-same-window nbuf) (goto-char pos)
> (org-show-context ...)) (if regionp (progn ... ...) (org-copy-subtree
> 1 nil t)) (save-current-buffer (set-buffer ...) (setq reversed ...)
> (save-excursion ...)) (if org-refile-keep nil (if regionp ... ...))
> (if (featurep ...) (progn ...)) (setq org-markers-to-move nil)
> (message (concat actionmsg " to \"%s\" in file %s: done") (car it)
> file)))))))
>   org-refile(t)
>   eval((org-refile t))
>   (cond ((commandp org-speed-command) (setq this-command
> org-speed-command) (call-interactively org-speed-command)) ((functionp
> org-speed-command) (funcall org-speed-command)) ((and
> org-speed-command (listp org-speed-command)) (eval org-speed-command))
> (t (let (org-use-speed-commands) (call-interactively (quote
> org-self-insert-command)))))
>   (cond ((and org-use-speed-commands (let ((kv
> (this-command-keys-vector))) (setq org-speed-command
> (run-hook-with-args-until-success (quote org-speed-command-hook)
> (make-string 1 (aref kv ...)))))) (cond ((commandp org-speed-command)
> (setq this-command org-speed-command) (call-interactively
> org-speed-command)) ((functionp org-speed-command) (funcall
> org-speed-command)) ((and org-speed-command (listp org-speed-command))
> (eval org-speed-command)) (t (let (org-use-speed-commands)
> (call-interactively (quote org-self-insert-command)))))) ((and
> (org-table-p) (progn (and (featurep (quote org-table))
> org-table-auto-blank-field (memq last-command (quote (org-cycle
> org-return org-shifttab org-ctrl-c-ctrl-c))) (if (or (equal ... 32)
> (looking-at "[^|\n]* |")) (let (org-table-may-need-update)
> (org-table-blank-field)) (org-table-blank-field))) t) (eq N 1)
> (looking-at "[^|\n]* |")) (let (org-table-may-need-update) (goto-char
> (1- (match-end 0))) (backward-delete-char 1) (goto-char
> (match-beginning 0)) (self-insert-command N))) (t (setq
> org-table-may-need-update t) (self-insert-command N)
> (org-fix-tags-on-the-fly) (if org-self-insert-cluster-for-undo (if
> (not (eq last-command (quote org-self-insert-command))) (setq
> org-self-insert-command-undo-counter 1) (if (>=
> org-self-insert-command-undo-counter 20) (setq
> org-self-insert-command-undo-counter 1) (and (>
> org-self-insert-command-undo-counter 0) buffer-undo-list (listp
> buffer-undo-list) (not (cadr buffer-undo-list)) (setcdr
> buffer-undo-list (cddr buffer-undo-list))) (setq
> org-self-insert-command-undo-counter (1+
> org-self-insert-command-undo-counter)))))))
>   org-self-insert-command(1)
>   call-interactively(org-self-insert-command nil nil)
>   command-execute(org-self-insert-command)
>
>
> Same happens if I open two org-files and set `org-refile-targets'
> accordingly.
>
> Thanks for looking into this - although it has nothing to do with gnorb.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]