Hello, Daniel P Gomez <gomez.d...@gmail.com> writes:
> I've written a small patch (attached here), following the contribution > guidelines on the org-mode website. The "patched" repository can be found > here: https://github.com/dangom/org-mode/tree/feature_padline Thank you. > Please let me know if there is anything else I should do. Some comments follow. > From f5e67856b6cefb7c5e9c1b6bd74321d3b47f1b05 Mon Sep 17 00:00:00 2001 > From: Daniel Gomez <d.go...@posteo.org> > Date: Tue, 28 Mar 2017 21:20:23 +0200 > Subject: [PATCH] Add support for :padline with numbers in ob-tangle. > You need to add list modified functions here, with the actual modifiaction, e.g., * lisp/ob-tangle.el (the-function-I-modified): Been there, done that. Also, if you haven't signed FSF papers yet, you need to add "TINYCHANGE" at the end of the commit message. > - (unless (or (string= "no" (cdr (assq :padline (nth > 4 spec)))) > - (= (point) (point-min))) > - (insert "\n")) > + (let ((padlines (format "%s" (cdr (assq :padline > (nth 4 spec)))))) > + (cond > + ((and (string= "nil" padlines) (not (= (point) > (point-min)))) (not (= (point) (point-min))) -> (not (bobp)) > + (insert "\n")) > + ((string= "no" padlines) > + nil) > + ((numberp (string-to-int padlines)) (numberp (string-to-int padlines)) -> (string-match-p "\\`[0-9]+\\'" padlines) > + (dotimes (i (string-to-int padlines)) (insert > "\n"))) string-to-int -> string-to-number Regards, -- Nicolas Goaziou