From: Andreas Gerler Date: Tue, 9 May 2017 14:07:27 +0000 (+0200) Subject: tweaking bba-copy-and-yank-org-src-block and friends X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=ad25a28969a50aa604d87dda0b2ee68e152e643a;p=emacsconfig.git tweaking bba-copy-and-yank-org-src-block and friends * copy line above org src block if it might contain a name. Signed-off-by: Andreas Gerler --- diff --git a/bba.org b/bba.org index 77c8f103..b3f31194 100644 --- a/bba.org +++ b/bba.org @@ -1074,6 +1074,8 @@ This is helpful in training sessions. (setq -p1 (region-beginning) -p2 (region-end)) (setq mark-active nil) (re-search-backward "\#\\+BEGIN_SRC") + (previous-line) + (if (not (looking-at "\#"))(forward-line)) (set-mark-command nil) (forward-line) (beginning-of-line) @@ -1096,6 +1098,8 @@ This is helpful in training sessions. (progn (push-mark) (re-search-backward "\#\\+BEGIN_SRC") + (previous-line) + (if (not (looking-at "\#"))(forward-line)) (set-mark-command nil) (re-search-forward "\#\\+END_SRC") (forward-line) @@ -1114,6 +1118,8 @@ This is helpful in training sessions. (interactive) (push-mark) (re-search-backward "\#\\+BEGIN_SRC") + (previous-line) + (if (not (looking-at "\#"))(forward-line)) (set-mark-command nil) (re-search-forward "\#\\+END_SRC") (forward-line)