Re: [O] org-return does not work in magit's git-commit-setup-hook

2018-03-18 Thread kadal

OK. Thanks. I've switched to Orgalist.

On 03/17/2018 02:21 AM, Nicolas Goaziou wrote:

Hello,

kadal  writes:


I have the line (add-hook 'git-commit-setup-hook 'orgstruct++-mode)
but (org-return) does not work when edting the commit message.


`orgstruct-mode' does not exist anymore in master branch (i.e., yet to
be released Org 9.2). I suggest to just remove this hook.

Regards,






Re: [O] org-return does not work in magit's git-commit-setup-hook

2018-03-17 Thread Nicolas Goaziou
Hello,

kadal  writes:

> I have the line (add-hook 'git-commit-setup-hook 'orgstruct++-mode)
> but (org-return) does not work when edting the commit message.

`orgstruct-mode' does not exist anymore in master branch (i.e., yet to
be released Org 9.2). I suggest to just remove this hook.

Regards,

-- 
Nicolas Goaziou



[O] org-return does not work in magit's git-commit-setup-hook

2018-03-15 Thread kadal
I have the line (add-hook 'git-commit-setup-hook 'orgstruct++-mode) but 
(org-return) does not work when edting the commit message.


This is the backtrace:

"Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  org-return()
  (cond ((eq 'line-break (car (org-element-context))) 
(org-return-indent)) ((or (and (eq 'link (car (org-element-context))) 
(not (eolp))) (bolp)) (org-return)) ((org-inlinetask-in-task-p) 
(org-return)) ((org-at-item-checkbox-p) (cond ((and (eolp) (not (eq 
'item (car (org-element-context) (org-insert-todo-heading nil)) 
((and (eolp) (eq 'item (car (org-element-context (let* ((v 
(line-beginning-position)) (v (point))) (cl--set-buffer-substring v v 
""))) ((eq 'paragraph (car (org-element-context))) (goto-char 
(org-element-property :end (org-element-context))) 
(org-insert-todo-heading nil)) (t (org-return ((org-in-item-p) (cond 
((and (looking-at " ::") (looking-back "- " 3)) (beginning-of-line) 
(delete-region (line-beginning-position) (line-end-position))) ((and 
(looking-at "$") (looking-back "- " 3)) (beginning-of-line) 
(delete-region (line-beginning-position) (line-end-position))) ((and 
(looking-at "$") (looking-back "[0-9]*. " (line-beginning-position))) 
(beginning-of-line) (delete-region (line-beginning-position) 
(line-end-position))) (t (end-of-line) (org-insert-item 
((org-at-heading-p) (if (not (string= "" (org-element-property :title 
(org-element-context (progn (org-end-of-subtree) 
(org-insert-heading-respect-content) (outline-show-entry)) 
(beginning-of-line) (let* ((v (line-beginning-position)) (v 
(line-end-position))) (cl--set-buffer-substring v v "" 
((org-at-table-p) (if (-any\? (function (lambda (x) (not (string= "" 
x (nth (- (org-table-current-dline) 1) (remove 'hline 
(org-table-to-lisp (org-return) (beginning-of-line) (let* ((v 
(line-beginning-position)) (v (line-end-position))) 
(cl--set-buffer-substring v v "")) (org-return))) (t (org-return)))
  (if ignore (org-return) (cond ((eq 'line-break (car 
(org-element-context))) (org-return-indent)) ((or (and (eq 'link (car 
(org-element-context))) (not (eolp))) (bolp)) (org-return)) 
((org-inlinetask-in-task-p) (org-return)) ((org-at-item-checkbox-p) 
(cond ((and (eolp) (not (eq 'item (car (org-element-context) 
(org-insert-todo-heading nil)) ((and (eolp) (eq 'item (car 
(org-element-context (let* ((v (line-beginning-position)) (v 
(point))) (cl--set-buffer-substring v v ""))) ((eq 'paragraph (car 
(org-element-context))) (goto-char (org-element-property :end 
(org-element-context))) (org-insert-todo-heading nil)) (t 
(org-return ((org-in-item-p) (cond ((and (looking-at " ::") 
(looking-back "- " 3)) (beginning-of-line) (delete-region 
(line-beginning-position) (line-end-position))) ((and (looking-at "$") 
(looking-back "- " 3)) (beginning-of-line) (delete-region 
(line-beginning-position) (line-end-position))) ((and (looking-at "$") 
(looking-back "[0-9]*. " (line-beginning-position))) (beginning-of-line) 
(delete-region (line-beginning-position) (line-end-position))) (t 
(end-of-line) (org-insert-item ((org-at-heading-p) (if (not (string= 
"" (org-element-property :title (org-element-context (progn 
(org-end-of-subtree) (org-insert-heading-respect-content) 
(outline-show-entry)) (beginning-of-line) (let* ((v 
(line-beginning-position)) (v (line-end-position))) 
(cl--set-buffer-substring v v "" ((org-at-table-p) (if (-any\? 
(function (lambda (x) (not (string= "" x (nth (- 
(org-table-current-dline) 1) (remove 'hline (org-table-to-lisp 
(org-return) (beginning-of-line) (let* ((v (line-beginning-position)) (v 
(line-end-position))) (cl--set-buffer-substring v v "")) (org-return))) 
(t (org-return"