Re: Vim config problem in jessie
On Sat, 15 Feb 2014 04:05:48 + (UTC), Frank Mile wrote: > > I should have added one more interesting detail. If I comment out the > (python) plugin call in /etc/vim/vimrc: > if has("autocmd") > filetype plugin indent on > endif > > then the tabstops work without the manual override. Having, of course, > lost all the nice stuff associated with the plugin. Just to make sure > I hadn't messed up the plugin I commented-out the 'set ts=4' that I > had appended to the plugin - no change in its behavior :( Frank, try this: $ locate python.vim /usr/share/vim/vim74/ftplugin/python.vim /usr/share/vim/vim74/indent/python.vim /usr/share/vim/vim74/syntax/python.vim I'd say your issue is caused by the fact that all that three scripts are loaded when you edit python files. According to vim help (see :help filetypes) the "filetype plugin indent on" command that you have enabled in /etc/vim/vimrc actually means the following: - vim tries to detect the type of the file that is edited (e.g. let's suppose the file type is my_file_type) - vim loads the appropriate plugin script: /usr/share/vim/vim74/ftplugin/my_file_type.vim - vim loads the appropriate indent script: /usr/share/vim/vim74/indent/my_file_type.vim Moreover, if the syntax highlighting is enabled in vim (:syntax on) then the appropriate syntax script is also loaded: /usr/share/vim/vim74/syntax/my_file_type.vim In /usr/share/vim/vim74/ftplugin/python.vim I see the following line: setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8 So, it seems that /usr/share/vim/vim74/ftplugin/python.vim is loaded last and overrides tabstop value set by other scripts. --rpr. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAN-5nynMnTDrDrxjv=gUmnRP9984O6L5XUzetaEKruEBo=b...@mail.gmail.com
Re: apt-get remove/purge with regex gives unexpected result
On Wed, 12 Feb 2014 18:04:49 +0100 Sven Joachim wrote: > > My interpretation of that paragraph is that apt-get first tries to > interpret the pattern as a wildcard (see glob(7)) and only tries a > regular expression match if the glob produces no matches. Sven, it seems you are right. I tried the following commands: $ sudo apt-get remove 'libre?f?ice.*' Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libreoffice.org-calc' for regex 'libre?f?ice.*' Note, selecting 'libreoffice.org-writer' for regex 'libre?f?ice.*' Package 'libreoffice.org-calc' is not installed, so not removed Package 'libreoffice.org-writer' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded. $ sudo apt-get remove '^libre?f?ice.*' Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ^libre?f?ice.* E: Couldn't find any package by regex '^libre?f?ice.*' E: Couldn't find any package by regex '^libre?f?ice.*' The first command shows that libre?f?ice.* is treated as a glob expression as it matched libreoffice.org-calc and libreoffice.org-writer packages. It that expression ? means "any single character". The second command shows that ^libre?f?ice.* is treated as a regular expression which didn't match the said packages because in regular expressions "an atom followed by '?' matches a sequence of 0 or 1 matches of the atom." I see a bug in the execution of the first command: it reports Note, selecting 'libreoffice.org-calc' for regex 'libre?f?ice.*' but actually it should report Note, selecting 'libreoffice.org-calc' for glob expression 'libre?f?ice.*' Definitely, apt-get manpage should be improved to clarify the usage of glob expressions by default. If I were the developer of apt-get I would provide an option for changing the default treatment of pkg arguments as glob expressions to regular expressions. It would prevent issues with regular expressions that can be also valid glob expressions (as shown in my initial post). -- rpr. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAN-5ny=zHJExhVx3bdsUhkkMD0AXmuBpTs+=l13+hxpbtvf...@mail.gmail.com
apt-get remove/purge with regex gives unexpected result
On an installation of Debian GNU/Linux 7.0 with subsequent updates from testing (Linux 3.12.9-1 amd64) I noticed a strange output while running "apt-get remove" or "apt-get purge" in order to remove/purge libreoffice packages. Here are the libreoffice packages: $ dpkg-query -l 'libreoffice*' | tail -n +6 | gawk '{print $1,$2,$3}' ii libreoffice 1:4.1.4-2+b1 ii libreoffice-base 1:4.1.4-2+b1 ii libreoffice-base-core 1:4.1.4-2+b1 un libreoffice-bundled ii libreoffice-calc 1:4.1.4-2+b1 ii libreoffice-common 1:4.1.4-2 ii libreoffice-core 1:4.1.4-2+b1 un libreoffice-dev ii libreoffice-draw 1:4.1.4-2+b1 ii libreoffice-emailmerge 1:4.1.4-2 un libreoffice-evolution un libreoffice-filter-binfilter un libreoffice-filter-mobiledev un libreoffice-gcj un libreoffice-gnome un libreoffice-grammarcheck un libreoffice-gtk un libreoffice-help-4.1 ii libreoffice-impress 1:4.1.4-2+b1 ii libreoffice-java-common 1:4.1.4-2 un libreoffice-kab un libreoffice-kde un libreoffice-l10n-3.5 un libreoffice-l10n-3.6 un libreoffice-l10n-4.1 un libreoffice-l10n-en-us ii libreoffice-math 1:4.1.4-2+b1 un libreoffice-mysql-connector un libreoffice-officebean un libreoffice-pdfimport un libreoffice-presentation-minimizer un libreoffice-presenter-console un libreoffice-report-builder ii libreoffice-report-builder-bin 1:4.1.4-2+b1 un libreoffice-script-provider-bsh un libreoffice-script-provider-js un libreoffice-script-provider-python un libreoffice-sdbc-postgresql un libreoffice-style un libreoffice-style-andromeda un libreoffice-style-crystal un libreoffice-style-default ii libreoffice-style-galaxy 1:4.1.4-2 un libreoffice-style-hicontrast un libreoffice-style-oxygen ii libreoffice-style-tango 1:4.1.4-2 un libreoffice-unbundled un libreoffice-wiki-publisher ii libreoffice-writer 1:4.1.4-2+b1 un libreoffice-writer2latex un libreoffice-writer2xhtml In order to uninstall all libreoffice packages I ran the following apt-get command with a simple regular expression: $ sudo apt-get remove 'libreoffice.*' Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libreoffice.org-calc' for regex 'libreoffice.*' Note, selecting 'libreoffice.org-writer' for regex 'libreoffice.*' Package 'libreoffice.org-calc' is not installed, so not removed Package 'libreoffice.org-writer' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. I'd say this output is unexpected because apt-get does not select installed libreoffice packages listed by dpkg-query. But if the regular expression starts with ^ I get the expected result: $ sudo apt-get remove '^libreoffice.*' Reading package lists... Done Building dependency tree Reading state information... Done [ many lines deleted ] The following packages were automatically installed and are no longer required: fonts-lyx fonts-opensymbol libboost-date-time1.54.0 libboost-system1.54.0 libcdr-0.0-0 libclucene-contribs1 libcmis-0.3-3 libexttextcat-2.0-0 libexttextcat-data libhsqldb1.8.0-java libhyphen0 liblangtag-common liblangtag1 libmspub-0.0-0 libmwaw-0.1-1 libmythes-1.2-0 libodfgen-0.0-0 liborcus-0.6-0 libvisio-0.0-0 libwps-0.2-2 lp-solve uno-libs3 ure xfonts-mathml Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: libreoffice libreoffice-base libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw libreoffice-emailmerge libreoffice-impress libreoffice-java-common libreoffice-math libreoffice-report-builder-bin libreoffice-style-galaxy libreoffice-style-tango libreoffice-writer python3-uno 0 upgraded, 0 newly installed, 16 to remove and 0 not upgraded. After this operation, 287 MB disk space will be freed. Do you want to continue? [Y/n] After reading apt-get(8) and regex(7) manpages I'd say that using apt-get with 'libreoffice.*' or '^libreoffice.*' should give the same result. $ apt-get --version apt 0.9.15 for amd64 compiled on Jan 25 2014 22:25:33 Supported modules: *Ver: Standard .deb *Pkg: Debian dpkg interface (Priority 30) Pkg: Debian APT solver interface (Priority -1000) S.L: 'deb' Standard Debian binary tree S.L: 'deb-src' Standard Debian source tree Idx: Debian Source Index Idx: Debian Package Index Idx: Debian Translation Index Idx: Debian dpkg status file Idx: EDSP scenario file $ sudo apt-get check Reading package lists... Done Building dependency tree Reading state information... Done Any comments? -- rpr. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAN-5ny=q9xj9gme88uq116bpyh-uehx8woydzf_fecvbjrm...@mail.gmail.com