From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel P Gomez Subject: Have SRC_BLOCK :padline accept numbers Date: Tue, 28 Mar 2017 21:47:42 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a113ff018b3edae054bcfbbdd Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csx5l-0001kb-27 for emacs-orgmode@gnu.org; Tue, 28 Mar 2017 15:47:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csx5k-0007jS-6V for emacs-orgmode@gnu.org; Tue, 28 Mar 2017 15:47:45 -0400 Received: from mail-qt0-x22a.google.com ([2607:f8b0:400d:c0d::22a]:33365) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csx5k-0007jK-1M for emacs-orgmode@gnu.org; Tue, 28 Mar 2017 15:47:44 -0400 Received: by mail-qt0-x22a.google.com with SMTP id i34so73843932qtc.0 for ; Tue, 28 Mar 2017 12:47:43 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --001a113ff018b3edae054bcfbbdd Content-Type: multipart/alternative; boundary=001a113ff018b3eda8054bcfbbdb --001a113ff018b3eda8054bcfbbdb Content-Type: text/plain; charset=UTF-8 A use case is tangling python source code snippets containing class definitions. ( http://emacs.stackexchange.com/questions/31738/org-mode-babel-ensure-two-empty-lines-between-tangled-code-blocks-for-python ) Per PEP8, the use of blank lines stipulates: "Surround top-level function and class definitions with two blank lines." To achieve two blank lines before a class definition, one would have to set :padline 2. 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 Please let me know if there is anything else I should do. Thanks, Daniel --001a113ff018b3eda8054bcfbbdb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Per PEP8, the use of blank lines sti= pulates:
"Surround top-level function and class definitions with tw= o blank lines."

To achieve two blank lines before a class definit= ion, one would have to set :padline 2.

I've written a smal= l patch (attached here), following the contribution guidelines on the org-m= ode website. The "patched" repository can be found here: https://github= .com/dangom/org-mode/tree/feature_padline

Please let me kn= ow if there is anything else I should do.

Thanks,

Daniel
--001a113ff018b3eda8054bcfbbdb-- --001a113ff018b3edae054bcfbbdd Content-Type: application/octet-stream; name="0001-Add-support-for-padline-with-numbers-in-ob-tangle.patch" Content-Disposition: attachment; filename="0001-Add-support-for-padline-with-numbers-in-ob-tangle.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j0tydpnk0 RnJvbSBmNWU2Nzg1NmI2Y2VmYjdjNWU5YzFiNmJkNzQzMjFkM2I0N2YxYjA1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEYW5pZWwgR29tZXogPGQuZ29tZXpAcG9zdGVvLm9yZz4KRGF0 ZTogVHVlLCAyOCBNYXIgMjAxNyAyMToyMDoyMyArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIEFkZCBz dXBwb3J0IGZvciA6cGFkbGluZSB3aXRoIG51bWJlcnMgaW4gb2ItdGFuZ2xlLgoKLS0tCiBsaXNw L29iLXRhbmdsZS5lbCB8IDEzICsrKysrKysrKystLS0KIDEgZmlsZSBjaGFuZ2VkLCAxMCBpbnNl cnRpb25zKCspLCAzIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpc3Avb2ItdGFuZ2xlLmVs IGIvbGlzcC9vYi10YW5nbGUuZWwKaW5kZXggYjMzZmNhZWU0Li44NWVhMThhNTcgMTAwNjQ0Ci0t LSBhL2xpc3Avb2ItdGFuZ2xlLmVsCisrKyBiL2xpc3Avb2ItdGFuZ2xlLmVsCkBAIC0yODQsOSAr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lCi0tIAoyLjEyLjIKCg== --001a113ff018b3edae054bcfbbdd--