GNU bug report logs -
#21818
24.5; org-set-tags-to indentation problems when called programmatically
Previous Next
Reported by: mail <at> emanuel.industries
Date: Tue, 3 Nov 2015 06:55:02 UTC
Severity: normal
Found in version 24.5
Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 21818 <at> debbugs.gnu.org (full text, mbox):
> From: mail <at> emanuel.industries
> Date: Mon, 02 Nov 2015 21:40:43 -0800
>
>
> 1. Start emacs with emacs -Q
> 2. Evaluate the following:
>
> (require 'org-mode)
>
> (defun bad-indent ()
> (interactive)
> (insert "* ")
> (org-insert-link nil "http://www.example.com/foo/bar/baz/qux/abc123f56789" "something")
> (org-set-tags-to '("foo")))
>
> 3. Switch to an empty buffer
> 4. M-x org-mode
> 5. M-x bad-indent
> 6. The result looks like the following (except with an actual hyperlink):
>
> * something :foo:
>
> This indentation is incorrect. If you follow the steps for `bad-indent'
> interactively (or even using edebug), the indentation looks like:
>
> * something :foo:
>
> Digging in some more, it looks like the problem is the `current-column'
> call in `org-set-tags' (where it says 'setq c0 (current-column)', on
> line 14620 of org.el in my distribution). With some instrumentation,
> `current-column' seems to be giving different values in interactive mode
> than programatically; I'm guessing it has something to do with the long
> link target causing the value to be different.
Are you sure this isn't a problem with Org mode? If not, can you tell
why you think so?
Thanks.
This bug report was last modified 7 years and 234 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.