all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Patch] -- small bug fix in org-exp-blocks
@ 2012-05-19 16:22 Eric Schulte
  2012-05-21 13:02 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Schulte @ 2012-05-19 16:22 UTC (permalink / raw
  To: emacs-devel

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

Hi,

I'm attaching a small bug fix patch.  It is not a serious bug (covering
an uncommon edge case) but it is a simple patch and shouldn't do any
harm.  Would it be possible to apply this to the next iteration of the
pre-test?

Thanks,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: indent-block-boundaries-when-body-is-no-indent.patch --]
[-- Type: text/x-patch, Size: 860 bytes --]

=== modified file 'lisp/org/org-exp-blocks.el'
--- lisp/org/org-exp-blocks.el	2012-04-03 12:02:21 +0000
+++ lisp/org/org-exp-blocks.el	2012-05-19 16:00:27 +0000
@@ -211,8 +211,14 @@
 		  (when replacement
 		    (delete-region match-start match-end)
 		    (goto-char match-start) (insert replacement)
-		    (unless preserve-indent
-		      (indent-code-rigidly match-start (point) indentation)))))
+		    (if preserve-indent
+			;; indent only the code block markers
+			(save-excursion
+			  (indent-line-to indentation) ; indent end_block
+			  (goto-char match-start)
+			  (indent-line-to indentation))	; indent begin_block
+                        ;; indent everything
+                        (indent-code-rigidly match-start (point) indentation)))))
 	      ;; cleanup markers
 	      (set-marker match-start nil)
 	      (set-marker body-start nil)


[-- Attachment #3: Type: text/plain, Size: 46 bytes --]


-- 
Eric Schulte
http://cs.unm.edu/~eschulte

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

* Re: [Patch] -- small bug fix in org-exp-blocks
  2012-05-19 16:22 [Patch] -- small bug fix in org-exp-blocks Eric Schulte
@ 2012-05-21 13:02 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2012-05-21 13:02 UTC (permalink / raw
  To: Eric Schulte; +Cc: emacs-devel

Eric Schulte <eric.schulte@gmx.com> writes:

> I'm attaching a small bug fix patch.  It is not a serious bug (covering
> an uncommon edge case) but it is a simple patch and shouldn't do any
> harm.  Would it be possible to apply this to the next iteration of the
> pre-test?

I'm willing to apply this patch.

Please let us know when is the best time for this.

Thanks,

-- 
 Bastien



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

end of thread, other threads:[~2012-05-21 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-19 16:22 [Patch] -- small bug fix in org-exp-blocks Eric Schulte
2012-05-21 13:02 ` Bastien

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.