* bug#17631: 24.3.50; the following should return t
@ 2014-05-29 14:38 Samuel Lê
2014-05-29 15:51 ` Glenn Morris
2014-05-29 15:52 ` Eli Zaretskii
0 siblings, 2 replies; 3+ messages in thread
From: Samuel Lê @ 2014-05-29 14:38 UTC (permalink / raw
To: 17631
I ran this code, as someone recommanded on the #emacs chan of freenode:
(with-temp-buffer
(insert "foo Bar")
(goto-char (point-min))
(re-search-forward "[[:upper:]]")
(looking-at "Bar"))
t was expected, but instead I got returned nil.
In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
of 2013-08-17 on debianSam
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description: Debian GNU/Linux 7.5 (wheezy)
Configured using:
`configure --prefix=/opt/emacs24'
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
erc-list-mode: t
erc-menu-mode: t
erc-autojoin-mode: t
erc-ring-mode: t
erc-networks-mode: t
erc-pcomplete-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-match-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-netsplit-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
recentf-mode: t
hi-lock-mode: t
elisp-slime-nav-mode: t
paredit-mode: t
hl-line-mode: t
idle-highlight-mode: t
shell-dirtrack-mode: t
eldoc-mode: t
global-auto-complete-mode: t
auto-complete-mode: t
ido-ubiquitous-mode: t
show-paren-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
auto-fill-function: do-auto-fill
transient-mark-mode: t
Recent input:
m p - b u g g e <backspace> <backspace> <backspace>
f f e r ` SPC d o ? <return> ( SPC <backspace> I SPC
r a n SPC i n <backspace> t SPC f o <backspace> r o
m t h <backspace> <backspace> SPC t h e SPC s <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> f o
r <tab> I SPC r a n SPC y o u SPC <backspace> r SPC
c o d e SPC f r o m SPC t h e SPC * s c r a t c h (
<backspace> * SPC b u f f e r SPC b y SPC t h e SPC
w a y , SPC n o t h i n g SPC h a p p e n d <backspace>
e d SPC ( e x e p t <backspace> <backspace> <backspace>
c e p t SPC t h e SPC n i l SPC d i d <backspace> s
p l a y SPC s h o r t l y SPC i n t h e <backspace>
<backspace> <backspace> SPC t h e SPC m e s s a g e
SPC b a r SPC a t SPC t h e SPC b o t t o m SPC o f
SPC e m a c s _ <backspace> ) <return> C-x o C-x C-e
<help-echo> <up> <up> <up> <up> C-a <C-right> <right>
C-k d o <left> M-> <up> C-e C-x C-e <help-echo> <down-mouse-1>
<mouse-1> C-x k <return> <down-mouse-1> <mouse-1> <help-echo>
<down-mouse-1> <mouse-1> <backspace> <backspace> C-x
u C-x u C-x u C-x u <down> <down> <down> <down> <down>
<down> <down> <return> <return> M-x r e p o <retur
n>
Recent messages:
Wrote /home/sam/.emacs.d/char-utils.el
Mark set
Quit
call-interactively: End of buffer [3 times]
Mark set [3 times]
nil [2 times]
up-list: Scan error: "Unbalanced parentheses", 662, 793
Mark set
Entering debugger...
Undo! [4 times]
End of buffer [2 times]
Load-path shadows:
/home/sam/.emacs.d/elpa/flymake-0.4.16/flymake hides
/opt/emacs24/share/emacs/24.3.50/lisp/progmodes/flymake
Features:
(shadow sort flyspell ispell mail-extr emacsbug message rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils
debug network-stream starttls tls erc-list erc-menu erc-join erc-ring
erc-networks erc-pcomplete erc-track erc-match erc-button erc-fill
erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat pp dabbrev
fuzzy mule-util tabify recentf tree-widget hi-lock misearch
multi-isearch vc-git ffap url-parse url-vars elisp-slime-nav paredit
hl-line saveplace idle-highlight-mode elpy yasnippet help-mode pyvenv
grep python rx nose json idomenu imenu highlight-indentation flymake
find-file-in-project etags elpy-refactor ecb warnings ecb-symboldef
ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload
lisp-mnt ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde
ecb-method-browser ecb-semantic ecb-file-browser ecb-speedbar ecb-layout
ecb-create-layout ecb-compilation ecb-common-browser assoc ecb-navigate
ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper
semantic/db-mode semantic/db-find semantic/db-ref semantic/analyze
semantic/sort semantic/scope semantic/analyze/fcn semantic/db eieio-base
semantic/format semantic/tag-ls semantic/find semantic/ctxt
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet wid-edit ecb-util tramp tramp-compat
auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core
gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver
format-spec ess-toolbar ess-mouse mouseme thingatpt browse-url ess-menu
ess-swv ess-noweb ess-noweb-font-lock-mode ess-bugs-l essd-els ess-sas-d
ess-sas-l ess-sas-a shell pcomplete ess-arc-d ess-vst-d ess-xls-d
ess-lsp-l ess-sta-d ess-sta-l cc-vars cc-defs make-regexp ess-sp6-d
ess-sp5-d ess-sp3-d ess-julia ess-r-d ess-tracebug compile ess-roxy
easy-mmode hideshow ess-help reporter ess-developer ess-r-args eldoc
ess-s-l speedbar sb-image ezimage dframe ess ess-inf comint ansi-color
ring ess-mode ess-noweb-mode ess-utils ess-custom executable ess-compat
ess-site auto-complete-config auto-complete cl-macs gv popup cl
zenburn-theme ecb-autoloads edmacro kmacro cl-loaddefs cl-lib smex
starter-kit-misc ido-ubiquitous advice help-fns ido paren
starter-kit-defuns uniquify info easymenu package time-date tooltip
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
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#17631: 24.3.50; the following should return t
2014-05-29 14:38 bug#17631: 24.3.50; the following should return t Samuel Lê
@ 2014-05-29 15:51 ` Glenn Morris
2014-05-29 15:52 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2014-05-29 15:51 UTC (permalink / raw
To: Samuel Lê; +Cc: 17631
Samuel Lê wrote:
> I ran this code, as someone recommanded on the #emacs chan of freenode:
> (with-temp-buffer
> (insert "foo Bar")
> (goto-char (point-min))
> (re-search-forward "[[:upper:]]")
> (looking-at "Bar"))
>
> t was expected, but instead I got returned nil.
Your expectation is incorrect, for two reasons:
1. `[:upper:]'
This matches any upper-case letter, as determined by the current
case table (*note Case Tables::). If `case-fold-search' is
non-`nil', this also matches any lower-case letter.
2. re-search-forward leaves point at the end of the match, ie after "B"
in this case.
Compare:
(with-temp-buffer
(insert "foo Bar")
(goto-char (point-min))
(let (case-fold-search)
(re-search-forward "[[:upper:]]")
(looking-at "ar")))
The help-gnu-emacs mailing list is probably a better place to discuss
these things, but feel free to keep talking about it here.
I'll close this report though, since it is not a bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#17631: 24.3.50; the following should return t
2014-05-29 14:38 bug#17631: 24.3.50; the following should return t Samuel Lê
2014-05-29 15:51 ` Glenn Morris
@ 2014-05-29 15:52 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2014-05-29 15:52 UTC (permalink / raw
To: Samuel Lê; +Cc: 17631
> Date: Thu, 29 May 2014 16:38:02 +0200
> From: Samuel Lê <samuel.le@gmail.com>
>
> I ran this code, as someone recommanded on the #emacs chan of freenode:
> (with-temp-buffer
> (insert "foo Bar")
> (goto-char (point-min))
> (re-search-forward "[[:upper:]]")
> (looking-at "Bar"))
>
> t was expected, but instead I got returned nil.
You need to bind case-fold-search to nil.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-29 15:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-29 14:38 bug#17631: 24.3.50; the following should return t Samuel Lê
2014-05-29 15:51 ` Glenn Morris
2014-05-29 15:52 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.