GNU bug report logs - #25229
25.1; newline inserted at end of html-href-anchor

Previous Next

Package: emacs;

Reported by: Simon Wright <simon <at> pushface.org>

Date: Mon, 19 Dec 2016 12:06:02 UTC

Severity: normal

Tags: notabug

Found in version 25.1

Done: nitish chandra <nitishchandrachinta <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25229 in the body.
You can then email your comments to 25229 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25229; Package emacs. (Mon, 19 Dec 2016 12:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Simon Wright <simon <at> pushface.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 19 Dec 2016 12:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Simon Wright <simon <at> pushface.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; newline inserted at end of html-href-anchor
Date: Mon, 19 Dec 2016 12:05:41 +0000
From emacs -Q, in the scratch buffer,

M-x html-mode RET

enter "foo."

highlight "foo", point before "."

M-x html-href-anchor RET
sample RET

buffer contains

<a href="sample">foo</a>
.

where it should contain

<a href="sample">foo</a>.

I believe this is down to the same problem as reported in PR16634.

In GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
of 2016-09-21 built on builder10-9.porkrind.org
Windowing system distributor 'Apple', version 10.3.1504
Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: HTML

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-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
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
user-error: The mark is not set now, so there is no region
Mark set
You can run the command ‘html-href-anchor’ with C-c C-c h
mwheel-scroll: Beginning of buffer [17 times]
current-kill: Kill ring is empty
read-number: Command attempted to use minibuffer while in minibuffer

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils skeleton sgml-mode
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
cl-preloaded 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 kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 200051 6221)
(symbols 48 19907 0)
(miscs 40 56 148)
(strings 32 16504 5506)
(string-bytes 1 456332)
(vectors 16 33151)
(vector-slots 8 656015 4921)
(floats 8 162 175)
(intervals 56 217 0)
(buffers 976 18))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25229; Package emacs. (Mon, 19 Dec 2016 15:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 25229 <at> debbugs.gnu.org (full text, mbox):

From: Simon Wright <simon <at> pushface.org>
To: nitish chandra <nitishchandrachinta <at> gmail.com>
Cc: 25229 <at> debbugs.gnu.org
Subject: Re: bug#25229: 25.1; newline inserted at end of html-href-anchor
Date: Mon, 19 Dec 2016 15:28:12 +0000
[Message part 1 (text/plain, inline)]
Thanks for this, which indeed fixes my problem.

No mention of this in skeleton-insert's doc string!

--S

> On 19 Dec 2016, at 15:18, nitish chandra <nitishchandrachinta <at> gmail.com> wrote:
> 
> This appears to be the default behaviour of all skeletons. AFAIU a newline is inserted after the insertion of the skeleton. To override this behaviour, set skeleton-end-newline to nil.
> 
> Thanks,
> Nitish
> 
> On 19 December 2016 at 17:35, Simon Wright <simon <at> pushface.org <mailto:simon <at> pushface.org>> wrote:
> From emacs -Q, in the scratch buffer,
> 
> M-x html-mode RET
> 
> enter "foo."
> 
> highlight "foo", point before "."
> 
> M-x html-href-anchor RET
> sample RET
> 
> buffer contains
> 
> <a href="sample">foo</a>
> .
> 
> where it should contain
> 
> <a href="sample">foo</a>.
> 
> I believe this is down to the same problem as reported in PR16634.
> 
> In GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
> of 2016-09-21 built on builder10-9.porkrind.org <http://builder10-9.porkrind.org/>
> Windowing system distributor 'Apple', version 10.3.1504
> Configured using:
> 'configure --with-ns '--enable-locallisppath=/Library/Application
> Support/Emacs/${version}/site-lisp:/Library/Application
> Support/Emacs/site-lisp' --with-modules'
> 
> Configured features:
> NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
> 
> Important settings:
>   value of $LANG: en_GB.UTF-8
>   locale-coding-system: utf-8-unix
> 
> Major mode: HTML
> 
> Minor modes in effect:
>   tooltip-mode: t
>   global-eldoc-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
>   line-number-mode: t
>   transient-mark-mode: t
> 
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> user-error: The mark is not set now, so there is no region
> Mark set
> You can run the command ‘html-href-anchor’ with C-c C-c h
> mwheel-scroll: Beginning of buffer [17 times]
> current-kill: Kill ring is empty
> read-number: Command attempted to use minibuffer while in minibuffer
> 
> Load-path shadows:
> None found.
> 
> Features:
> (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
> mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
> mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
> rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
> cl-loaddefs pcase cl-lib mail-prsvr mail-utils skeleton sgml-mode
> time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
> lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd
> fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
> lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
> scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame
> cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
> tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
> slovak czech european ethiopic indian cyrillic chinese charscript
> case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
> cl-preloaded 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 kqueue cocoa ns
> multi-tty make-network-process emacs)
> 
> Memory information:
> ((conses 16 200051 6221)
> (symbols 48 19907 0)
> (miscs 40 56 148)
> (strings 32 16504 5506)
> (string-bytes 1 456332)
> (vectors 16 33151)
> (vector-slots 8 656015 4921)
> (floats 8 162 175)
> (intervals 56 217 0)
> (buffers 976 18))
> 
> 
> 
> 

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25229; Package emacs. (Mon, 19 Dec 2016 16:41:01 GMT) Full text and rfc822 format available.

Message #11 received at 25229 <at> debbugs.gnu.org (full text, mbox):

From: nitish chandra <nitishchandrachinta <at> gmail.com>
To: Simon Wright <simon <at> pushface.org>
Cc: 25229 <at> debbugs.gnu.org
Subject: Re: bug#25229: 25.1; newline inserted at end of html-href-anchor
Date: Mon, 19 Dec 2016 20:48:00 +0530
[Message part 1 (text/plain, inline)]
This appears to be the default behaviour of all skeletons. AFAIU a newline
is inserted after the insertion of the skeleton. To override this
behaviour, set skeleton-end-newline to nil.

Thanks,
Nitish

On 19 December 2016 at 17:35, Simon Wright <simon <at> pushface.org> wrote:

> From emacs -Q, in the scratch buffer,
>
> M-x html-mode RET
>
> enter "foo."
>
> highlight "foo", point before "."
>
> M-x html-href-anchor RET
> sample RET
>
> buffer contains
>
> <a href="sample">foo</a>
> .
>
> where it should contain
>
> <a href="sample">foo</a>.
>
> I believe this is down to the same problem as reported in PR16634.
>
> In GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version
> 10.9.5 (Build 13F1911))
> of 2016-09-21 built on builder10-9.porkrind.org
> Windowing system distributor 'Apple', version 10.3.1504
> Configured using:
> 'configure --with-ns '--enable-locallisppath=/Library/Application
> Support/Emacs/${version}/site-lisp:/Library/Application
> Support/Emacs/site-lisp' --with-modules'
>
> Configured features:
> NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
>
> Important settings:
>   value of $LANG: en_GB.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: HTML
>
> Minor modes in effect:
>   tooltip-mode: t
>   global-eldoc-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
>   line-number-mode: t
>   transient-mark-mode: t
>
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> user-error: The mark is not set now, so there is no region
> Mark set
> You can run the command ‘html-href-anchor’ with C-c C-c h
> mwheel-scroll: Beginning of buffer [17 times]
> current-kill: Kill ring is empty
> read-number: Command attempted to use minibuffer while in minibuffer
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
> mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
> mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
> rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
> cl-loaddefs pcase cl-lib mail-prsvr mail-utils skeleton sgml-mode
> time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
> lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd
> fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
> lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
> scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame
> cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
> tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
> slovak czech european ethiopic indian cyrillic chinese charscript
> case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
> cl-preloaded 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 kqueue cocoa ns
> multi-tty make-network-process emacs)
>
> Memory information:
> ((conses 16 200051 6221)
> (symbols 48 19907 0)
> (miscs 40 56 148)
> (strings 32 16504 5506)
> (string-bytes 1 456332)
> (vectors 16 33151)
> (vector-slots 8 656015 4921)
> (floats 8 162 175)
> (intervals 56 217 0)
> (buffers 976 18))
>
>
>
>
[Message part 2 (text/html, inline)]

Reply sent to nitish chandra <nitishchandrachinta <at> gmail.com>:
You have taken responsibility. (Mon, 19 Dec 2016 16:45:02 GMT) Full text and rfc822 format available.

Notification sent to Simon Wright <simon <at> pushface.org>:
bug acknowledged by developer. (Mon, 19 Dec 2016 16:45:02 GMT) Full text and rfc822 format available.

Message #16 received at 25229-done <at> debbugs.gnu.org (full text, mbox):

From: nitish chandra <nitishchandrachinta <at> gmail.com>
To: 25229-done <at> debbugs.gnu.org
Subject: Not a bug
Date: Mon, 19 Dec 2016 22:13:35 +0530
[Message part 1 (text/plain, inline)]
Closing this as this is a confusion arising out of undocumented behaviour.

Thanks,
Nitish
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25229; Package emacs. (Tue, 20 Dec 2016 01:08:01 GMT) Full text and rfc822 format available.

Message #19 received at 25229 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Simon Wright <simon <at> pushface.org>
Cc: nitish chandra <nitishchandrachinta <at> gmail.com>, 25229 <at> debbugs.gnu.org
Subject: Re: bug#25229: 25.1; newline inserted at end of html-href-anchor
Date: Mon, 19 Dec 2016 20:08:35 -0500
tags 25229 notabug
quit

Simon Wright <simon <at> pushface.org> writes:

> Thanks for this, which indeed fixes my problem.
>
> No mention of this in skeleton-insert's doc string!

I've updated the documentation of skeleton-insert.

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=88cdf14b37a7344bb266e94512485e3cc738c23d





Added tag(s) notabug. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Tue, 20 Dec 2016 01:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25229; Package emacs. (Tue, 20 Dec 2016 09:17:01 GMT) Full text and rfc822 format available.

Message #24 received at 25229 <at> debbugs.gnu.org (full text, mbox):

From: Simon Wright <simon <at> pushface.org>
To: npostavs <at> users.sourceforge.net
Cc: nitish chandra <nitishchandrachinta <at> gmail.com>, 25229 <at> debbugs.gnu.org
Subject: Re: bug#25229: 25.1; newline inserted at end of html-href-anchor
Date: Tue, 20 Dec 2016 09:16:33 +0000
Thanks, but ... shouldn't that be "(unless `skeleton-end-newline' is nil)"?

@@ -187,6 +186,10 @@ The optional third argument STR, if specified, is the value for the
 variable `str' within the skeleton.  When this is non-nil, the
 interactor gets ignored, and this should be a valid skeleton element.
 
+When done with skeleton, but before going back to `_'-point, add
+a newline (unless `skeleton-end-newline' is non-nil) and run the
+hook `skeleton-end-hook'.
+
 SKELETON is made up as (INTERACTOR ELEMENT ...).  INTERACTOR may be nil if
 not needed, a prompt-string or an expression for complex read functions.

> On 20 Dec 2016, at 01:08, npostavs <at> users.sourceforge.net wrote:
> 
> tags 25229 notabug
> quit
> 
> Simon Wright <simon <at> pushface.org> writes:
> 
>> Thanks for this, which indeed fixes my problem.
>> 
>> No mention of this in skeleton-insert's doc string!
> 
> I've updated the documentation of skeleton-insert.
> 
> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=88cdf14b37a7344bb266e94512485e3cc738c23d
> 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25229; Package emacs. (Wed, 21 Dec 2016 03:26:01 GMT) Full text and rfc822 format available.

Message #27 received at 25229 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Simon Wright <simon <at> pushface.org>
Cc: nitish chandra <nitishchandrachinta <at> gmail.com>, 25229 <at> debbugs.gnu.org
Subject: Re: bug#25229: 25.1; newline inserted at end of html-href-anchor
Date: Tue, 20 Dec 2016 22:26:27 -0500
Simon Wright <simon <at> pushface.org> writes:

> Thanks, but ... shouldn't that be "(unless `skeleton-end-newline' is
> nil)"?

Oops!  Thanks for catching that.  Fixed.

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=cf1f9852d0e8d571dfe74486c26417828faa945a




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 18 Jan 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.