Re: [O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically
Nicolas Goaziouwrites: > I don't consider it to be a bug. > > `org-element-interpret-data' produces a string, which is expected to be > syntactically correct, but doesn't guarantee aesthetics. In particular, > `org-element-headline-interpreter' tries to align tags as accurately as > possible, but, in this case, fails to succeed as it would require to > introduce fontification in the process. This is out of the scope of the > function. Hmmm, that doesn't really make sense to me. Shouldn't the flow of 1. Edit a document with org-mode 2. (org-element-interpret-data (org-element-parse-buffer)) be as close to the original as possible? Seems like the fontification aspect is just an implementation detail. In any case, I looked more into the code and would be happy to submit a patch to change it if it makes sense to you. - Emanuel
Re: [O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically
Nicolas Goaziouwrites: > Fixed in d5767ad. Awesome, thanks for looking at this!
[O] Bug: org-set-tags-to indentation problems when called programmatically [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.5/lisp/org/)]
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/)
[O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically
Glenn Morriswrites: > Nope, just a mailing list AFAIK. Assigning something to the debbugs > org-mode package (which I already did for this report) sends stuff there. Great, is there anything else I should do from my end to make sure it gets to the org mailing list? (I looked for the original post there and didn't see it.)
[O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically
Eli Zaretskiiwrites: > Org mode has its own bug tracker, AFAIR. OK, I'll submit there. Thanks! > P.S. Your email bounces, so sending me a private email is not very > wise... Oops, sorry about that and thanks for the heads up.
[O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically
Apologies if this is a dupe; I think some of my posts aren't getting through to the list (I just subscribed, so hopefully that will help). Glenn Morriswrites: > Nope, just a mailing list AFAIK. Assigning something to the debbugs > org-mode package (which I already did for this report) sends stuff there. Great, is there anything else I should do from my end to make sure it gets to the org mailing list? (I looked for the original post there and didn't see it.)
[O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically
Apologies if this is a dupe; I think some of my posts aren't getting through to the list (I just subscribed, so hopefully that will help). Glenn Morriswrites: > Nope, just a mailing list AFAIK. Assigning something to the debbugs > org-mode package (which I already did for this report) sends stuff there. Great, is there anything else I should do from my end to make sure it gets to the org mailing list? (I looked for the original post there and didn't see it.)