From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: gmane.emacs.bugs Subject: bug#25229: 25.1; newline inserted at end of html-href-anchor Date: Mon, 19 Dec 2016 15:28:12 +0000 Message-ID: <9A4430A1-50A7-4F85-8D3B-468A30059C12@pushface.org> References: <3E7D43F4-D020-4A20-AC0F-036677DBA4AF@pushface.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_AC050002-2AD1-4B1A-8ADB-41087D54F74E" X-Trace: blaine.gmane.org 1482161363 8531 195.159.176.226 (19 Dec 2016 15:29:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Dec 2016 15:29:23 +0000 (UTC) Cc: 25229@debbugs.gnu.org To: nitish chandra Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 19 16:29:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIzsG-0000I4-9W for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2016 16:29:12 +0100 Original-Received: from localhost ([::1]:46168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIzsI-0001oR-Kp for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2016 10:29:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIzsA-0001nq-Ul for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2016 10:29:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cIzs6-0008Kk-TG for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2016 10:29:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cIzs6-0008Kb-PO for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2016 10:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cIzs6-0003Xg-H4 for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2016 10:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Simon Wright Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Dec 2016 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25229 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25229-submit@debbugs.gnu.org id=B25229.148216130113558 (code B ref 25229); Mon, 19 Dec 2016 15:29:02 +0000 Original-Received: (at 25229) by debbugs.gnu.org; 19 Dec 2016 15:28:21 +0000 Original-Received: from localhost ([127.0.0.1]:47711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIzrR-0003Wc-4R for submit@debbugs.gnu.org; Mon, 19 Dec 2016 10:28:21 -0500 Original-Received: from smtp.hosts.co.uk ([85.233.160.19]:56390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIzrP-0003WO-13 for 25229@debbugs.gnu.org; Mon, 19 Dec 2016 10:28:19 -0500 Original-Received: from [81.159.222.217] (helo=[192.168.1.99]) by smtp.hosts.co.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cIzrI-0008JU-9B; Mon, 19 Dec 2016 15:28:13 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3259) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127178 Archived-At: --Apple-Mail=_AC050002-2AD1-4B1A-8ADB-41087D54F74E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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 = wrote: >=20 > 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. >=20 > Thanks, > Nitish >=20 > On 19 December 2016 at 17:35, Simon Wright > wrote: > =46rom emacs -Q, in the scratch buffer, >=20 > M-x html-mode RET >=20 > enter "foo." >=20 > highlight "foo", point before "." >=20 > M-x html-href-anchor RET > sample RET >=20 > buffer contains >=20 > foo > . >=20 > where it should contain >=20 > foo. >=20 > I believe this is down to the same problem as reported in PR16634. >=20 > 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=3D/Library/Application > Support/Emacs/${version}/site-lisp:/Library/Application > Support/Emacs/site-lisp' --with-modules' >=20 > Configured features: > NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES >=20 > Important settings: > value of $LANG: en_GB.UTF-8 > locale-coding-system: utf-8-unix >=20 > Major mode: HTML >=20 > 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 >=20 > 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 =E2=80=98html-href-anchor=E2=80=99 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 >=20 > Load-path shadows: > None found. >=20 > 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) >=20 > 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)) >=20 >=20 >=20 >=20 --Apple-Mail=_AC050002-2AD1-4B1A-8ADB-41087D54F74E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 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@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@pushface.org> wrote:
=46rom 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=3D"sample">foo</a>
.

where it should contain

<a href=3D"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=3D/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 =E2=80=98html-href-anchor=E2=80=99 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))





= --Apple-Mail=_AC050002-2AD1-4B1A-8ADB-41087D54F74E--