emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-set-tags-to indentation problems when called programmatically [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.5/lisp/org/)]
@ 2015-11-03 21:37 Emanuel Evans
  0 siblings, 0 replies; only message in thread
From: Emanuel Evans @ 2015-11-03 21:37 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

This is cross-filed as
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21818 in Emacs. Steps to
reproduce:

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.


Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
 of 2015-09-09 on foutrelis
Package: Org-mode version 8.2.10 (release_8.2.10 @ /usr/share/emacs/24.5/lisp/org/)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-03 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 21:37 Bug: org-set-tags-to indentation problems when called programmatically [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.5/lisp/org/)] Emanuel Evans

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).