* [BUG] [PATCH] org-src.el: Fix checkdoc warnings [9.5 (9.5-g59cb39 @ /home/n/.emacs.d/straight/build/org/)] @ 2021-09-30 20:10 No Wayman 2021-10-02 4:36 ` Bastien 0 siblings, 1 reply; 6+ messages in thread From: No Wayman @ 2021-09-30 20:10 UTC (permalink / raw) To: emacs-orgmode The attached patch addresses org-src.el's checkdoc warnings spare the following (IMO spurious) warnings: >158 0 note e-f-c Lisp symbol ‘split-window-below’ >should appear in quotes split-window-below is a value used in org-src-window-setup (along with split-window-right, other-window, other-frame), but these values do not necessarily map onto their functions. e.g. other-window displays via `switch-to-buffer-other-window'. >800 50 note e-f-c Keycode C-c embedded in doc string. >Use \\<keymap> & \\[function] instead The embedded keycodes in `org-src-do-key-sequence-at-code-block' are just for the sake of example. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] [PATCH] org-src.el: Fix checkdoc warnings [9.5 (9.5-g59cb39 @ /home/n/.emacs.d/straight/build/org/)] 2021-09-30 20:10 [BUG] [PATCH] org-src.el: Fix checkdoc warnings [9.5 (9.5-g59cb39 @ /home/n/.emacs.d/straight/build/org/)] No Wayman @ 2021-10-02 4:36 ` Bastien 2021-10-02 14:10 ` No Wayman 0 siblings, 1 reply; 6+ messages in thread From: Bastien @ 2021-10-02 4:36 UTC (permalink / raw) To: No Wayman; +Cc: emacs-orgmode Hi, No Wayman <iarchivedmywholelife@gmail.com> writes: > The attached patch I don't see a patch, can you resend it? -- Bastien ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] [PATCH] org-src.el: Fix checkdoc warnings [9.5 (9.5-g59cb39 @ /home/n/.emacs.d/straight/build/org/)] 2021-10-02 4:36 ` Bastien @ 2021-10-02 14:10 ` No Wayman 2021-10-02 14:41 ` Bastien 0 siblings, 1 reply; 6+ messages in thread From: No Wayman @ 2021-10-02 14:10 UTC (permalink / raw) To: Bastien; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 182 bytes --] Bastien <bzg@gnu.org> writes: > Hi, > > No Wayman <iarchivedmywholelife@gmail.com> writes: > >> The attached patch > > I don't see a patch, can you resend it? Apologies. Resent. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-org-src.el-Fix-checkdoc-warnings.patch --] [-- Type: text/x-patch, Size: 3708 bytes --] From e5d1c6cc231363e20b378e082236af44ac717ccc Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer <iarchivedmywholelife@gmail.com> Date: Thu, 30 Sep 2021 16:07:15 -0400 Subject: [PATCH] org-src.el: Fix checkdoc warnings * org-src.el: Fix checkdoc warnings. --- lisp/org-src.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index 0e16e236b..8f1e68d90 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -37,6 +37,7 @@ (require 'org-compat) (require 'org-keys) +(declare-function org--get-expected-indentation "org" (element contentsp)) (declare-function org-mode "org" ()) (declare-function org-element-at-point "org-element" ()) (declare-function org-element-class "org-element" (datum &optional parent)) @@ -239,8 +240,7 @@ green, respectability. :package-version '(Org . "9.0")) (defcustom org-src-tab-acts-natively t - "If non-nil, the effect of TAB in a code block is as if it were -issued in the language major mode buffer." + "If non-nil, TAB uses the language's major-mode binding in code blocks." :type 'boolean :package-version '(Org . "9.4") :group 'org-babel) @@ -303,7 +303,8 @@ is 0.") (put 'org-src--preserve-blank-line 'permanent-local t) (defun org-src--construct-edit-buffer-name (org-buffer-name lang) - "Construct the buffer name for a source editing buffer." + "Construct the buffer name for a source editing buffer. +Format is \"*Org Src ORG-BUFFER-NAME [ LANG ]*\"." (concat "*Org Src " org-buffer-name "[ " lang " ]*")) (defun org-src--edit-buffer (beg end) @@ -613,7 +614,7 @@ Leave point in edit buffer." ;;; Fontification of source blocks (defun org-src-font-lock-fontify-block (lang start end) - "Fontify code block. + "Fontify code block between START and END using LANG's syntax. This function is called by Emacs' automatic fontification, as long as `org-src-fontify-natively' is non-nil." (let ((lang-mode (org-src-get-lang-mode lang))) @@ -759,7 +760,9 @@ See also `org-src-mode-hook'." ;;; Babel related functions (defun org-src-associate-babel-session (info) - "Associate edit buffer with comint session." + "Associate edit buffer with comint session. +INFO should be a list simlar in format to the return value of +`org-babel-get-src-block-info'." (interactive) (let ((session (cdr (assq :session (nth 2 info))))) (and session (not (string= session "none")) @@ -769,6 +772,7 @@ See also `org-src-mode-hook'." (and (fboundp f) (funcall f session)))))) (defun org-src-babel-configure-edit-buffer () + "Configure src editing buffer." (when org-src--babel-info (org-src-associate-babel-session org-src--babel-info))) @@ -841,6 +845,7 @@ Raise an error when current buffer is not a source editing buffer." org-src--source-type) (defun org-src-switch-to-buffer (buffer context) + "Switch to BUFFER considering CONTEXT and `org-src-window-setup'." (pcase org-src-window-setup (`plain (when (eq context 'exit) (quit-restore-window)) @@ -1203,11 +1208,12 @@ the area in the Org mode buffer." (interactive) (let (org-src--allow-write-back) (org-edit-src-exit))) -(defun org-edit-src-continue (e) +(defun org-edit-src-continue (event) "Unconditionally return to buffer editing area under point. -Throw an error if there is no such buffer." +Throw an error if there is no such buffer. +EVENT is passed to `mouse-set-point'." (interactive "e") - (mouse-set-point e) + (mouse-set-point event) (let ((buf (get-char-property (point) 'edit-buffer))) (if buf (org-src-switch-to-buffer buf 'continue) (user-error "No sub-editing buffer for area at point")))) -- 2.33.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [BUG] [PATCH] org-src.el: Fix checkdoc warnings [9.5 (9.5-g59cb39 @ /home/n/.emacs.d/straight/build/org/)] 2021-10-02 14:10 ` No Wayman @ 2021-10-02 14:41 ` Bastien 2021-10-02 14:49 ` No Wayman 0 siblings, 1 reply; 6+ messages in thread From: Bastien @ 2021-10-02 14:41 UTC (permalink / raw) To: No Wayman; +Cc: emacs-orgmode Hi, No Wayman <iarchivedmywholelife@gmail.com> writes: > Apologies. Resent. Thanks -- it does not apply against the main branch, can you rebase and resend it? -- Bastien ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] [PATCH] org-src.el: Fix checkdoc warnings [9.5 (9.5-g59cb39 @ /home/n/.emacs.d/straight/build/org/)] 2021-10-02 14:41 ` Bastien @ 2021-10-02 14:49 ` No Wayman 2021-10-02 15:10 ` Bastien 0 siblings, 1 reply; 6+ messages in thread From: No Wayman @ 2021-10-02 14:49 UTC (permalink / raw) To: Bastien; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 149 bytes --] Bastien <bzg@gnu.org> writes: > Thanks -- it does not apply against the main branch, can you > rebase > and resend it? Certainly. See attached. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-org-src.el-Fix-checkdoc-warnings.patch --] [-- Type: text/x-patch, Size: 3707 bytes --] From 4971ceb26a1fb138f4eeddc1a569b5c4dd3f1859 Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer <iarchivedmywholelife@gmail.com> Date: Thu, 30 Sep 2021 16:07:15 -0400 Subject: [PATCH] org-src.el: Fix checkdoc warnings * org-src.el: Fix checkdoc warnings. --- lisp/org-src.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index 8d02cf434..23e196438 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -37,6 +37,7 @@ (require 'org-compat) (require 'org-keys) +(declare-function org--get-expected-indentation "org" (element contentsp)) (declare-function org-mode "org" ()) (declare-function org--get-expected-indentation "org" (element contentsp)) (declare-function org-element-at-point "org-element" ()) @@ -240,8 +241,7 @@ green, respectability. :package-version '(Org . "9.0")) (defcustom org-src-tab-acts-natively t - "If non-nil, the effect of TAB in a code block is as if it were -issued in the language major mode buffer." + "If non-nil, TAB uses the language's major-mode binding in code blocks." :type 'boolean :package-version '(Org . "9.4") :group 'org-babel) @@ -304,7 +304,8 @@ is 0.") (put 'org-src--preserve-blank-line 'permanent-local t) (defun org-src--construct-edit-buffer-name (org-buffer-name lang) - "Construct the buffer name for a source editing buffer." + "Construct the buffer name for a source editing buffer. +Format is \"*Org Src ORG-BUFFER-NAME [ LANG ]*\"." (concat "*Org Src " org-buffer-name "[ " lang " ]*")) (defun org-src--edit-buffer (beg end) @@ -614,7 +615,7 @@ Leave point in edit buffer." ;;; Fontification of source blocks (defun org-src-font-lock-fontify-block (lang start end) - "Fontify code block. + "Fontify code block between START and END using LANG's syntax. This function is called by Emacs' automatic fontification, as long as `org-src-fontify-natively' is non-nil." (let ((lang-mode (org-src-get-lang-mode lang))) @@ -760,7 +761,9 @@ See also `org-src-mode-hook'." ;;; Babel related functions (defun org-src-associate-babel-session (info) - "Associate edit buffer with comint session." + "Associate edit buffer with comint session. +INFO should be a list simlar in format to the return value of +`org-babel-get-src-block-info'." (interactive) (let ((session (cdr (assq :session (nth 2 info))))) (and session (not (string= session "none")) @@ -770,6 +773,7 @@ See also `org-src-mode-hook'." (and (fboundp f) (funcall f session)))))) (defun org-src-babel-configure-edit-buffer () + "Configure src editing buffer." (when org-src--babel-info (org-src-associate-babel-session org-src--babel-info))) @@ -842,6 +846,7 @@ Raise an error when current buffer is not a source editing buffer." org-src--source-type) (defun org-src-switch-to-buffer (buffer context) + "Switch to BUFFER considering CONTEXT and `org-src-window-setup'." (pcase org-src-window-setup (`plain (when (eq context 'exit) (quit-restore-window)) @@ -1204,11 +1209,12 @@ the area in the Org mode buffer." (interactive) (let (org-src--allow-write-back) (org-edit-src-exit))) -(defun org-edit-src-continue (e) +(defun org-edit-src-continue (event) "Unconditionally return to buffer editing area under point. -Throw an error if there is no such buffer." +Throw an error if there is no such buffer. +EVENT is passed to `mouse-set-point'." (interactive "e") - (mouse-set-point e) + (mouse-set-point event) (let ((buf (get-char-property (point) 'edit-buffer))) (if buf (org-src-switch-to-buffer buf 'continue) (user-error "No sub-editing buffer for area at point")))) -- 2.33.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [BUG] [PATCH] org-src.el: Fix checkdoc warnings [9.5 (9.5-g59cb39 @ /home/n/.emacs.d/straight/build/org/)] 2021-10-02 14:49 ` No Wayman @ 2021-10-02 15:10 ` Bastien 0 siblings, 0 replies; 6+ messages in thread From: Bastien @ 2021-10-02 15:10 UTC (permalink / raw) To: No Wayman; +Cc: emacs-orgmode No Wayman <iarchivedmywholelife@gmail.com> writes: > Bastien <bzg@gnu.org> writes: > >> Thanks -- it does not apply against the main branch, can you rebase >> and resend it? > > Certainly. See attached. Applied, thanks a lot! -- Bastien ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-02 15:11 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-09-30 20:10 [BUG] [PATCH] org-src.el: Fix checkdoc warnings [9.5 (9.5-g59cb39 @ /home/n/.emacs.d/straight/build/org/)] No Wayman 2021-10-02 4:36 ` Bastien 2021-10-02 14:10 ` No Wayman 2021-10-02 14:41 ` Bastien 2021-10-02 14:49 ` No Wayman 2021-10-02 15:10 ` Bastien
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).