unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28085: 24.5; Commentary section is not displayed correctly
@ 2017-08-14  6:55 Takushi Usami
  2020-08-10 14:54 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Takushi Usami @ 2017-08-14  6:55 UTC (permalink / raw)
  To: 28085

[-- Attachment #1: Type: Text/Plain, Size: 20222 bytes --]

Hello, gurus.

I noticed that package description accompanied with comment characters,
if package is not a type of built-in and consists of only one flie.
Although Emacs Lisp Reference Manual says:

  39.2 Simple Packages
    ...
    If the file has a ‘;;; Commentary:’ section, this section is used as
    the long description.  (When displaying the description, Emacs omits the
    ‘;;; Commentary:’ line, as well as the leading comment characters in the
    commentary itself.)

I studied this issue, and maybe found how to fix it.  So I attached a
patch and a changelog.


HOW TO REPRODUCE THE PROBLEM
============================
1) Make a single package like an attached file:printHello.el
2) Run emacs
3) On emacs, load a library:package-x by typing 'M-x load-library',
   then 'package-x'
4) On emacs, open a single package by typing 'C-x C-f', and specify
   'printHello.el'
   After the content of printHello.el is displayed as curret buffer,
   typing 'M-x package-upload-buffer' and specify an arbitrary
   directory to store a formatted package.

I expect the content of a file for package
description:printHello-readme.txt is:

    This is a simple package for learning how to package a single elisp file.
    If you would like to know more about packaging elisp, read followings.
    
    - https://www.gnu.org/software/emacs/manual/html_node/elisp/Packaging.html
    - https://www.emacswiki.org/emacs/MakingPackages

But, in practice it is:

    ;;; Commentary:

    ;; This is a simple package for learning how to package a single elisp file.
    ;; If you would like to know more about packaging elisp, read followings.
    ;;
    ;; - https://www.gnu.org/software/emacs/manual/html_node/elisp/Packaging.html
    ;; - https://www.emacswiki.org/emacs/MakingPackages


INITIAL STUDY FOR THIS PROBLEM
==============================

THis problems occuers under following condition:
- A type of package is not built-in. and,
- Package consists of only 1 file.

So, I checked the package.el and package-x.el in lisp/emacs-lisp.
Eventually, I noticed that the functinon:describe-package-1 defined in
package.el removes leading comment characters in commentary section by
the following code:

	  (save-excursion
	    (goto-char opoint)
	    (when (re-search-forward "^;;; Commentary:\n" nil t)
	      (replace-match ""))
	    (while (re-search-forward "^\\(;+ ?\\)" nil t)
	      (replace-match ""))))

Although the function:package-upload-buffer-internal defined in
package-x.el, which generates a file for package description,  does
not have such code.  So, I will add code look like the above to the
function:package-upload-buffer-internal.

REPORT GENERATED BY REPORT-EMACS-BUG
====================================



In GNU Emacs 24.5.1 (i686-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-18 on lgw01-36, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11903000
System Description:	Ubuntu 16.04.3 LTS

Configured using:
 `configure --build i686-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build i686-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Important settings:
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
  diff-auto-refine-mode: t
  helm-mode: t
  shell-dirtrack-mode: t
  async-bytecomp-package-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Quit
Saving file /tmp/ChangeLog...
Wrote /tmp/ChangeLog
You can run the command `info' with C-h i
user-error: Node has no Up
Template key: 
user-error: Abort
C-c C-c is undefined
Quit
Making completion list...

Load-path shadows:
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/home/taku/.emacs.d/elpa/flim-20161210.1728/hex-util hides /usr/share/emacs/24.5/lisp/hex-util
/home/taku/.emacs.d/elpa/flim-20161210.1728/md4 hides /usr/share/emacs/24.5/lisp/md4
/home/taku/.emacs.d/elpa/org-20170807/org-bibtex hides /usr/share/emacs/24.5/lisp/org/org-bibtex
/home/taku/.emacs.d/elpa/org-20170807/ob-perl hides /usr/share/emacs/24.5/lisp/org/ob-perl
/home/taku/.emacs.d/elpa/org-20170807/ob-keys hides /usr/share/emacs/24.5/lisp/org/ob-keys
/home/taku/.emacs.d/elpa/org-20170807/ob-C hides /usr/share/emacs/24.5/lisp/org/ob-C
/home/taku/.emacs.d/elpa/org-20170807/ob-gnuplot hides /usr/share/emacs/24.5/lisp/org/ob-gnuplot
/home/taku/.emacs.d/elpa/org-20170807/ob hides /usr/share/emacs/24.5/lisp/org/ob
/home/taku/.emacs.d/elpa/org-20170807/org-table hides /usr/share/emacs/24.5/lisp/org/org-table
/home/taku/.emacs.d/elpa/org-20170807/org-indent hides /usr/share/emacs/24.5/lisp/org/org-indent
/home/taku/.emacs.d/elpa/org-20170807/ob-scala hides /usr/share/emacs/24.5/lisp/org/ob-scala
/home/taku/.emacs.d/elpa/org-20170807/ob-fortran hides /usr/share/emacs/24.5/lisp/org/ob-fortran
/home/taku/.emacs.d/elpa/org-20170807/ob-ocaml hides /usr/share/emacs/24.5/lisp/org/ob-ocaml
/home/taku/.emacs.d/elpa/org-20170807/org-feed hides /usr/share/emacs/24.5/lisp/org/org-feed
/home/taku/.emacs.d/elpa/org-20170807/ob-scheme hides /usr/share/emacs/24.5/lisp/org/ob-scheme
/home/taku/.emacs.d/elpa/org-20170807/org-faces hides /usr/share/emacs/24.5/lisp/org/org-faces
/home/taku/.emacs.d/elpa/org-20170807/org-mouse hides /usr/share/emacs/24.5/lisp/org/org-mouse
/home/taku/.emacs.d/elpa/org-20170807/ox-beamer hides /usr/share/emacs/24.5/lisp/org/ox-beamer
/home/taku/.emacs.d/elpa/org-20170807/ox-odt hides /usr/share/emacs/24.5/lisp/org/ox-odt
/home/taku/.emacs.d/elpa/org-20170807/ob-awk hides /usr/share/emacs/24.5/lisp/org/ob-awk
/home/taku/.emacs.d/elpa/org-20170807/ob-R hides /usr/share/emacs/24.5/lisp/org/ob-R
/home/taku/.emacs.d/elpa/org-20170807/org-macs hides /usr/share/emacs/24.5/lisp/org/org-macs
/home/taku/.emacs.d/elpa/org-20170807/ob-makefile hides /usr/share/emacs/24.5/lisp/org/ob-makefile
/home/taku/.emacs.d/elpa/org-20170807/org-info hides /usr/share/emacs/24.5/lisp/org/org-info
/home/taku/.emacs.d/elpa/org-20170807/org-entities hides /usr/share/emacs/24.5/lisp/org/org-entities
/home/taku/.emacs.d/elpa/org-20170807/ox hides /usr/share/emacs/24.5/lisp/org/ox
/home/taku/.emacs.d/elpa/org-20170807/ob-exp hides /usr/share/emacs/24.5/lisp/org/ob-exp
/home/taku/.emacs.d/elpa/org-20170807/org-agenda hides /usr/share/emacs/24.5/lisp/org/org-agenda
/home/taku/.emacs.d/elpa/org-20170807/ob-sqlite hides /usr/share/emacs/24.5/lisp/org/ob-sqlite
/home/taku/.emacs.d/elpa/org-20170807/ob-calc hides /usr/share/emacs/24.5/lisp/org/ob-calc
/home/taku/.emacs.d/elpa/org-20170807/org-rmail hides /usr/share/emacs/24.5/lisp/org/org-rmail
/home/taku/.emacs.d/elpa/org-20170807/ob-screen hides /usr/share/emacs/24.5/lisp/org/ob-screen
/home/taku/.emacs.d/elpa/org-20170807/ob-io hides /usr/share/emacs/24.5/lisp/org/ob-io
/home/taku/.emacs.d/elpa/org-20170807/ob-ruby hides /usr/share/emacs/24.5/lisp/org/ob-ruby
/home/taku/.emacs.d/elpa/org-20170807/ob-maxima hides /usr/share/emacs/24.5/lisp/org/ob-maxima
/home/taku/.emacs.d/elpa/org-20170807/ob-tangle hides /usr/share/emacs/24.5/lisp/org/ob-tangle
/home/taku/.emacs.d/elpa/org-20170807/org-eshell hides /usr/share/emacs/24.5/lisp/org/org-eshell
/home/taku/.emacs.d/elpa/org-20170807/ob-haskell hides /usr/share/emacs/24.5/lisp/org/ob-haskell
/home/taku/.emacs.d/elpa/org-20170807/ob-ditaa hides /usr/share/emacs/24.5/lisp/org/ob-ditaa
/home/taku/.emacs.d/elpa/org-20170807/ox-icalendar hides /usr/share/emacs/24.5/lisp/org/ox-icalendar
/home/taku/.emacs.d/elpa/org-20170807/ob-mscgen hides /usr/share/emacs/24.5/lisp/org/ob-mscgen
/home/taku/.emacs.d/elpa/org-20170807/org-datetree hides /usr/share/emacs/24.5/lisp/org/org-datetree
/home/taku/.emacs.d/elpa/org-20170807/ob-lilypond hides /usr/share/emacs/24.5/lisp/org/ob-lilypond
/home/taku/.emacs.d/elpa/org-20170807/org-protocol hides /usr/share/emacs/24.5/lisp/org/org-protocol
/home/taku/.emacs.d/elpa/org-20170807/org-habit hides /usr/share/emacs/24.5/lisp/org/org-habit
/home/taku/.emacs.d/elpa/org-20170807/ob-shen hides /usr/share/emacs/24.5/lisp/org/ob-shen
/home/taku/.emacs.d/elpa/org-20170807/org-mobile hides /usr/share/emacs/24.5/lisp/org/org-mobile
/home/taku/.emacs.d/elpa/org-20170807/org-macro hides /usr/share/emacs/24.5/lisp/org/org-macro
/home/taku/.emacs.d/elpa/org-20170807/ob-ledger hides /usr/share/emacs/24.5/lisp/org/ob-ledger
/home/taku/.emacs.d/elpa/org-20170807/ob-ref hides /usr/share/emacs/24.5/lisp/org/ob-ref
/home/taku/.emacs.d/elpa/org-20170807/ob-sql hides /usr/share/emacs/24.5/lisp/org/ob-sql
/home/taku/.emacs.d/elpa/org-20170807/org-compat hides /usr/share/emacs/24.5/lisp/org/org-compat
/home/taku/.emacs.d/elpa/org-20170807/ob-java hides /usr/share/emacs/24.5/lisp/org/ob-java
/home/taku/.emacs.d/elpa/org-20170807/org-element hides /usr/share/emacs/24.5/lisp/org/org-element
/home/taku/.emacs.d/elpa/org-20170807/ox-publish hides /usr/share/emacs/24.5/lisp/org/ox-publish
/home/taku/.emacs.d/elpa/org-20170807/org-archive hides /usr/share/emacs/24.5/lisp/org/org-archive
/home/taku/.emacs.d/elpa/org-20170807/ob-eval hides /usr/share/emacs/24.5/lisp/org/ob-eval
/home/taku/.emacs.d/elpa/org-20170807/org-pcomplete hides /usr/share/emacs/24.5/lisp/org/org-pcomplete
/home/taku/.emacs.d/elpa/org-20170807/ob-plantuml hides /usr/share/emacs/24.5/lisp/org/ob-plantuml
/home/taku/.emacs.d/elpa/org-20170807/ox-md hides /usr/share/emacs/24.5/lisp/org/ox-md
/home/taku/.emacs.d/elpa/org-20170807/org-src hides /usr/share/emacs/24.5/lisp/org/org-src
/home/taku/.emacs.d/elpa/org-20170807/ob-octave hides /usr/share/emacs/24.5/lisp/org/ob-octave
/home/taku/.emacs.d/elpa/org-20170807/ob-comint hides /usr/share/emacs/24.5/lisp/org/ob-comint
/home/taku/.emacs.d/elpa/org-20170807/ob-dot hides /usr/share/emacs/24.5/lisp/org/ob-dot
/home/taku/.emacs.d/elpa/org-20170807/ob-matlab hides /usr/share/emacs/24.5/lisp/org/ob-matlab
/home/taku/.emacs.d/elpa/org-20170807/org-docview hides /usr/share/emacs/24.5/lisp/org/org-docview
/home/taku/.emacs.d/elpa/org-20170807/org-attach hides /usr/share/emacs/24.5/lisp/org/org-attach
/home/taku/.emacs.d/elpa/org-20170807/org-mhe hides /usr/share/emacs/24.5/lisp/org/org-mhe
/home/taku/.emacs.d/elpa/org-20170807/org-irc hides /usr/share/emacs/24.5/lisp/org/org-irc
/home/taku/.emacs.d/elpa/org-20170807/ob-css hides /usr/share/emacs/24.5/lisp/org/ob-css
/home/taku/.emacs.d/elpa/org-20170807/ox-man hides /usr/share/emacs/24.5/lisp/org/ox-man
/home/taku/.emacs.d/elpa/org-20170807/org-id hides /usr/share/emacs/24.5/lisp/org/org-id
/home/taku/.emacs.d/elpa/org-20170807/org-loaddefs hides /usr/share/emacs/24.5/lisp/org/org-loaddefs
/home/taku/.emacs.d/elpa/org-20170807/org hides /usr/share/emacs/24.5/lisp/org/org
/home/taku/.emacs.d/elpa/org-20170807/ob-python hides /usr/share/emacs/24.5/lisp/org/ob-python
/home/taku/.emacs.d/elpa/org-20170807/ob-org hides /usr/share/emacs/24.5/lisp/org/ob-org
/home/taku/.emacs.d/elpa/org-20170807/ox-ascii hides /usr/share/emacs/24.5/lisp/org/ox-ascii
/home/taku/.emacs.d/elpa/org-20170807/ob-sass hides /usr/share/emacs/24.5/lisp/org/ob-sass
/home/taku/.emacs.d/elpa/org-20170807/org-inlinetask hides /usr/share/emacs/24.5/lisp/org/org-inlinetask
/home/taku/.emacs.d/elpa/org-20170807/ob-clojure hides /usr/share/emacs/24.5/lisp/org/ob-clojure
/home/taku/.emacs.d/elpa/org-20170807/ob-emacs-lisp hides /usr/share/emacs/24.5/lisp/org/ob-emacs-lisp
/home/taku/.emacs.d/elpa/org-20170807/ox-latex hides /usr/share/emacs/24.5/lisp/org/ox-latex
/home/taku/.emacs.d/elpa/org-20170807/org-footnote hides /usr/share/emacs/24.5/lisp/org/org-footnote
/home/taku/.emacs.d/elpa/org-20170807/ob-js hides /usr/share/emacs/24.5/lisp/org/ob-js
/home/taku/.emacs.d/elpa/org-20170807/ob-picolisp hides /usr/share/emacs/24.5/lisp/org/ob-picolisp
/home/taku/.emacs.d/elpa/org-20170807/org-gnus hides /usr/share/emacs/24.5/lisp/org/org-gnus
/home/taku/.emacs.d/elpa/org-20170807/org-ctags hides /usr/share/emacs/24.5/lisp/org/org-ctags
/home/taku/.emacs.d/elpa/org-20170807/org-plot hides /usr/share/emacs/24.5/lisp/org/org-plot
/home/taku/.emacs.d/elpa/org-20170807/org-w3m hides /usr/share/emacs/24.5/lisp/org/org-w3m
/home/taku/.emacs.d/elpa/org-20170807/ob-lob hides /usr/share/emacs/24.5/lisp/org/ob-lob
/home/taku/.emacs.d/elpa/org-20170807/ox-texinfo hides /usr/share/emacs/24.5/lisp/org/ox-texinfo
/home/taku/.emacs.d/elpa/org-20170807/ob-latex hides /usr/share/emacs/24.5/lisp/org/ob-latex
/home/taku/.emacs.d/elpa/org-20170807/org-clock hides /usr/share/emacs/24.5/lisp/org/org-clock
/home/taku/.emacs.d/elpa/org-20170807/ob-core hides /usr/share/emacs/24.5/lisp/org/ob-core
/home/taku/.emacs.d/elpa/org-20170807/org-bbdb hides /usr/share/emacs/24.5/lisp/org/org-bbdb
/home/taku/.emacs.d/elpa/org-20170807/ob-lisp hides /usr/share/emacs/24.5/lisp/org/ob-lisp
/home/taku/.emacs.d/elpa/org-20170807/ob-asymptote hides /usr/share/emacs/24.5/lisp/org/ob-asymptote
/home/taku/.emacs.d/elpa/org-20170807/org-capture hides /usr/share/emacs/24.5/lisp/org/org-capture
/home/taku/.emacs.d/elpa/org-20170807/ob-table hides /usr/share/emacs/24.5/lisp/org/ob-table
/home/taku/.emacs.d/elpa/org-20170807/org-timer hides /usr/share/emacs/24.5/lisp/org/org-timer
/home/taku/.emacs.d/elpa/org-20170807/org-crypt hides /usr/share/emacs/24.5/lisp/org/org-crypt
/home/taku/.emacs.d/elpa/org-20170807/ox-html hides /usr/share/emacs/24.5/lisp/org/ox-html
/home/taku/.emacs.d/elpa/org-20170807/org-list hides /usr/share/emacs/24.5/lisp/org/org-list
/home/taku/.emacs.d/elpa/org-20170807/ox-org hides /usr/share/emacs/24.5/lisp/org/ox-org
/home/taku/.emacs.d/elpa/org-20170807/org-colview hides /usr/share/emacs/24.5/lisp/org/org-colview
/home/taku/.emacs.d/elpa/org-20170807/org-install hides /usr/share/emacs/24.5/lisp/org/org-install
/home/taku/.emacs.d/elpa/org-20170807/org-version hides /usr/share/emacs/24.5/lisp/org/org-version
/home/taku/.emacs.d/elpa/soap-client-3.1.3/soap-inspect hides /usr/share/emacs/24.5/lisp/net/soap-inspect
/home/taku/.emacs.d/elpa/flim-20161210.1728/sasl-ntlm hides /usr/share/emacs/24.5/lisp/net/sasl-ntlm
/home/taku/.emacs.d/elpa/flim-20161210.1728/sasl-cram hides /usr/share/emacs/24.5/lisp/net/sasl-cram
/home/taku/.emacs.d/elpa/flim-20161210.1728/ntlm hides /usr/share/emacs/24.5/lisp/net/ntlm
/home/taku/.emacs.d/elpa/soap-client-3.1.3/soap-client hides /usr/share/emacs/24.5/lisp/net/soap-client
/home/taku/.emacs.d/elpa/flim-20161210.1728/hmac-md5 hides /usr/share/emacs/24.5/lisp/net/hmac-md5
/home/taku/.emacs.d/elpa/flim-20161210.1728/sasl-digest hides /usr/share/emacs/24.5/lisp/net/sasl-digest
/home/taku/.emacs.d/elpa/flim-20161210.1728/hmac-def hides /usr/share/emacs/24.5/lisp/net/hmac-def
/home/taku/.emacs.d/elpa/flim-20161210.1728/sasl hides /usr/share/emacs/24.5/lisp/net/sasl
/tmp/package-x hides /usr/share/emacs/24.5/lisp/emacs-lisp/package-x

Features:
(shadow emacsbug sendmail org-capture timezone parse-time
google-translate-default-ui google-translate-core-ui
google-translate-core google-translate-tk json sdicf-client stem sdicf
sdic bug-reference add-log diff-mode mm-archive message rfc822 mml
mml-sec mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode
mail-utils gnutls url-http mail-parse rfc2231 rfc2047 rfc2045
ietf-drums url-gw url-cache url-auth url-handlers epg finder-inf
lisp-mnt package-x pcase tramp-cache dabbrev eieio-opt speedbar
sb-image ezimage dframe help-mode helm-elisp helm-eval edebug eldoc
mule-util ido image-file magit-utils crm dash misearch multi-isearch
skk-vars wid-edit qp network-stream starttls tls mew-varsx mew-unix
mew-auth mew-config mew-imap2 mew-imap mew-nntp2 mew-nntp mew-pop
mew-smtp mew-ssl mew-ssh mew-net mew-highlight mew-sort mew-fib
mew-ext mew-refile mew-demo mew-attach mew-draft mew-message
mew-thread mew-virtual mew-summary4 mew-summary3 mew-summary2
mew-summary mew-search mew-pick mew-passwd mew-scan mew-syntax mew-bq
mew-smime mew-pgp mew-header mew-exec mew-mark mew-mime mew-edit
mew-decode mew-encode mew-cache mew-minibuf mew-complete mew-addrbook
mew-local mew-vars3 mew-vars2 mew-vars mew-env mew-lang-jp mew-mule3
mew-mule mew-gemacs mew-key mew-func mew-blvs mew-const mew slime
etags arc-mode archive-mode hyperspec winner org-rmail org-mhe org-irc
org-info org-gnus org-docview doc-view jka-compr image-mode org-bibtex
bibtex org-bbdb org-w3m org-agenda ox-qmd org-eww ox-md ox-odt rng-loc
rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse
nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table
ox-ascii ox-publish ox org-element avl-tree org org-macro org-footnote
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table
ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs ccc helm-mode
helm-files rx image-dired tramp tramp-compat tramp-loaddefs trampver
shell pcomplete format-spec dired-x dired-aux ffap thingatpt
helm-buffers helm-tags helm-bookmark helm-adaptive helm-info bookmark
pp helm-locate helm-grep helm-regexp helm-external helm-net browse-url
xml url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util url-parse auth-source gnus-util mm-util
mail-prsvr password-cache url-vars mailcap helm-utils compile comint
ansi-color ring helm-help helm-types helm easy-mmode cl-macs gv
helm-source eieio byte-opt bytecomp byte-compile cl-extra cconv
eieio-core helm-multi-match helm-lib dired helm-config helm-easymenu
edmacro kmacro async-bytecomp async cl-loaddefs cl-lib slime-autoloads
info easymenu package epg-config skk-setup skk-autoloads advice
help-fns time-date japan-util tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 8 1186668 162179)
 (symbols 24 52434 2)
 (miscs 20 1327 1392)
 (strings 16 179179 19271)
 (string-bytes 1 4854175)
 (vectors 8 60747)
 (vector-slots 4 1744482 89680)
 (floats 8 309 847)
 (intervals 28 124875 414)
 (buffers 512 84)
 (heap 1024 77363 5818))

Best regards,
 Takushi Usami.

[-- Attachment #2: ChangeLog --]
[-- Type: Text/Plain, Size: 501 bytes --]

2017-08-14  Takushi Usami  <takushi1969@gmail.com>

	Fix to extract commentary section from public package
	
	* lisp/emacs-lisp/package-x.el (package-upload-buffer-internal):
	Commentary section shuld be displayed as the below, those are
	described at '39.2 Simple Pakcages' in Elisp info
	- no ‘;;; Commentary:’ line,
	- no leading comment characters
	But if a package is not a type of built-in and consists of only 1
	file, the commentary section is displayed with comment charcters.



[-- Attachment #3: package-x.patch --]
[-- Type: Text/X-Patch, Size: 749 bytes --]

diff -crNad old/emacs/24.5/lisp/emacs-lisp/package-x.el new/emacs/24.5/lisp/emacs-lisp/package-x.el
*** old/emacs/24.5/lisp/emacs-lisp/package-x.el	2017-08-14 14:08:24.623168435 +0900
--- new/emacs/24.5/lisp/emacs-lisp/package-x.el	2017-08-14 14:11:03.011751569 +0900
***************
*** 238,243 ****
--- 238,247 ----
  
  	    ;; If there is a commentary section, write it.
  	    (when commentary
+ 	      (let ((pos 0)
+ 		    (omit-regex "^\\(?:;;;[[:space:]]*Commentary.*?\n\\|;;\\)"))
+ 		(while (setq pos (string-match omit-regex commentary pos))
+ 		  (setq commentary (replace-match "" t t commentary))))
  	      (write-region commentary nil
  	        	    (expand-file-name
  	        	     (concat (symbol-name pkg-name) "-readme.txt")

[-- Attachment #4: printHello.el --]
[-- Type: Text/Plain, Size: 594 bytes --]

;;; printHello.el --- My first package which echoes "Hello, World" in minibuffer.

;; Author: Takushi Usami <takushi1969@gmail.com>
;; Version: 1.0

;;; Commentary:

;; This is a simple package for learning how to package a single elisp file.
;; If you would like to know more about packaging elisp, read followings.
;;
;; - https://www.gnu.org/software/emacs/manual/html_node/elisp/Packaging.html
;; - https://www.emacswiki.org/emacs/MakingPackages

;;; Code:
;;;###autoload
(defun printHello ()
  "Echo \"Hello, World\" in minibuffer."
  (format "Hello, World"))

;;; printHello.el ends here

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#28085: 24.5; Commentary section is not displayed correctly
  2017-08-14  6:55 bug#28085: 24.5; Commentary section is not displayed correctly Takushi Usami
@ 2020-08-10 14:54 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-10 14:54 UTC (permalink / raw)
  To: Takushi Usami; +Cc: 28085

Takushi Usami <takushi1969@gmail.com> writes:

>   	    (when commentary
> + 	      (let ((pos 0)
> + 		    (omit-regex "^\\(?:;;;[[:space:]]*Commentary.*?\n\\|;;\\)"))
> + 		(while (setq pos (string-match omit-regex commentary pos))
> + 		  (setq commentary (replace-match "" t t commentary))))

This was fixed in a different way some months back:

commit 963a9ffd66cb29f0370e9a4b854dddda242c54a6
Author:     Bruno Félix Rezende Ribeiro <oitofelix@gnu.org>
AuthorDate: Tue Oct 8 04:32:18 2019 -0300
Commit:     Stefan Kangas <stefankangas@gmail.com>
CommitDate: Thu Jan 23 22:57:23 2020 +0100

    Globally sanitize single-file package long descriptions (Bug#37548)
    
    Consistent with multi-file package descriptions which don’t have
    commentary sections nor double semicolon prefixes.
    * lisp/emacs-lisp/lisp-mnt.el (lm-commentary): Remove commentary
    header, double semicolon prefixes of each line, trailing new-lines and
    trailing white-space from commentary.
    * lisp/emacs-lisp/package.el (package--get-description)
    (describe-package-1):
    * lisp/finder.el (finder-commentary):
    * lisp/info.el (Info-finder-find-node): Remove ad-hoc sanitation.

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-10 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-14  6:55 bug#28085: 24.5; Commentary section is not displayed correctly Takushi Usami
2020-08-10 14:54 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).