From: PENG Kevin <kevin.remegame@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] insert C comment in c-babel case wrong result [9.6.15 (release_9.6.15 @ /opt/program/share/emacs/29.4/lisp/org/)]
Date: Wed, 16 Oct 2024 15:31:37 +0800 [thread overview]
Message-ID: <8734kwmrk0.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
[-- Attachment #2.1: Type: text/plain, Size: 722 bytes --]
When insert =/**/= comment in a C-src block, "," will be
insert automticlly before =*= as flow:
[[file:/home/pk/rdf/redef/repos/rdf-mix/roam/emacs_org_issue.png]]
Reproduce:
1. Create one new .org file
2. Insert this content:
#+BEGIN_EXAMPLE
#+BEGIN_SRC C
/** @file main.c
* @brief 项目主函数文件
* @details 主要包含协议应用栈程序框架,main函数入口
* @author 李长条
* @copyright Copyright (c) 2050
*/
#+END_SRC
#+END_EXAMPLE
3. In this block, type =C-c '=,which will call "org-edit-special"
4. In the opened =*Org Src *= buffer, do nothing and type =C-c '= again
5. Then the "," are inserted in org file as shown in previous picture.
[-- Attachment #2.2.1: Type: text/html, Size: 888 bytes --]
[-- Attachment #2.2.2: emacs_org_issue.png --]
[-- Type: image/png, Size: 96160 bytes --]
[-- Attachment #3: Type: text/plain, Size: 14393 bytes --]
Emacs : GNU Emacs 29.4 (build 7, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)
of 2024-10-10
Package: Org mode version 9.6.15 (release_9.6.15 @ /opt/program/share/emacs/29.4/lisp/org/)
current state:
==============
(setq
org-html-with-latex 'imagemagick
org-agenda-prefix-format '((todo . " %i %-10:c%l%l") (agenda . " %i %-12:c%?-12t% s")
(tags . " %i %-12:c") (search . " %i %-12:c"))
org-link-elisp-confirm-function 'yes-or-no-p
org-directory "~/.emacs.d/redef/org"
org-roam-db-gc-threshold 100000000
org-hide-emphasis-markers t
org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"]
org-export-with-sub-superscripts '{}
org-log-done 'time
org-roam-dailies-capture-templates '(("d" "default" entry "* %<%I:%M %p> %?" :if-new
(file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n"))
)
org-startup-folded 'content
org-agenda-files '("~/.emacs.d/redef/org/captures.org" "/home/pk/rdf/rdf-todo.org"
"/home/pk/rdf/./workspace//ruby/tool-site-r7/readme.org"
"/home/pk/rdf/./workspace//ruby/remegame.site/org/index.org")
org-publish-project-alist '(("org-html-theme" :base-directory
"/home/pk/rdf/bext/code/localize/examples/org-html-themes/"
:base-extension "css\\|js" :publishing-directory
"/home/pk/rdf/./workspace//_tmp//rdoc/html/org-html-themes"
:recursive t :publishing-function org-publish-attachment)
("org-notes-theme" :base-directory
"/home/pk/rdf/./workspace//_tmp//rdoc/html/org-html-themes"
:base-extension "css\\|js" :publishing-directory
"/home/pk/rdf/./workspace//_tmp//rdoc/html/notes/" :recursive t
:publishing-function org-publish-attachment)
("org-notes" :base-directory "/home/pk/rdf/redef/repos/rdf-mix/roam/"
:base-extension "org" :publishing-directory
"/home/pk/rdf/./workspace//_tmp//rdoc/html/notes/" :recursive t
:publishing-function org-html-publish-to-html :headline-levels 4
:auto-preamble t)
("org-notes-static" :base-directory
"/home/pk/rdf/redef/repos/rdf-mix/roam/" :base-extension
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory
"/home/pk/rdf/./workspace//_tmp//rdoc/html/notes/" :recursive t
:publishing-function org-publish-attachment)
("notes" :components
("org-html-theme" "org-notes-theme" "org-notes" "org-notes-static"))
("org-blogs" :base-directory
"/home/pk/rdf/workspace/jekyll/blog/__all" :base-extension "org"
:publishing-directory "/home/pk/rdf/workspace/jekyll/blog/_posts/"
:recursive t :publishing-function org-html-publish-to-jekyll-html)
)
org-capture-templates '(("t" "Task to be done" entry (file+headline org-default-notes-file "TASK")
"* TODO %U %?\n")
("i" "Idea to try" entry (file+headline org-default-notes-file "IDEA")
"* About %? \n %U")
("p" "Plan to be done" entry (file+headline org-default-notes-file "PLAN")
"* For %? \n %U")
)
org-persist-after-read-hook '(org-element--cache-persist-after-read)
org-export-before-parsing-hook '(org-attach-expand-links)
org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-default-notes-file "~/.emacs.d/redef/org/captures.org"
org-roam-find-file-hook '(org-roam-buffer--setup-redisplay-h
org-roam--register-completion-functions-h
org-roam--replace-roam-links-on-save-h
org-roam-db-autosync--setup-update-on-save-h)
org-archive-hook '(org-attach-archive-delete-maybe)
org-file-apps '(("\\.pdf\\'" . "evince %s") ("\\.x?html?\\'" . "firefox %s")
("\\.\\'" . "xdg-open %s"))
org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"]
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images)
org-persist-before-read-hook '(org-element--cache-persist-before-read)
org-link-from-user-regexp "\\<pk@rainbow\\>\\|\\<pk\\>"
org-image-actual-width nil
org-mode-hook '(org-fragtog-mode r-ruby--run-top-level org-appear-mode
#[0 "\301\211\207" [imenu-create-index-function org-imenu-get-tree] 2]
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-fold-show-all append local] 5]
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-babel-load-languages '((C . t) (emacs-lisp . t) (ruby . t) (python . t) (dot . t)
(plantuml . t) (haskell . t) (ein . t) (shell . t))
org-link-file-path-type 'relative
org-roam-ref-annotation-function 'org-roam-ref-read--annotation
org-roam-directory "/home/pk/rdf/redef/repos/rdf-mix/roam/../roam/"
org-agenda-span 'month
org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
org-roam-db-node-include-function '(closure (t) nil t)
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-confirm-shell-link-function 'yes-or-no-p
org-adapt-indentation t
org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
outline-isearch-open-invisible-function 'outline-isearch-open-invisible
org-use-sub-superscripts '{}
org-super-agenda-mode t
org-roam-dailies-directory "/home/pk/rdf/redef/repos/rdf-mix/roam/../roam/daily"
org-export-before-processing-hook '(org-blackfriday--reset-org-blackfriday--code-block-num-backticks)
org-plantuml-jar-path nil
org-odt-format-headline-function 'org-odt-format-headline-default-function
org-roam-capture-preface-hook '(org-roam-dailies--override-capture-time-h
org-roam-capture--try-capture-to-ref-h)
org-babel-python-command "python3"
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-capture-prepare-finalize-hook '(org-roam-capture--install-finalize-h)
org-latex-packages-alist '(("" "amsmath" t) ("" "amssymb" t))
org-roam-preview-function 'org-roam-preview-default-function
org-babel-tangle-lang-exts '(("haskell" . "hs") ("python" . "py") ("ruby" . "rb") ("D" . "d")
("C++" . "cpp") ("emacs-lisp" . "el") ("elisp" . "el"))
org-src-mode-hook '((lambda nil (add-to-list 'org-src-lang-modes '("dot" . graphviz-dot)))
org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
org-roam-db-autosync-mode t
org-confirm-elisp-link-function 'yes-or-no-p
org-log-buffer-setup-hook '(org-roam-log--setup)
org-hide-leading-stars t
org-todo-keywords '((sequence "TODO(t)" "PLANING(h)" "DOING(i)" "POSTPONE(p)" "|" "CANCEL(c)"
"DONE(d)")
)
org-mime-src-mode-hook '(org-mime-src-mode-configure-edit-buffer)
org-roam-capture-new-node-hook '(org-roam-capture--insert-captured-ref-h)
org-preview-latex-image-directory "//tmp/org-latex/"
org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-super-agenda-groups '((:name "Today" :todo "TODAY" :order 1)
(:name "Repeat Task" :todo "LOOP" :habit t :order 5)
(:order-multi
(8 (:name "Family" :tag "family") (:name "Friends" :tag "friend")
(:name "Redef" :tag "redef"))
)
(:name "Draft or temparay task to be collected" :tag
("draft" "temp" "tmp") :order 9)
(:order-multi
(6
(:name "Programming Language" :tag ("ruby" "c" "c++" "elisp" "python"))
(:name "Web" :tag ("web")) (:name "Emacs" :tag "emacs")
(:name "Firefox" :tag "firefox"))
)
(:priority<= "B" :order 2))
org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
org-persist-directory "/opt/program/emacs/config/home/.cache/org-persist/"
org-confirm-babel-evaluate '(lambda (lan body) (cond ((equal lan "dot") nil) (t t)))
org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
org-persist-before-write-hook '(org-element--cache-persist-before-write)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-link-shell-confirm-function 'yes-or-no-p
org-babel-pre-tangle-hook '(save-buffer)
org-agenda-loop-over-headlines-in-active-region nil
org-occur-hook '(org-first-headline-recenter)
org-roam-log-setup-hook '(org-roam--register-completion-functions-h)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-roam-node-annotation-function 'org-roam-node-read--annotation
org-link-parameters '(("mu4e" :follow mu4e-org-open :store mu4e-org-store-link)
("eww" :follow org-eww-open :store org-eww-store-link)
("rmail" :follow org-rmail-open :store org-rmail-store-link)
("mhe" :follow org-mhe-open :store org-mhe-store-link)
("irc" :follow org-irc-visit :store org-irc-store-link :export
org-irc-export)
("gnus" :follow org-gnus-open :store org-gnus-store-link)
("docview" :follow org-docview-open :export org-docview-export :store
org-docview-store-link)
("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
org-bbdb-complete-link :store org-bbdb-store-link)
("w3m" :store org-w3m-store-link)
("doi" :follow org-link-doi-open :export org-link-doi-export)
("bookmark-other-win" :follow bookmark-jump-other-window :export nil)
("bookmark" :follow bookmark-jump :export nil)
("roam" :follow org-roam-link-follow-link)
("attachment" :follow org-attach-follow :complete org-attach-complete-link)
("info" :follow org-info-open :export org-info-export :store
org-info-store-link :insert-description org-info-description-as-command)
("id" :follow org-roam-id-open)
("elfeed" :follow elfeed-link-open :store elfeed-link-store-link)
("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell)
("news" :follow
#[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("mailto" :follow
#[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("https" :follow
#[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("http" :follow
#[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("ftp" :follow
#[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"]
)
("help" :follow org-link--open-help :store org-link--store-help)
("file" :complete org-link-complete-file)
("elisp" :follow org-link--open-elisp))
org-html-format-headline-function 'org-html-format-headline-default-function
org-roam-capture-templates '(("d" "default" plain "%?" :if-new
(file+head "${slug}.org" "#+title: ${title}") :unnarrowed t)
)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-hugo-external-file-extensions-allowed-for-copying '("md" "jpg" "jpeg" "tiff" "png" "svg" "gif"
"bmp" "mp4" "pdf" "odt" "doc" "ppt" "xls"
"docx" "pptx" "xlsx")
org-src-lang-modes '(("ein-julia" . julia) ("ein-r" . R) ("ein-R" . R) ("ein-python" . python)
("ein" . python) ("plantuml" . plantuml) ("dot" . graphviz-dot) ("C" . c)
("C++" . c++) ("asymptote" . asy) ("bash" . sh) ("beamer" . latex)
("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist)
("desktop" . conf-desktop) ("dot" . fundamental) ("elisp" . emacs-lisp)
("ocaml" . tuareg) ("screen" . shell-script) ("shell" . sh) ("sqlite" . sql)
("toml" . conf-toml))
org-roam-indirect-buffer-hook '(org-roam--register-completion-functions-h)
)
--
Best Regards.
next reply other threads:[~2024-10-16 12:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 7:31 PENG Kevin [this message]
2024-10-16 19:52 ` [BUG] insert C comment in c-babel case wrong result [9.6.15 (release_9.6.15 @ /opt/program/share/emacs/29.4/lisp/org/)] Ihor Radchenko
2024-10-17 4:38 ` PENG Kevin
2024-10-17 4:50 ` Ihor Radchenko
2024-10-18 13:45 ` PENG Kevin
2024-10-18 17:35 ` Ihor Radchenko
-- strict thread matches above, loose matches on Subject: below --
2024-10-16 6:58 PENG Kevin
2024-10-16 7:29 ` PENG Kevin
2024-10-16 19:53 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734kwmrk0.fsf@gmail.com \
--to=kevin.remegame@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).