* org-return does not work in magit's git-commit-setup-hook
@ 2018-03-15 16:24 kadal
2018-03-17 9:21 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: kadal @ 2018-03-15 16:24 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
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))))"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-return does not work in magit's git-commit-setup-hook
2018-03-15 16:24 org-return does not work in magit's git-commit-setup-hook kadal
@ 2018-03-17 9:21 ` Nicolas Goaziou
2018-03-18 18:30 ` kadal
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2018-03-17 9:21 UTC (permalink / raw)
To: kadal; +Cc: emacs-orgmode@gnu.org
Hello,
kadal <kadalcalypse@gmail.com> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-return does not work in magit's git-commit-setup-hook
2018-03-17 9:21 ` Nicolas Goaziou
@ 2018-03-18 18:30 ` kadal
0 siblings, 0 replies; 3+ messages in thread
From: kadal @ 2018-03-18 18:30 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode@gnu.org
OK. Thanks. I've switched to Orgalist.
On 03/17/2018 02:21 AM, Nicolas Goaziou wrote:
> Hello,
>
> kadal <kadalcalypse@gmail.com> 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,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-18 18:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-15 16:24 org-return does not work in magit's git-commit-setup-hook kadal
2018-03-17 9:21 ` Nicolas Goaziou
2018-03-18 18:30 ` kadal
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).