emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Indentation on code blocks have odd behavior [9.0.9 (9.0.9-47-g404ac4-elpa @ /Users/thiagoa/.emacs.d/elpa/org-20170717/)]
@ 2017-07-19  0:15 Thiago Alves
  2017-07-23 11:51 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Thiago Alves @ 2017-07-19  0:15 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 9038 bytes --]

--text follows this line--

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 mailing list.
------------------------------------------------------------------------
When I try to configure Org-mode to have native indentation, every time
I press ~<return>~, the whole block is shifted by
~org-edit-src-content-indentation~ value and the cursor remains on the
block's first column.

If I disable ~org-src-tab-acts-natively~, then the behavior does not
happen, but I also don't have proper code indentation.

Is this a known problem/limitation or can be considered a bug?

For example, lets say I have this code on my doc (the `|` character is
the cursor):

#+BEGIN_SRC emacs-lisp
  (setq user-full-name "Thiago Alves"
        user-mail-address "talk@thiagoalves.com.br"|)
#+END_SRC

With ~org-src-tab-acts-natively~ set to ~t~ and
~org-edit-src-content-indentation~ set to ~2~, if I press ~<return>~,
this is the result:

#+BEGIN_SRC emacs-lisp
    (setq user-full-name "Thiago Alves"
          user-mail-address "talk@thiagoalves.com.br"
|)
#+END_SRC

If I type anything and press ~<return>~ again, it continues to indent:

#+BEGIN_SRC emacs-lisp
      (setq user-full-name "Thiago Alves"
            user-mail-address "talk@thiagoalves.com.br"
  anything
|)
#+END_SRC


Emacs  : GNU Emacs 26.0.50 (build 1, x86_64-apple-darwin16.6.0, NS appkit-1504.83 Version 10.12.5 (Build 16F73))
 of 2017-07-16
Package: Org mode version 9.0.9 (9.0.9-47-g404ac4-elpa @ /Users/thiagoa/.emacs.d/elpa/org-20170717/)

current state:
==============
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
                     org-src-mode-configure-edit-buffer)
 org-fontify-whole-heading-line t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-refile-targets '((org-agenda-files :maxlevel . 4))
 org-src-tab-acts-natively t
 org-agenda-files '("/Users/thiagoa/Depot/Dropbox/Documents/OrgMode/agenda/projects.org" "/Users/thiagoa/Depot/Dropbox/Documents/OrgMode/agenda/someday.org")
 org-mode-hook '(org-indent-mode er/add-org-mode-expansions
                 (closure
                  (org-inlinetask-min-level org-mode-abbrev-table
                   org-mode-syntax-table buffer-face-mode-face org-mode-map
                   org-tbl-menu org-org-menu org-struct-menu org-entities
                   org-last-state org-id-track-globally org-clock-start-time
                   texmathp-why remember-data-file
                   org-agenda-tags-todo-honor-ignore-options
                   iswitchb-temp-buflist calc-embedded-open-mode
                   calc-embedded-open-formula calc-embedded-close-formula
                   align-mode-rules-list org-emphasis-alist
                   org-emphasis-regexp-components
                   org-export-registered-backends org-modules
                   org-babel-load-languages t)
                  nil
                  (add-hook (quote change-major-mode-hook)
                   (quote org-show-block-all) (quote append) (quote local))
                  )
                 (closure
                  (org-bracket-link-regexp org-src-window-setup *this*
                   org-babel-confirm-evaluate-answer-no
                   org-src-preserve-indentation org-src-lang-modes
                   org-edit-src-content-indentation
                   org-babel-library-of-babel t)
                  nil
                  (add-hook (quote change-major-mode-hook)
                   (quote org-babel-show-result-all) (quote append)
                   (quote local))
                  )
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-outline-path-complete-in-steps nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-from-is-user-regexp "\\<thiagoa@6c40088ebf72\\>\\|\\<Thiago Alves\\>"
 org-babel-pre-tangle-hook '(save-buffer)
 org-file-apps '(("\\.docx\\'" . system) (auto-mode . emacs)
                 ("\\.mm\\'" . default) ("\\.x?html?\\'" . default)
                 ("\\.pdf\\'" . default))
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
                      org-babel-header-arg-expand)
 org-hide-leading-stars t
 org-babel-load-languages '((emacs-lisp . t) (python . t) (sh . t) (java . t))
 org-log-done 'time
 org-ellipsis "  "
 org-src-preserve-indentation t
 org-fontify-quote-and-verse-blocks t
 org-fontify-done-headline t
 org-occur-hook '(org-first-headline-recenter)
 org-log-into-drawer t
 org-agenda-include-diary t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "STARTED(s!)" "|"
                      "DONE(d!/!)")
                     (sequence "MAYBE(m@/!)" "WAITING(w@/@)" "HOLD(h@/!)" "|"
                      "CANCELLED(c@/!)")
                     )
 org-speed-command-hook '(org-speed-command-default-hook
                          org-babel-speed-command-hook)
 org-clock-persist-file "/Users/thiagoa/.emacs.d/data/org/clock-persist.el"
 org-refile-use-outline-path 'file
 org-id-locations-file "/Users/thiagoa/.emacs.d/data/org/id-locations.el"
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("id" :follow org-id-open)
                       ("jira" :follow org-jira-open :export nil)
                       ("rmail" :follow org-rmail-open :store
                        org-rmail-store-link)
                       ("mhe" :follow org-mhe-open :store org-mhe-store-link)
                       ("irc" :follow org-irc-visit :store org-irc-store-link)
                       ("info" :follow org-info-open :export org-info-export
                        :store org-info-store-link)
                       ("gnus" :follow org-gnus-open :store
                        org-gnus-store-link)
                       ("docview" :follow org-docview-open :export
                        org-docview-export :store org-docview-store-link)
                       ("bibtex" :follow org-bibtex-open :store
                        org-bibtex-store-link)
                       ("bbdb" :follow org-bbdb-open :export org-bbdb-export
                        :complete org-bbdb-complete-link :store
                        org-bbdb-store-link)
                       ("w3m" :store org-w3m-store-link) ("file+sys")
                       ("file+emacs") ("doi" :follow org--open-doi-link)
                       ("elisp" :follow org--open-elisp-link)
                       ("file" :complete org-file-complete-link)
                       ("ftp" :follow
                        (lambda (path) (browse-url (concat "ftp:" path))))
                       ("help" :follow org--open-help-link)
                       ("http" :follow
                        (lambda (path) (browse-url (concat "http:" path))))
                       ("https" :follow
                        (lambda (path) (browse-url (concat "https:" path))))
                       ("mailto" :follow
                        (lambda (path) (browse-url (concat "mailto:" path))))
                       ("message" :follow
                        (lambda (path) (browse-url (concat "message:" path))))
                       ("news" :follow
                        (lambda (path) (browse-url (concat "news:" path))))
                       ("shell" :follow org--open-shell-link))
 org-directory "/Users/thiagoa/Depot/Dropbox/Documents/OrgMode/"
 org-log-refile 'time
 )


Thiago Alves | Software Developer Engineer
http://www.thiagoalves.com.br
Find me

[-- Attachment #2.1: Type: text/html, Size: 17299 bytes --]

[-- Attachment #2.2: 5354AF23C64C4DBA9BF54371F189BA38.png --]
[-- Type: image/png, Size: 65918 bytes --]

[-- Attachment #2.3: 113C33A393B6476FB21E905F15D97CF0.png --]
[-- Type: image/png, Size: 1218 bytes --]

[-- Attachment #2.4: D94C5B6861D6444482BFE91748426F9A.png --]
[-- Type: image/png, Size: 1569 bytes --]

[-- Attachment #2.5: A5473FEE9BBE4C3B85C1318844F08C3D.png --]
[-- Type: image/png, Size: 1538 bytes --]

[-- Attachment #2.6: E6F8B47B985142DDB9E1DA02BACFD45F.png --]
[-- Type: image/png, Size: 1566 bytes --]

[-- Attachment #2.7: FF55FE466B964C08A0E1289FDEBF34DB.png --]
[-- Type: image/png, Size: 2226 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-23 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-19  0:15 Bug: Indentation on code blocks have odd behavior [9.0.9 (9.0.9-47-g404ac4-elpa @ /Users/thiagoa/.emacs.d/elpa/org-20170717/)] Thiago Alves
2017-07-23 11:51 ` Nicolas Goaziou

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